Missed a spot.

Push more session parameter shortenings.
Remove some unneccesary indentations.
This commit is contained in:
Azareal 2019-09-30 20:23:59 +10:00
parent 764b9904f1
commit 85b0522955
17 changed files with 269 additions and 270 deletions

View File

@ -1,10 +1,10 @@
<form id="avatar_form" action="/user/edit/avatar/submit/?session={{.CurrentUser.Session}}" method="post" enctype="multipart/form-data"></form>
<form id="avatar_form" action="/user/edit/avatar/submit/?s={{.CurrentUser.Session}}" method="post" enctype="multipart/form-data"></form>
<div class="coldyn_block">
<div id="dash_left" class="coldyn_item">
<div class="rowitem">
<span id="dash_username">
<form id="dash_username_form" action="/user/edit/username/submit/?session={{.CurrentUser.Session}}" method="post"></form>
<form id="revoke_avatar_form" action="/user/edit/avatar/revoke/submit/?session={{.CurrentUser.Session}}" method="post"></form>
<form id="dash_username_form" action="/user/edit/username/submit/?s={{.CurrentUser.Session}}" method="post"></form>
<form id="revoke_avatar_form" action="/user/edit/avatar/revoke/submit/?s={{.CurrentUser.Session}}" method="post"></form>
<input form="dash_username_form" name="account-new-username" value="{{.CurrentUser.Name}}" />
<button form="dash_username_form" class="formbutton">{{lang "account_username_save"}}</button>
</span>

View File

@ -6,7 +6,7 @@
<div class="rowitem"><h1>{{lang "account_mfa_head"}}</h1></div>
</div>
<div class="colstack_item the_form">
<form action="/user/edit/mfa/disable/submit/?session={{.CurrentUser.Session}}" method="post">
<form action="/user/edit/mfa/disable/submit/?s={{.CurrentUser.Session}}" method="post">
<div class="formrow real_first_child">
<div class="formitem formlabel"><a>{{lang "account_mfa_disable_explanation"}}</a></div>
<div class="formitem"><button class="formbutton">{{lang "account_mfa_disable_button"}}</button></div>
@ -17,7 +17,7 @@
<div class="rowitem"><h1>{{lang "account_mfa_scratch_head"}}</h1></div>
</div>
<div class="colstack_item">{{/** TODO: Don't inline this, figure a way of implementing it properly in the template system **/}}
<div class="rowitem rowmsg" style="white-space: pre-wrap;">{{lang "account_mfa_scratch_explanation"}}</div>
<div class="rowitem rowmsg" style="white-space:pre-wrap;">{{lang "account_mfa_scratch_explanation"}}</div>
</div>
<div id="panel_mfa_scratches" class="colstack_item rowlist">
{{range .Something}}

View File

@ -6,7 +6,7 @@
<div class="rowitem"><h1>{{lang "account_mfa_setup_head"}}</h1></div>
</div>
<div class="colstack_item the_form">
<form action="/user/edit/mfa/setup/submit/?session={{.CurrentUser.Session}}" method="post">
<form action="/user/edit/mfa/setup/submit/?s={{.CurrentUser.Session}}" method="post">
<input name="code" value="{{.Something}}" type="hidden" />
<div class="formrow real_first_child">
<div class="formitem formlabel"><a>{{lang "account_mfa_setup_explanation"}}</a></div>

View File

@ -6,7 +6,7 @@
<div class="rowitem"><h1>{{lang "account_password_head"}}</h1></div>
</div>
<div class="colstack_item the_form">
<form action="/user/edit/password/submit/?session={{.CurrentUser.Session}}" method="post">
<form action="/user/edit/password/submit/?s={{.CurrentUser.Session}}" method="post">
<div class="formrow real_first_child">
<div class="formitem formlabel"><a>{{lang "account_password_current_password"}}</a></div>
<div class="formitem"><input name="account-current-password" type="password" placeholder="*****" autocomplete="current-password" required /></div>

View File

@ -5,7 +5,7 @@
</div>
<div class="rowblock">
<div class="rowitem passive rowmsg">{{.Something.Message}}<br /><br />
<a class="username" href="{{.Something.URL}}?session={{.CurrentUser.Session}}">{{lang "areyousure_continue"}}</a>
<a class="username" href="{{.Something.URL}}?s={{.CurrentUser.Session}}">{{lang "areyousure_continue"}}</a>
</div>
</div>
</main>

View File

@ -8,9 +8,9 @@
</div>
<div class="colstack_item">
<div class="rowitem passive rowmsg">{{.Something.Message}}<br /><br />
<a class="username" href="{{.Something.URL}}?session={{.CurrentUser.Session}}">{{lang "areyousure_continue"}}</a>
<a class="username" href="{{.Something.URL}}?s={{.CurrentUser.Session}}">{{lang "areyousure_continue"}}</a>
</div>
</div>
</main>
</div>
{{template "footer.html" . }}
{{template "footer.html" . }}

View File

@ -1,60 +1,60 @@
<div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{.Name}}{{lang "panel_forum_head_suffix"}}</h1></div>
<div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{.Name}}{{lang "panel_forum_head_suffix"}}</h1></div>
</div>
<div id="panel_forum" class="colstack_item the_form">
<form action="/panel/forums/edit/submit/{{.ID}}?s={{.CurrentUser.Session}}" method="post">
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_forum_name"}}</a></div>
<div class="formitem"><input name="forum_name" type="text" value="{{.Name}}" placeholder="{{lang "panel_forum_name_placeholder"}}" /></div>
</div>
<div id="panel_forum" class="colstack_item the_form">
<form action="/panel/forums/edit/submit/{{.ID}}?session={{.CurrentUser.Session}}" method="post">
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_forum_name"}}</a></div>
<div class="formitem"><input name="forum_name" type="text" value="{{.Name}}" placeholder="{{lang "panel_forum_name_placeholder"}}" /></div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_forum_description"}}</a></div>
<div class="formitem"><input name="forum_desc" type="text" value="{{.Desc}}" placeholder="{{lang "panel_forum_description_placeholder"}}" /></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_forum_active"}}</a></div>
<div class="formitem"><select name="forum_active">
<option{{if .Active}} selected{{end}} value="1">{{lang "option_yes"}}</option>
<option{{if not .Active}} selected{{end}} value="0">{{lang "option_no"}}</option>
</select></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_forum_preset"}}</a></div>
<div class="formitem">
<select name="forum_preset">
<option{{if eq .Preset "all"}} selected{{end}} value="all">{{lang "panel_preset_everyone"}}</option>
<option{{if eq .Preset "announce"}} selected{{end}} value="announce">{{lang "panel_preset_announcements"}}</option>
<option{{if eq .Preset "members"}} selected{{end}} value="members">{{lang "panel_preset_member_only"}}</option>
<option{{if eq .Preset "staff"}} selected{{end}} value="staff">{{lang "panel_preset_staff_only"}}</option>
<option{{if eq .Preset "admins"}} selected{{end}} value="admins">{{lang "panel_preset_admin_only"}}</option>
<option{{if eq .Preset "archive"}} selected{{end}} value="archive">{{lang "panel_preset_archive"}}</option>
<option{{if eq .Preset "custom"}} selected{{end}} value="custom">{{lang "panel_preset_custom"}}</option>
</select>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_forum_description"}}</a></div>
<div class="formitem"><input name="forum_desc" type="text" value="{{.Desc}}" placeholder="{{lang "panel_forum_description_placeholder"}}" /></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_forum_active"}}</a></div>
<div class="formitem"><select name="forum_active">
<option{{if .Active}} selected{{end}} value="1">{{lang "option_yes"}}</option>
<option{{if not .Active}} selected{{end}} value="0">{{lang "option_no"}}</option>
</select></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_forum_preset"}}</a></div>
<div class="formitem">
<select name="forum_preset">
<option{{if eq .Preset "all"}} selected{{end}} value="all">{{lang "panel_preset_everyone"}}</option>
<option{{if eq .Preset "announce"}} selected{{end}} value="announce">{{lang "panel_preset_announcements"}}</option>
<option{{if eq .Preset "members"}} selected{{end}} value="members">{{lang "panel_preset_member_only"}}</option>
<option{{if eq .Preset "staff"}} selected{{end}} value="staff">{{lang "panel_preset_staff_only"}}</option>
<option{{if eq .Preset "admins"}} selected{{end}} value="admins">{{lang "panel_preset_admin_only"}}</option>
<option{{if eq .Preset "archive"}} selected{{end}} value="archive">{{lang "panel_preset_archive"}}</option>
<option{{if eq .Preset "custom"}} selected{{end}} value="custom">{{lang "panel_preset_custom"}}</option>
</select>
</div>
<div class="formrow">
<div class="formitem"><button name="panel-button" class="formbutton form_middle_button">{{lang "panel_forum_update_button"}}</button></div>
</div>
</form>
</div>
<div class="colstack_item colstack_head">
<div class="rowitem">
<h1>{{lang "panel_forum_permissions_head"}}</h1>
</div>
</div>
<div id="forum_quick_perms" class="colstack_item rowlist formlist the_form">
{{range .Groups}}
<div class="formrow">
<div class="formitem editable_parent">
<a>{{.Group.Name}}</a>
<input name="gid" value="{{.Group.ID}}" type="hidden" class="editable_block" data-field="gid" data-type="hidden" data-value="{{.Group.ID}}" />
<span class="edit_fields hide_on_edit rowsmall">{{lang "panel_forum_edit_button"}}</span>
<div class="panel_floater">
<span data-field="perm_preset" data-type="list" data-value="{{.Preset}}" class="editable_block perm_preset perm_preset_{{.Preset}}"></span>
<a class="panel_right_button has_inner_button show_on_edit" href="/panel/forums/edit/perms/submit/{{$.ID}}"><button class='panel_tag submit_edit' type='submit'>{{lang "panel_forum_short_update_button"}}</button></a>
<a class="panel_right_button has_inner_button show_on_edit" href="/panel/forums/edit/perms/{{$.ID}}-{{.Group.ID}}"><button class='panel_tag' type='submit'>{{lang "panel_forum_full_edit_button"}}</button></a>
</div>
</div>
<div class="formrow">
<div class="formitem"><button name="panel-button" class="formbutton form_middle_button">{{lang "panel_forum_update_button"}}</button></div>
</div>
</form>
</div>
<div class="colstack_item colstack_head">
<div class="rowitem">
<h1>{{lang "panel_forum_permissions_head"}}</h1>
</div>
</div>
<div id="forum_quick_perms" class="colstack_item rowlist formlist the_form">
{{range .Groups}}
<div class="formrow">
<div class="formitem editable_parent">
<a>{{.Group.Name}}</a>
<input name="gid" value="{{.Group.ID}}" type="hidden" class="editable_block" data-field="gid" data-type="hidden" data-value="{{.Group.ID}}" />
<span class="edit_fields hide_on_edit rowsmall">{{lang "panel_forum_edit_button"}}</span>
<div class="panel_floater">
<span data-field="perm_preset" data-type="list" data-value="{{.Preset}}" class="editable_block perm_preset perm_preset_{{.Preset}}"></span>
<a class="panel_right_button has_inner_button show_on_edit" href="/panel/forums/edit/perms/submit/{{$.ID}}"><button class='panel_tag submit_edit' type='submit'>{{lang "panel_forum_short_update_button"}}</button></a>
<a class="panel_right_button has_inner_button show_on_edit" href="/panel/forums/edit/perms/{{$.ID}}-{{.Group.ID}}"><button class='panel_tag' type='submit'>{{lang "panel_forum_full_edit_button"}}</button></a>
</div>
</div>
</div>
{{end}}
</div>
{{end}}
</div>

View File

@ -1,23 +1,22 @@
<div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{.Name}}{{lang "panel_forum_head_suffix"}}</h1></div>
</div>
<form action="/panel/forums/edit/perms/adv/submit/{{.ForumID}}-{{.GroupID}}?session={{.CurrentUser.Session}}" method="post">
<div class="colstack_item rowlist formlist the_form panel_forum_perms">
{{range .Perms}}
<div class="formrow">
<div class="formitem">
<a>{{.LangStr}}</a>
<div class="to_right">
<select name="forum-perm-{{.Name}}">
<option{{if .Toggle}} selected{{end}} value=1>{{lang "option_yes"}}</option>
<option{{if not .Toggle}} selected{{end}} value=0>{{lang "option_no"}}</option>
</select>
</div>
<div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{.Name}}{{lang "panel_forum_head_suffix"}}</h1></div>
</div>
<form action="/panel/forums/edit/perms/adv/submit/{{.ForumID}}-{{.GroupID}}?s={{.CurrentUser.Session}}" method="post">
<div class="colstack_item rowlist formlist the_form panel_forum_perms">
{{range .Perms}}
<div class="formrow">
<div class="formitem">
<a>{{.LangStr}}</a>
<div class="to_right">
<select name="forum-perm-{{.Name}}">
<option{{if .Toggle}} selected{{end}} value=1>{{lang "option_yes"}}</option>
<option{{if not .Toggle}} selected{{end}} value=0>{{lang "option_no"}}</option>
</select>
</div>
</div>
{{end}}
<div class="formrow">
<div class="formitem"><button name="panel-button" class="formbutton form_middle_button">{{lang "panel_forum_update_button"}}</button></div>
</div>
</div>{{end}}
<div class="formrow">
<div class="formitem"><button name="panel-button" class="formbutton form_middle_button">{{lang "panel_forum_update_button"}}</button></div>
</div>
</form>
</div>
</form>

View File

@ -1,69 +1,69 @@
<div class="colstack_item colstack_head">
<div class="rowitem">
<h1>{{lang "panel.forums_head"}}</h1>
<h2 class="hguide">{{lang "panel_hints_reorder"}}</h2>
</div>
<div class="colstack_item colstack_head">
<div class="rowitem">
<h1>{{lang "panel.forums_head"}}</h1>
<h2 class="hguide">{{lang "panel_hints_reorder"}}</h2>
</div>
<div id="panel_forums" class="colstack_item rowlist">
{{range .ItemList}}
<div data-fid="{{.ID}}" class="rowitem editable_parent panel_forum_item{{if not .Desc}} forum_no_desc{{end}}">
<span class="grip"></span>
<span id="panel_forums_left_box">
{{/** TODO: Make sure the forum_active_name class is set and unset when the activity status of this forum is changed **/}}
<a data-field="forum_name" data-type="text" class="editable_block forum_name{{if not .Active}} forum_active_name{{end}}">{{.Name}}</a>
<br /><span data-field="forum_desc" data-type="text" class="editable_block forum_desc rowsmall">{{.Desc}}</span>
</span>
<span class="panel_floater">
<span data-field="forum_active" data-type="list" class="panel_tag editable_block forum_active forum_active_{{if .Active}}Show" data-value="1{{else}}Hide" data-value="0{{end}}" title="{{lang "panel.forums_hidden"}}"></span>
<span data-field="forum_preset" data-type="list" data-value="{{.Preset}}" class="panel_tag editable_block forum_preset forum_preset_{{.Preset}}" title="{{.PresetLang}}"></span>
</span>
<span class="panel_buttons">
<a class="panel_tag edit_fields hide_on_edit panel_right_button edit_button" title="{{lang "panel.forums_edit_button_tooltip"}}" aria-label="{{lang "panel.forums_edit_button_aria"}}"></a>
<a class="panel_right_button has_inner_button show_on_edit" href="/panel/forums/edit/submit/{{.ID}}"><button class='panel_tag submit_edit' type='submit'>{{lang "panel.forums_update_button"}}</button></a>
{{if gt .ID 1}}<a href="/panel/forums/delete/{{.ID}}?session={{$.CurrentUser.Session}}" class="panel_tag panel_right_button hide_on_edit delete_button" title="{{lang "panel.forums_delete_button_tooltip"}}" aria-label="{{lang "panel.forums_delete_button_aria"}}"></a>{{end}}
<a href="/panel/forums/edit/{{.ID}}" class="panel_tag panel_right_button has_inner_button show_on_edit"><button>{{lang "panel.forums_full_edit_button"}}</button></a>
</span>
</div>
{{end}}
</div>
<div class="colstack_item rowlist panel_submitrow">
<div class="rowitem"><button id="panel_forums_order_button" class="formbutton">{{lang "panel.forums_update_order_button"}}</button></div>
</div>
<div id="panel_forums" class="colstack_item rowlist">
{{range .ItemList}}
<div data-fid="{{.ID}}" class="rowitem editable_parent panel_forum_item{{if not .Desc}} forum_no_desc{{end}}">
<span class="grip"></span>
<span id="panel_forums_left_box">
{{/** TODO: Make sure the forum_active_name class is set and unset when the activity status of this forum is changed **/}}
<a data-field="forum_name" data-type="text" class="editable_block forum_name{{if not .Active}} forum_active_name{{end}}">{{.Name}}</a>
<br /><span data-field="forum_desc" data-type="text" class="editable_block forum_desc rowsmall">{{.Desc}}</span>
</span>
<span class="panel_floater">
<span data-field="forum_active" data-type="list" class="panel_tag editable_block forum_active forum_active_{{if .Active}}Show" data-value="1{{else}}Hide" data-value="0{{end}}" title="{{lang "panel.forums_hidden"}}"></span>
<span data-field="forum_preset" data-type="list" data-value="{{.Preset}}" class="panel_tag editable_block forum_preset forum_preset_{{.Preset}}" title="{{.PresetLang}}"></span>
</span>
<span class="panel_buttons">
<a class="panel_tag edit_fields hide_on_edit panel_right_button edit_button" title="{{lang "panel.forums_edit_button_tooltip"}}" aria-label="{{lang "panel.forums_edit_button_aria"}}"></a>
<a class="panel_right_button has_inner_button show_on_edit" href="/panel/forums/edit/submit/{{.ID}}"><button class='panel_tag submit_edit' type='submit'>{{lang "panel.forums_update_button"}}</button></a>
{{if gt .ID 1}}<a href="/panel/forums/delete/{{.ID}}?s={{$.CurrentUser.Session}}" class="panel_tag panel_right_button hide_on_edit delete_button" title="{{lang "panel.forums_delete_button_tooltip"}}" aria-label="{{lang "panel.forums_delete_button_aria"}}"></a>{{end}}
<a href="/panel/forums/edit/{{.ID}}" class="panel_tag panel_right_button has_inner_button show_on_edit"><button>{{lang "panel.forums_full_edit_button"}}</button></a>
</span>
</div>
{{end}}
</div>
<div class="colstack_item rowlist panel_submitrow">
<div class="rowitem"><button id="panel_forums_order_button" class="formbutton">{{lang "panel.forums_update_order_button"}}</button></div>
</div>
<div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{lang "panel.forums_create_head"}}</h1></div>
</div>
<div class="colstack_item the_form">
<form action="/panel/forums/create/?session={{.CurrentUser.Session}}" method="post">
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel.forums_create_name_label"}}</a></div>
<div class="formitem"><input name="forum-name" type="text" placeholder="{{lang "panel.forums_create_name"}}" /></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel.forums_create_description_label"}}</a></div>
<div class="formitem"><input name="forum-desc" type="text" placeholder="{{lang "panel.forums_create_description"}}" /></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel.forums_active_label"}}</a></div>
<div class="formitem"><select name="forum-active">
<option selected value="1">{{lang "option_yes"}}</option>
<option value="0">{{lang "option_no"}}</option>
</select></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel.forums_preset_label"}}</a></div>
<div class="formitem"><select name="forum-preset">
<option selected value="all">{{lang "panel_preset_everyone"}}</option>
<option value="announce">{{lang "panel_preset_announcements"}}</option>
<option value="members">{{lang "panel_preset_member_only"}}</option>
<option value="staff">{{lang "panel_preset_staff_only"}}</option>
<option value="admins">{{lang "panel_preset_admin_only"}}</option>
<option value="archive">{{lang "panel_preset_archive"}}</option>
<option value="custom">{{lang "panel_preset_custom"}}</option>
</select></div>
</div>
<div class="formrow">
<div class="formitem"><button name="panel-button" class="formbutton">{{lang "panel.forums_create_button"}}</button></div>
</div>
</form>
</div>
<div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{lang "panel.forums_create_head"}}</h1></div>
</div>
<div class="colstack_item the_form">
<form action="/panel/forums/create/?s={{.CurrentUser.Session}}" method="post">
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel.forums_create_name_label"}}</a></div>
<div class="formitem"><input name="forum-name" type="text" placeholder="{{lang "panel.forums_create_name"}}" /></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel.forums_create_description_label"}}</a></div>
<div class="formitem"><input name="forum-desc" type="text" placeholder="{{lang "panel.forums_create_description"}}" /></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel.forums_active_label"}}</a></div>
<div class="formitem"><select name="forum-active">
<option selected value="1">{{lang "option_yes"}}</option>
<option value="0">{{lang "option_no"}}</option>
</select></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel.forums_preset_label"}}</a></div>
<div class="formitem"><select name="forum-preset">
<option selected value="all">{{lang "panel_preset_everyone"}}</option>
<option value="announce">{{lang "panel_preset_announcements"}}</option>
<option value="members">{{lang "panel_preset_member_only"}}</option>
<option value="staff">{{lang "panel_preset_staff_only"}}</option>
<option value="admins">{{lang "panel_preset_admin_only"}}</option>
<option value="archive">{{lang "panel_preset_archive"}}</option>
<option value="custom">{{lang "panel_preset_custom"}}</option>
</select></div>
</div>
<div class="formrow">
<div class="formitem"><button name="panel-button" class="formbutton">{{lang "panel.forums_create_button"}}</button></div>
</div>
</form>
</div>

View File

@ -1,49 +1,49 @@
<div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{lang "panel_groups_head"}}</h1></div>
</div>
<div id="panel_groups" class="colstack_item rowlist">
{{range .ItemList}}
<div class="rowitem panel_compactrow editable_parent">
<a{{if .CanEdit}} href="/panel/groups/edit/{{.ID}}"{{end}} class="panel_upshift">{{.Name}}</a>
<span class="panel_floater">
{{if .RankClass}}<a class="panel_tag panel_rank_tag panel_rank_tag_{{.RankClass}}" title="{{.Rank}}" aria-label="{{lang "panel_groups_rank_prefix"}}{{.Rank}}"></a>
{{else}}<span class="panel_tag">{{.Rank}}</span>{{end}}
<div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{lang "panel_groups_head"}}</h1></div>
</div>
<div id="panel_groups" class="colstack_item rowlist">
{{range .ItemList}}
<div class="rowitem panel_compactrow editable_parent">
<a{{if .CanEdit}} href="/panel/groups/edit/{{.ID}}"{{end}} class="panel_upshift">{{.Name}}</a>
<span class="panel_floater">
{{if .RankClass}}<a class="panel_tag panel_rank_tag panel_rank_tag_{{.RankClass}}" title="{{.Rank}}" aria-label="{{lang "panel_groups_rank_prefix"}}{{.Rank}}"></a>
{{else}}<span class="panel_tag">{{.Rank}}</span>{{end}}
{{if .CanEdit}}<a href="/panel/groups/edit/{{.ID}}" class="panel_tag panel_right_button edit_button" aria-label="{{lang "panel_groups_edit_group_button_aria"}}"></a>{{end}}
</span>
</div>
{{end}}
{{if .CanEdit}}<a href="/panel/groups/edit/{{.ID}}" class="panel_tag panel_right_button edit_button" aria-label="{{lang "panel_groups_edit_group_button_aria"}}"></a>{{end}}
</span>
</div>
{{template "paginator.html" . }}
{{end}}
</div>
{{template "paginator.html" . }}
{{if .CurrentUser.Perms.EditGroup}}
<div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{lang "panel_groups_create_head"}}</h1></div>
</div>
<div class="colstack_item the_form">
<form action="/panel/groups/create/?session={{.CurrentUser.Session}}" method="post">
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_groups_create_name"}}</a></div>
<div class="formitem"><input name="group-name" type="text" placeholder="{{lang "panel_groups_create_name_placeholder"}}" /></div>
{{if .CurrentUser.Perms.EditGroup}}
<div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{lang "panel_groups_create_head"}}</h1></div>
</div>
<div class="colstack_item the_form">
<form action="/panel/groups/create/?s={{.CurrentUser.Session}}" method="post">
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_groups_create_name"}}</a></div>
<div class="formitem"><input name="group-name" type="text" placeholder="{{lang "panel_groups_create_name_placeholder"}}" /></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_groups_create_type"}}</a></div>
<div class="formitem">
<select name="group-type"{{if not .CurrentUser.Perms.EditGroupGlobalPerms}} disabled{{end}}>
<option selected>Member</option>
<option{{if not .CurrentUser.Perms.EditGroupSuperMod}} disabled{{end}}>Mod</option>
<option{{if not .CurrentUser.Perms.EditGroupAdmin}} disabled{{end}}>Admin</option>
<option>Banned</option>
</select>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_groups_create_type"}}</a></div>
<div class="formitem">
<select name="group-type"{{if not .CurrentUser.Perms.EditGroupGlobalPerms}} disabled{{end}}>
<option selected>Member</option>
<option{{if not .CurrentUser.Perms.EditGroupSuperMod}} disabled{{end}}>Mod</option>
<option{{if not .CurrentUser.Perms.EditGroupAdmin}} disabled{{end}}>Admin</option>
<option>Banned</option>
</select>
</div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_groups_create_tag"}}</a></div>
<div class="formitem"><input name="group-tag" type="text" /></div>
</div>
<div class="formrow form_button_row">
<div class="formitem"><button name="panel-button" class="formbutton">{{lang "panel_groups_create_create_group_button"}}</button></div>
</div>
</form>
</div>
{{end}}
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_groups_create_tag"}}</a></div>
<div class="formitem"><input name="group-tag" type="text" /></div>
</div>
<div class="formrow form_button_row">
<div class="formitem"><button name="panel-button" class="formbutton">{{lang "panel_groups_create_button"}}</button></div>
</div>
</form>
</div>
{{end}}

View File

@ -36,7 +36,7 @@
</div>
</div>
<div class="formrow">
<div class="formitem"><button name="panel-button" class="formbutton form_middle_button">{{lang "panel_pages_create_submit_button"}}</button></div>
<div class="formitem"><button name="panel-button" class="formbutton form_middle_button">{{lang "panel_pages_create_button"}}</button></div>
</div>
</form>
</div>

View File

@ -5,16 +5,16 @@
{{range .ItemList}}
<div class="rowitem editable_parent">
<span class="panel_plugin_meta">
<a {{if .URL}}href="{{.URL}}" {{end}}class="editable_block" class="panel_upshift">{{.Name}}</a><br />
<small style="margin-left: 2px;">{{lang "panel_plugins_author_prefix"}}{{.Author}}</small>
<a{{if .URL}} href="{{.URL}}" {{end}}class="editable_block" class="panel_upshift">{{.Name}}</a><br />
<small style="margin-left:2px;">{{lang "panel_plugins_author_prefix"}}{{.Author}}</small>
</span>
<span class="to_right">
{{if .Settings}}<a href="/panel/settings/" class="panel_tag panel_plugin_settings panel_right_button">{{lang "panel_plugins_settings"}}</a>{{end}}
{{if .Active}}<a href="/panel/plugins/deactivate/{{.UName}}?session={{$.CurrentUser.Session}}" class="panel_tag panel_plugin_deactivate panel_right_button">{{lang "panel_plugins_deactivate"}}</a>
{{if .Active}}<a href="/panel/plugins/deactivate/{{.UName}}?s={{$.CurrentUser.Session}}" class="panel_tag panel_plugin_deactivate panel_right_button">{{lang "panel_plugins_deactivate"}}</a>
{{else if .Installable}}
{{/** TODO: Write a custom template interpreter to fix this nonsense **/}}
{{if .Installed}}<a href="/panel/plugins/activate/{{.UName}}?session={{$.CurrentUser.Session}}" class="panel_tag panel_plugin_activate panel_right_button">{{lang "panel_plugins_activate"}}</a>{{else}}<a href="/panel/plugins/install/{{.UName}}?session={{$.CurrentUser.Session}}" class="panel_tag panel_plugin_install panel_right_button">{{lang "panel_plugins_install"}}</a>{{end}}
{{else}}<a href="/panel/plugins/activate/{{.UName}}?session={{$.CurrentUser.Session}}" class="panel_tag panel_plugin_activate panel_right_button">{{lang "panel_plugins_activate"}}</a>{{end}}
{{if .Installed}}<a href="/panel/plugins/activate/{{.UName}}?s={{$.CurrentUser.Session}}" class="panel_tag panel_plugin_activate panel_right_button">{{lang "panel_plugins_activate"}}</a>{{else}}<a href="/panel/plugins/install/{{.UName}}?s={{$.CurrentUser.Session}}" class="panel_tag panel_plugin_install panel_right_button">{{lang "panel_plugins_install"}}</a>{{end}}
{{else}}<a href="/panel/plugins/activate/{{.UName}}?s={{$.CurrentUser.Session}}" class="panel_tag panel_plugin_activate panel_right_button">{{lang "panel_plugins_activate"}}</a>{{end}}
</span>
</div>
{{end}}

View File

@ -11,7 +11,7 @@
<span class="panel_floater">
{{if .MobileFriendly}}<span class="panel_tag panel_theme_mobile" title="{{lang "panel_themes_mobile_friendly_tooltip"}}" aria-label="{{lang "panel_themes_mobile_friendly_aria"}}">📱</span>{{end}}
{{if .Tag}}<span class="panel_tag panel_theme_tag">{{.Tag}}</span>{{end}}
{{if .Active}}<span class="panel_tag panel_right_button">{{lang "panel_themes_default"}}</span>{{else}}<a href="/panel/themes/default/{{.Name}}?session={{$.CurrentUser.Session}}" class="panel_tag panel_right_button">{{lang "panel_themes_make_default"}}</a>{{end}}
{{if .Active}}<span class="panel_tag panel_right_button">{{lang "panel_themes_default"}}</span>{{else}}<a href="/panel/themes/default/{{.Name}}?s={{$.CurrentUser.Session}}" class="panel_tag panel_right_button">{{lang "panel_themes_make_default"}}</a>{{end}}
</span>
</div>
{{end}}
@ -23,14 +23,14 @@
<div id="panel_variant_themes" class="colstack_item panel_themes">
{{range .VariantThemes}}
<div class="theme_row rowitem editable_parent"{{if .FullImage}} style="background-image:url('/s/{{.FullImage}}');background-position:center;background-size:50%;background-repeat:no-repeat;"{{end}}>
<span style="float: left;">
<span style="float:left;">
<a href="/panel/themes/{{.Name}}" class="editable_block" style="font-size:17px;">{{.FriendlyName}}</a><br />
<small class="panel_theme_author" style="margin-left:2px;">{{lang "panel_themes_author_prefix"}}<a href="//{{.URL}}">{{.Creator}}</a></small>
</span>
<span class="panel_floater">
{{if .MobileFriendly}}<span class="panel_tag panel_theme_mobile" title="{{lang "panel_themes_mobile_friendly_tooltip"}}" aria-label="{{lang "panel_themes_mobile_friendly_aria"}}">📱</span>{{end}}
{{if .Tag}}<span class="panel_tag panel_theme_tag">{{.Tag}}</span>{{end}}
{{if .Active}}<span class="panel_tag panel_right_button">{{lang "panel_themes_default"}}</span>{{else}}<a href="/panel/themes/default/{{.Name}}?session={{$.CurrentUser.Session}}" class="panel_tag panel_right_button">{{lang "panel_themes_make_default"}}</a>{{end}}
{{if .Active}}<span class="panel_tag panel_right_button">{{lang "panel_themes_default"}}</span>{{else}}<a href="/panel/themes/default/{{.Name}}?s={{$.CurrentUser.Session}}" class="panel_tag panel_right_button">{{lang "panel_themes_make_default"}}</a>{{end}}
</span>
</div>
{{end}}

View File

@ -1,62 +1,62 @@
{{/** TODO: Set the order based on the order here **/}}
{{/** TODO: Write the backend code and JS code for saving this menu **/}}
<div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{lang "panel_themes_menus_edit_head"}}</h1></div>
</div>
<form action="/panel/themes/menus/item/edit/submit/{{.Item.ID}}?session={{.CurrentUser.Session}}" method="post">
<div id="panel_themes_menu_item_edit" class="colstack_item the_form">
{{/** TODO: Let an admin move a menu item from one menu to another? **/}}
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_themes_menus_name"}}</a></div>
<div class="formitem"><input name="item-name" type="text" value="{{.Item.Name}}" /></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_themes_menus_htmlid"}}</a></div>
<div class="formitem"><input name="item-htmlid" type="text" value="{{.Item.HTMLID}}" /></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_themes_menus_cssclass"}}</a></div>
<div class="formitem"><input name="item-cssclass" type="text" value="{{.Item.CSSClass}}" /></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_themes_menus_position"}}</a></div>
<div class="formitem">
<select name="item-position">
<option{{if eq .Item.Position "left"}} selected{{end}} value="left">left</option>
<option{{if eq .Item.Position "right"}} selected{{end}} value="right">right</option>
</select>
</div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_themes_menus_path"}}</a></div>
<div class="formitem"><input name="item-path" type="text" value="{{.Item.Path}}" /></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_themes_menus_aria"}}</a></div>
<div class="formitem"><input name="item-aria" type="text" value="{{.Item.Aria}}" /></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_themes_menus_tooltip"}}</a></div>
<div class="formitem"><input name="item-tooltip" type="text" value="{{.Item.Tooltip}}" /></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_themes_menus_tmplname"}}</a></div>
<div class="formitem"><input name="item-tmplname" type="text" value="{{.Item.TmplName}}" /></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_themes_menus_permissions"}}</a></div>
<div class="formitem"><select name="item-permissions">
<option value="everyone">{{lang "panel_themes_menus_everyone" }}</option>
<option{{if .Item.GuestOnly}} selected{{end}} value="guest-only">{{lang "panel_themes_menus_guestonly"}}</option>
<option{{if .Item.MemberOnly}} selected{{end}} value="member-only">{{lang "panel_themes_menus_memberonly"}}</option>
<option{{if .Item.SuperModOnly}} selected{{end}} value="supermod-only">{{lang "panel_themes_menus_supermodonly"}}</option>
<option{{if .Item.AdminOnly}} selected{{end}} value="admin-only">{{lang "panel_themes_menus_adminonly"}}</option>
</select></div>
</div>
<div class="formrow">
<div class="formitem">
<button name="panel-button" class="formbutton">{{lang "panel_themes_menus_edit_update_button"}}</button>
</div>
<div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{lang "panel_themes_menus_edit_head"}}</h1></div>
</div>
<form action="/panel/themes/menus/item/edit/submit/{{.Item.ID}}?s={{.CurrentUser.Session}}" method="post">
<div id="panel_themes_menu_item_edit" class="colstack_item the_form">
{{/** TODO: Let an admin move a menu item from one menu to another? **/}}
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_themes_menus_name"}}</a></div>
<div class="formitem"><input name="item-name" type="text" value="{{.Item.Name}}" /></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_themes_menus_htmlid"}}</a></div>
<div class="formitem"><input name="item-htmlid" type="text" value="{{.Item.HTMLID}}" /></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_themes_menus_cssclass"}}</a></div>
<div class="formitem"><input name="item-cssclass" type="text" value="{{.Item.CSSClass}}" /></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_themes_menus_position"}}</a></div>
<div class="formitem">
<select name="item-position">
<option{{if eq .Item.Position "left"}} selected{{end}} value="left">left</option>
<option{{if eq .Item.Position "right"}} selected{{end}} value="right">right</option>
</select>
</div>
</div>
</form>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_themes_menus_path"}}</a></div>
<div class="formitem"><input name="item-path" type="text" value="{{.Item.Path}}" /></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_themes_menus_aria"}}</a></div>
<div class="formitem"><input name="item-aria" type="text" value="{{.Item.Aria}}" /></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_themes_menus_tooltip"}}</a></div>
<div class="formitem"><input name="item-tooltip" type="text" value="{{.Item.Tooltip}}" /></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_themes_menus_tmplname"}}</a></div>
<div class="formitem"><input name="item-tmplname" type="text" value="{{.Item.TmplName}}" /></div>
</div>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_themes_menus_permissions"}}</a></div>
<div class="formitem"><select name="item-permissions">
<option value="everyone">{{lang "panel_themes_menus_everyone" }}</option>
<option{{if .Item.GuestOnly}} selected{{end}} value="guest-only">{{lang "panel_themes_menus_guestonly"}}</option>
<option{{if .Item.MemberOnly}} selected{{end}} value="member-only">{{lang "panel_themes_menus_memberonly"}}</option>
<option{{if .Item.SuperModOnly}} selected{{end}} value="supermod-only">{{lang "panel_themes_menus_supermodonly"}}</option>
<option{{if .Item.AdminOnly}} selected{{end}} value="admin-only">{{lang "panel_themes_menus_adminonly"}}</option>
</select></div>
</div>
<div class="formrow">
<div class="formitem">
<button name="panel-button" class="formbutton">{{lang "panel_themes_menus_edit_update_button"}}</button>
</div>
</div>
</div>
</form>

View File

@ -11,7 +11,7 @@
<a href="/panel/themes/menus/item/edit/{{.ID}}" class="editable_block panel_upshift">{{.Name}}</a>
<span class="panel_buttons">
<a href="/panel/themes/menus/item/edit/{{.ID}}" class="panel_tag panel_right_button edit_button" aria-label="{{lang "panel_themes_menus_items_edit_button_aria"}}"></a>
<a href="/panel/themes/menus/item/delete/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="panel_tag panel_right_button delete_button" aria-label="{{lang "panel_themes_menus_items_delete_button_aria"}}"></a>
<a href="/panel/themes/menus/item/delete/submit/{{.ID}}?s={{$.CurrentUser.Session}}" class="panel_tag panel_right_button delete_button" aria-label="{{lang "panel_themes_menus_items_delete_button_aria"}}"></a>
</span>
</div>{{end}}
</div>
@ -21,7 +21,7 @@
<div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{lang "panel_themes_menus_create_head"}}</h1></div>
</div>
<form action="/panel/themes/menus/item/create/submit/?session={{.CurrentUser.Session}}" method="post">
<form action="/panel/themes/menus/item/create/submit/?s={{.CurrentUser.Session}}" method="post">
<input name="mid" value="{{.MenuID}}" type="hidden" />
<div id="panel_themes_menu_item_create" class="colstack_item the_form">
{{/** TODO: Let an admin move a menu item from one menu to another? **/}}

View File

@ -18,7 +18,7 @@ type Widget struct {
</div>
<div id="panel_widgets_{{$name}}" class="colstack_item rowlist panel_widgets">
{{range $widget := $dock}}
<div id="widget_{{$widget.ID}}" class="rowitem panel_compactrow editable_parent widget_item {{if not .Enabled}}bg_red{{end}}">
<div id="widget_{{$widget.ID}}" class="rowitem panel_compactrow editable_parent widget_item{{if not .Enabled}} bg_red{{end}}">
<div class="widget_normal editable_block hide_on_block_edit">
<a href="/panel/themes/widgets/edit/{{$widget.ID}}" class="panel_upshift">{{$widget.Type}} <span class="widget_disabled">({{lang "panel_themes_widgets_disabled"}})</span></a>
<a class="panel_compacttext to_right">{{$widget.Location}}</a>
@ -44,7 +44,7 @@ type Widget struct {
</div>
<div class="widget_edit show_on_block_edit">
<form action="/panel/themes/widgets/create/submit/" method="post">
<input name="session" value="{{.CurrentUser.Session}}" type="hidden" />
<input name="s" value="{{.CurrentUser.Session}}" type="hidden" />
<input class="wside" name="wside" value="" type="hidden" />
{{template "panel_themes_widgets_widget.html" .BlankWidget }}
</form>

View File

@ -2,9 +2,9 @@
<div class="rowitem"><h1>{{lang "panel_user_head"}}</h1></div>
</div>
<div id="panel_user" class="colstack_item the_form">
<form id="user_form" action="/panel/users/edit/submit/{{.Something.ID}}?session={{.CurrentUser.Session}}" method="post"></form>
<form id="avatar_form" enctype="multipart/form-data" action="/panel/users/avatar/submit/{{.Something.ID}}?session={{.CurrentUser.Session}}" method="post"></form>
<form id="remove_avatar_form" action="/panel/users/avatar/remove/submit/{{.Something.ID}}?session={{.CurrentUser.Session}}" method="post"></form>
<form id="user_form" action="/panel/users/edit/submit/{{.Something.ID}}?s={{.CurrentUser.Session}}" method="post"></form>
<form id="avatar_form" enctype="multipart/form-data" action="/panel/users/avatar/submit/{{.Something.ID}}?s={{.CurrentUser.Session}}" method="post"></form>
<form id="remove_avatar_form" action="/panel/users/avatar/remove/submit/{{.Something.ID}}?s={{.CurrentUser.Session}}" method="post"></form>
<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_user_avatar"}}</a></div>
<div class="formitem avataritem">