When editing a post, make name prepopulate. Capcode also, but the role will match the perms leve lof whoever edited the post e.g. if a Board Mod edits a post from Global staff, it will change the capcode role to Board Mod.

merge-requests/208/head
Thomas Lynch 4 years ago
parent 407611d3d9
commit e8daef745e
  1. 3
      views/pages/editpost.pug

@ -20,7 +20,8 @@ block content
include ../includes/posticons.pug
input.edit.post-subject(value=post.subject placeholder='Subject' type='text' name='subject' maxlength=globalLimits.fieldLength.subject)
input.edit.post-name(value=post.email type='text' name='email' placeholder='Email' maxlength=globalLimits.fieldLength.email)
input.edit.post-name(type='text' name='name' placeholder='Name' maxlength=globalLimits.fieldLength.name)
- const capcodeInput = post.capcode && post.capcode.length > 0 ? '## '+post.capcode.split(' ').slice(2) : '';
input.edit.post-name(type='text' name='name' placeholder='Name' maxlength=globalLimits.fieldLength.name value=post.name+capcodeInput)
if post.country && post.country.code
span(class=`flag flag-${post.country.code.toLowerCase()}` title=post.country.name alt=post.country.name)
|

Loading…
Cancel
Save