1
0

Changed format for dates on guestbook admin page. Make name and website as the input fields.

This commit is contained in:
Alexander Andreev 2023-05-09 23:55:49 +04:00
parent 433c80b41f
commit 30a5b83e10
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -20,10 +20,15 @@ block content
if (len(entries) > 0) if (len(entries) > 0)
each entry in entries each entry in entries
article article
header
- var created_tz = util.ToClientTimezone(entry.Created, r).Format("2006-01-02T15:04:05")
| Entry ##{entry.ID} by #[span.highlighted #{entry.Name}] #[em #{entry.Website}] on #[time(datetime=created_tz) #{created_tz}]
form.entry(onsubmit='return false;') form.entry(onsubmit='return false;')
header
- var created_tz = util.ToClientTimezone(entry.Created, r).Format("Monday _2 January 2006 15:04:05 -07:00")
| ##{entry.ID} by #[input(type='text' name='name' value=entry.Name)] #[input(type='text' name='website' value=entry.Website)]
if entry.Website != ""
| (#[input(type='checkbox' name='hide_website') hide])
else
| (#[input(type='checkbox' name='hide_website' checked='') hide])
p on #[time(datetime=created_tz) #{created_tz}]
input(type='hidden' value=entry.ID name='entry_id') input(type='hidden' value=entry.ID name='entry_id')
textarea(maxlength='4096' placeholder='Your message' name="message" required='')= entry.Message textarea(maxlength='4096' placeholder='Your message' name="message" required='')= entry.Message
button(name="edit-entry") Edit button(name="edit-entry") Edit
@ -31,7 +36,7 @@ block content
if (entry.Reply != nil) if (entry.Reply != nil)
.reply .reply
header header
- var reply_created_tz = util.ToClientTimezone(entry.Reply.Created, r).Format("2006-01-02 15:04:05") - var reply_created_tz = util.ToClientTimezone(entry.Reply.Created, r).Format("Monday _2 January 2006 15:04:05 -07:00")
| Reply by #[span.highlighted #{owner}] on #[time(datetime=reply_created_tz) #{reply_created_tz}] | Reply by #[span.highlighted #{owner}] on #[time(datetime=reply_created_tz) #{reply_created_tz}]
form.reply(onsubmit='return false;') form.reply(onsubmit='return false;')
input(type='hidden' value=entry.ID name='entry_id') input(type='hidden' value=entry.ID name='entry_id')