- Added database validation
- Added valid date for posts - Fix passing data to htmls conflicts
This commit is contained in:
@@ -35,9 +35,7 @@
|
||||
|
||||
<label>Dibuat oleh: </label>
|
||||
<span>
|
||||
{% if post.creator == user.id %}
|
||||
{{ user.name }}
|
||||
{% endif %}
|
||||
{{ creator.name }}
|
||||
</span>
|
||||
|
||||
<br>
|
||||
@@ -66,12 +64,10 @@
|
||||
{% if post.editor == "0" %}
|
||||
-
|
||||
{% else %}
|
||||
{% if post.editor == user.id %}
|
||||
{{ user.name }}
|
||||
{% endif %}
|
||||
{{ editor.name }}
|
||||
{% endif %}
|
||||
</span>
|
||||
<input type="hidden" name="editor" value="3"><!-- User -->
|
||||
<input type="hidden" name="editor" value="{{ editor_now }}">
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
|
||||
<br>
|
||||
|
||||
<label for="expired_at">Berlaku dari</label>
|
||||
<input type="date" name="valid_at" value="">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="expired_at">Berlaku sampai</label>
|
||||
<input type="date" name="expired_at" value="">
|
||||
|
||||
@@ -23,7 +28,7 @@
|
||||
<label for="content">Konten</label>
|
||||
<textarea name="content" rows="3" cols="30"></textarea>
|
||||
|
||||
<input type="hidden" name="creator" value="1"> <!-- Nanti diganti user id -->
|
||||
<input type="hidden" name="creator" value="{{ user }}">
|
||||
|
||||
<!-- Current Timestamp -->
|
||||
<input type="hidden" name="_currts" value="{{ timestamp }}" disabled>
|
||||
|
||||
@@ -6,18 +6,20 @@
|
||||
<h2>List Pengumuman</h2>
|
||||
|
||||
{% for post in posts %}
|
||||
<h3>Pengumuman {{ post.id }}</h3>
|
||||
{% if status %}
|
||||
<a href="/posts/edit/{{ post.id }}">
|
||||
{% if post.status == 1 %}
|
||||
Edit
|
||||
</a>
|
||||
{% else %}
|
||||
<strike>Edit</strike>
|
||||
</a> (Nonaktif)
|
||||
{% if post.id %}
|
||||
<h3>Pengumuman {{ post.id }}</h3>
|
||||
{% if status %}
|
||||
<a href="/posts/edit/{{ post.id }}">
|
||||
{% if post.status == 1 %}
|
||||
Edit
|
||||
</a>
|
||||
{% elseif post.status == 0 %}
|
||||
<strike>Edit</strike>
|
||||
</a> (Nonaktif)
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<p>{{ post.content|raw }}</p>
|
||||
{% endif %}
|
||||
<p>{{ post.content }}</p>
|
||||
{% endfor %}
|
||||
|
||||
{% if status %}
|
||||
|
||||
Reference in New Issue
Block a user