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

View File

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