[%- '.opt.from' | ml %]
[%- IF comment.editid -%]
[%- IF remote_opts.banned -%]
[%- IF journal.is_community -%]
[%- '.opt.bannedfrom.comm' | ml -%]
[%- ELSE -%]
[%- '.opt.bannedfrom' | ml -%]
[%- END -%]
[%- ELSE -%]
[%- dw.img( 'id_user', '' ) -%]
[%- '.opt.loggedin' | ml( username => remote.display_name ) -%]
[%- IF remote_opts.screened %]
[%- '.opt.willscreen' | ml -%]
[%- END -%]
[%- form.hidden( name = 'usertype', value = 'cookieuser' ) -%]
[%- form.hidden(
name = 'cookieuser'
id = 'cookieuser'
value = remote.user
) -%]
[%- END -%]
[%- ELSE -%][%# New comment, not editing. -%]
[%# Anonymous: -%]
[% dw.img( 'id_anonymous', '' ) %]
[% '.opt.anonymous' | ml %]
[%- IF public_entry AND journal.allows_anon -%]
[%- IF journal.screens_anon %]
[% '.opt.willscreen' | ml %]
[%- END -%]
[%- ELSE -%]
[%- IF ! public_entry %]
[% '.opt.noanonpost.nonpublic' | ml -%]
[%- ELSIF ! journal.allows_non_access -%]
[% ( journal.is_community ? '.opt.membersonly' : '.opt.friendsonly' )
| ml( username => "$journal.user" )
%]
[%- ELSE -%]
[% '.opt.noanonpost' | ml -%]
[%- END -%]
[%- END -%]
[%- IF remote.openid_identity AND default_usertype != 'openid' -%]
[%# ...then we're legit logged in as an OpenID user, not just holding a
temp $remote on a partial form submission (captcha, error, etc.) -%]
[% dw.img( 'id_openid', '' ) %]
[% '.opt.openid.loggedin' | ml %]
[% remote.display_name %]
[%- IF remote_opts.allowed -%]
[%- IF remote_opts.screened %] [% '.opt.willscreen' | ml -%][%- END -%]
[%- ELSE -%]
[%- IF remote_opts.banned -%][%# p. cut and dried -%]
[%- journal.is_community ?
'.opt.bannedfrom.comm' : '.opt.bannedfrom'
| ml( journal => journal.user ) -%]
[%- ELSIF journal.allows_non_access -%][%# your email's not validated. -%]
[%- '.opt.noopenidpost' | ml(
aopts1 => "href='${site.root}/changeemail'"
aopts2 => "href='${site.root}/register'"
) -%]
[%- ELSE -%][%# you're not on the access list -%]
[%- journal.is_community ?
'/talkpost_do.tt.error.notamember' : '/talkpost_do.tt.error.notafriend'
| ml( user => journal.user ) -%]
[%- END -%]
[%- END -%]
[%- IF remote_opts.can_manage_community -%]
[%- form.checkbox(
name = 'prop_admin_post'
id = 'prop_admin_post'
value = 1
selected = comment.admin_post
label = 'Admin Post'
) -%]
[%- END -%]
[%- ELSE -%][%# not logged in as openid user -%]
[% dw.img( 'id_openid', '' ) %]
[% '.opt.openid' | ml %]
[% help_icon( 'openid' ) %]
[%- IF journal.screens_all -%]
[%- '.opt.willscreen' | ml -%]
[%- ELSIF journal.screens_non_access -%]
[%- '.opt.willscreenfriend' | ml -%]
[%- ELSIF journal.screens_anon -%]
[%- '.opt.willscreenopenid' | ml -%]
[%- END -%]
[%- END -%]
[%- form.textbox(
name = 'oidurl'
id = 'oidurl'
label = dw.ml('.login.url')
size = 53
maxlength = 60
value = ( comment.oidurl || remote.openid_identity )
) -%]
[%- form.checkbox(
name = 'oiddo_login'
id = 'oidlogincheck'
label = dw.ml('.loginq')
selected = comment.oiddo_login
) -%]
[%# logged-in site user -%]
[%- IF remote && ! remote.openid_identity -%]
[% dw.img( 'id_user', '' ) %]
[% remote.display_name %]
[% '.opt.loggedin2' | ml %]
[%- IF remote_opts.allowed -%]
[%- IF remote_opts.screened -%] [%- '.opt.willscreen' | ml -%][%- END -%]
[%- ELSE -%]
[%- IF remote_opts.banned -%]
[%- journal.is_community ?
'.opt.bannedfrom.comm' : '.opt.bannedfrom'
| ml( journal => journal.user ) -%]
[%- ELSE -%][%# you're not on the access list -%]
[%- journal.is_community ?
'/talkpost_do.tt.error.notamember' : '/talkpost_do.tt.error.notafriend'
| ml( user => journal.user ) -%]
[%- END -%]
[%- END -%]
[%- UNLESS remote_opts.banned -%]
[%- END -%]
[%- IF remote_opts.can_manage_community -%]
[%- form.checkbox(
name = 'prop_admin_post'
id = 'prop_admin_post'
value = 1
selected = comment.admin_post
label = 'Admin Post'
) -%]
[%- END -%]
[%- END -%]
[%# not-logged-in site user -%]
[% dw.img( 'id_user', '' ) %]
[% IF remote && ! remote.openid_identity %] Other [%- END %]
[% '.opt.siteuser' | ml( sitename => site.nameshort ) %]
[%- IF journal.screens_all -%]
[%- '.opt.willscreen' | ml -%]
[%- ELSIF journal.screens_non_access -%]
[%- '.opt.willscreenfriend' | ml -%]
[%- END -%]
[%# site user login form, always present but sometimes hidden -%]
[%- form.textbox(
name = 'userpost'
id = 'username'
label = dw.ml('Username')
size = 13
maxlength = site.maxlength_user
value = comment.user
style = "background: url('${site.imgroot}/silk/identity/user.png') no-repeat; background-color: #fff; background-position: 0px 50%; padding-left: 18px; color: #00C; font-weight: bold;"
) -%]
[%- form.password(
name = 'password'
id= 'password'
label = dw.ml('Password')
maxlength = site.maxlength_pass
value = comment.password
size = 18
) -%]
[%- form.checkbox(
name = 'do_login'
id = 'logincheck'
label = dw.ml('.loginq')
selected = comment.do_login
) -%]
[%- IF ! create_link && ! remote -%]
[%- '.noaccount' | ml( aopts => "href='${site.root}/create'") -%]
[%- END -%]
[%- END -%][%# figuring out whether it's an edit or new reply. -%]
[%- current_icon = comment.current_icon;
current_icon_kw = comment.current_icon_kw;
focus_after_browse = "#body" -%]
[% INCLUDE "components/icon-select-icon.tt" IF remote %]
[% INCLUDE "components/icon-select-dropdown.tt" IF remote %]
[%# Subject, subjecticon, quote button %]
[%- form.textbox(
label = dw.ml( '.opt.subject2' )
labelclass = 'invisible'
size = 50
maxlength = 100
name = 'subject'
id = 'subject'
placeholder = dw.ml( '.opt.subject2' )
value = comment.subject
) -%]
[%- form.hidden(
id = 'subjectIconField'
name = 'subjecticon'
value = comment.subjecticon
) -%]
[%# The current subjecticon, as the button to open the menu. %]
[%- print_subjecticon_by_id(
comment.subjecticon,
"id='subjectIconImage' role='button' class='js-only' style='display: none;' title='Click to change the subject icon'"
) -%]
[%- form.textarea(
label = dw.ml( '.opt.message2' )
labelclass = 'invisible'
rows = 10
cols = 80
wrap = 'soft'
name = 'body'
id = 'body'
value = comment.body
) -%]
[%# Misc checkboxes, captcha, edit reason - after body, before post buttons %]