lepisi-pengumuman/App/Views/Data/edit_pengumuman.html

76 lines
1.7 KiB
HTML

{% extends "base.html" %}
{% block title %}Edit Pengumuman{% endblock %}
{% block body %}
<form method="post">
{% for post in posts %}
<h3>Pengumuman {{ post.id }}</h3>
<label for="category">Kategori: </label>
<select name="category">
{% for cat in categories %}
<option value="{{ cat.id }}" {% if post.category == cat.id %}selected{% endif %}>{{ cat.category }}</option>
{% endfor %}
</select>
<br>
<label for="content">Konten: </label>
<textarea name="content" rows="3" cols="30">{{ post.content }}</textarea>
<br>
<label>Dibuat pada: </label>
<span>{{ post.created_at }}</span>
<br>
<label>Dibuat oleh: </label>
<span>{{ post.creator }}</span>
<br>
<label for="expired_at">Berlaku sampai: </label>
<span>{{ post.expired_at }}</span>
<br>
<label>Diubah pada: </label>
<span>
{% if post.edited_at == "0000-00-00 00:00:00" %}
Tidak pernah
{% else %}
{{ post.edited_at }}
{% endif %}
</span>
<input type="hidden" name="edited_at" value="{{ timestamp }}">
<br>
<label for="editor_name">Diubah oleh: </label>
<span>
{% if post.editor == "0" %}
-
{% else %}
{{ post.editor }}
{% endif %}
</span>
<input type="hidden" name="editor" value="3"><!-- User -->
<!-- Current Timestamp -->
<input type="hidden" name="_currts" value="{{ timestamp }}" disabled>
{% endfor %}
<!-- Method -->
<input type="hidden" name="_method" value="put">
<!-- Token -->
<input type="hidden" name="_token" value={{ token }}>
<br>
<button type="submit">Edit</button>
</form>
{% endblock %}