Fixed editing posts page layout

This commit is contained in:
Gregorio Chiko Putra 2017-09-20 15:00:21 +07:00
parent 25bdaad2ed
commit 8b78715cd4
2 changed files with 47 additions and 60 deletions

View File

@ -8,7 +8,7 @@
<h1>Ubah Pengumuman</h1>
<form method="post">
<div class="flex five grow">
<div class="flex five">
<aside class="two-fifth-600 full">
<div class="stack">
<label>Dibuat pada: </label>
@ -33,6 +33,7 @@
</span>
<input type="hidden" name="edited_at" value="{{ timestamp }}">
</div>
<div class="stack">
<label>Diubah oleh: </label>
<span>
@ -58,70 +59,48 @@
</div>
</aside>
<div class="three-fifth-600 full">
<div class="stack">
<div class="stack">
<label for="category">Kategori: </label>
</div>
<div class="stack">
<select name="category">
{% for cat in categories %}
<option value="{{ cat.id }}"
{% if post.category == cat.id %}
selected
{% endif %}
>
{{ cat.category }}
</option>
{% endfor %}
</select>
</div>
<input type="hidden" name="old_category" value="{{ post.category }}">
</div>
<div class="fifth-600 full">
<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>
<input type="hidden" name="old_category" value="{{ post.category }}">
<div class="stack">
<div class="stack">
<label for="content">Konten: </label>
</div>
<div class="stack">
<textarea id="smde" name="content" rows="3" maxlength="255">{{ post.content }}</textarea>
</div>
<input type="hidden" name="old_content" value="{{ post.content }}">
</div>
<label for="valid_at">Berlaku dari: </label>
<input id="left" name="valid_at" value="{{ post.valid_at|date("Y-m-d") }}">
<input type="hidden" name="old_valid_at" value="{{ post.valid_at|date("Y-m-d") }}">
<div class="stack">
<div class="stack">
<label for="valid_at">Berlaku dari: </label>
</div>
<div class="stack">
<input id="left" name="valid_at" value="{{ post.valid_at|date("Y-m-d") }}">
</div>
<input type="hidden" name="old_valid_at" value="{{ post.valid_at|date("Y-m-d") }}">
</div>
<label for="expired_at">Berlaku sampai: </label>
<input id="right" name="expired_at" value="{{ post.expired_at|date("Y-m-d") }}">
<input type="hidden" name="old_expired_at" value="{{ post.expired_at|date("Y-m-d") }}">
</div>
<div class="stack">
<div class="stack">
<label for="expired_at">Berlaku sampai: </label>
</div>
<div class="stack">
<input id="right" name="expired_at" value="{{ post.expired_at|date("Y-m-d") }}">
</div>
<input type="hidden" name="old_expired_at" value="{{ post.expired_at|date("Y-m-d") }}">
</div>
<div class="two-fifth-600 full">
<label for="content">Konten: </label>
<textarea id="smde" name="content">{{ post.content }}</textarea>
<input type="hidden" name="old_content" value="{{ post.content }}">
</div>
<input type="hidden" name="_currts" value="{{ timestamp }}" disabled>
<input type="hidden" name="_method" value="put">
<input type="hidden" name="_token" value="{{ token }}">
<input type="hidden" name="_currts" value="{{ timestamp }}" disabled>
<input type="hidden" name="_method" value="put">
<input type="hidden" name="_token" value="{{ token }}">
<div class="off-four-fifth-600 full">
<button class="fifth" type="submit"
{% if (post.status == 0 or post.status == 3 or editor_now.id != creator.id) %}
disabled
{% endif %}>
<i class="fa fa-edit fa-fw" aria-hidden="true"></i>
<span style="font-size:smaller;">Ubah</span>
</button>
</div>
<div class="off-two-fifth-600 full">
<button class="full pseudo" type="submit"
{% if (post.status == 0 or post.status == 3 or editor_now.id != creator.id) %}
disabled
{% endif %}>
<i class="fa fa-edit fa-fw" aria-hidden="true"></i>
<span style="font-size:smaller;">Ubah</span>
</button>
</div>
</div>
</form>

View File

@ -181,6 +181,14 @@
.rd-month button {
color: #000;
}
.rd-container {
z-index: 5;
}
h1 {
padding: .2em 0;
}
</style>
</head>
<body>