- Function to store and get worked good
- Token works great - Session works great
This commit is contained in:
@@ -4,43 +4,44 @@
|
||||
|
||||
{% block body %}
|
||||
<form method="post">
|
||||
<h3>Pengumuman 1</h3>
|
||||
{% for post in posts %}
|
||||
<h3>Pengumuman {{ post.id }}</h3>
|
||||
|
||||
<label for="category">Kategori: </label>
|
||||
<select name="category">
|
||||
<option value="1" {% if category == 1 %}selected{% endif %}>Category 1</option>
|
||||
<option value="2" {% if category == 2 %}selected{% endif %}>Category 2</option>
|
||||
<option value="3" {% if category == 3 %}selected{% endif %}>Category 3</option>
|
||||
<option value="4" {% if category == 4 %}selected{% endif %}>Category 4</option>
|
||||
{% for cat in categories %}
|
||||
<option value="{{ cat.id }}" {% if post.category == cat.id %}selected{% endif %}>{{ cat.category }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<br>
|
||||
|
||||
<label for="konten">Konten: </label>
|
||||
<textarea name="konten" rows="3" cols="30">{{ content }}</textarea>
|
||||
<textarea name="konten" rows="3" cols="30">{{ post.content }}</textarea>
|
||||
|
||||
<br>
|
||||
|
||||
<label for="created_at">Dibuat pada: </label>
|
||||
<input type="text" name="created_at" value={{ created_at }} disabled>
|
||||
<input type="text" name="created_at" value="{{ post.created_at }}" readonly>
|
||||
|
||||
<br>
|
||||
|
||||
<label for="creator">Dibuat oleh: </label>
|
||||
<input type="text" name="creator" value="User {{ creator }}" disabled>
|
||||
<input type="text" name="creator" value="{{ post.creator }}" readonly>
|
||||
|
||||
<br>
|
||||
|
||||
<label for="edited_at">Diubah pada: </label>
|
||||
<input type="text" name="edited_at" value={{ edited_at }} disabled>
|
||||
<input type="text" name="edited_at" value="{{ post.edited_at }}" readonly>
|
||||
|
||||
<br>
|
||||
|
||||
<label for="editor">Diubah oleh: </label>
|
||||
<input type="text" name="editor" value="User {{ editor }}" disabled>
|
||||
<input type="text" name="editor" value="{{ post.editor }}" readonly>
|
||||
|
||||
<!-- Current Timestamp -->
|
||||
<input type="hidden" name="_currts" value={{ timestamp }}>
|
||||
<input type="hidden" name="_currts" value="{{ timestamp }}" disabled>
|
||||
{% endfor %}
|
||||
|
||||
<!-- Method -->
|
||||
<input type="hidden" name="_method" value="put">
|
||||
|
||||
Reference in New Issue
Block a user