diff options
Diffstat (limited to 'client/html')
| -rw-r--r-- | client/html/login.tpl | 19 | ||||
| -rw-r--r-- | client/html/password_reset.tpl | 6 | ||||
| -rw-r--r-- | client/html/settings.tpl | 82 | ||||
| -rw-r--r-- | client/html/tag_delete.tpl | 6 | ||||
| -rw-r--r-- | client/html/user_delete.tpl | 6 | ||||
| -rw-r--r-- | client/html/user_edit.tpl | 44 | ||||
| -rw-r--r-- | client/html/user_registration.tpl | 27 |
7 files changed, 147 insertions, 43 deletions
diff --git a/client/html/login.tpl b/client/html/login.tpl index d9e0735..ec63e6c 100644 --- a/client/html/login.tpl +++ b/client/html/login.tpl @@ -4,13 +4,26 @@ <div class='input'> <ul> <li> - <%= ctx.makeTextInput({text: 'User name', id: 'user-name', name: 'name', required: true, pattern: ctx.userNamePattern}) %> + <%= ctx.makeTextInput({ + text: 'User name', + name: 'name', + required: true, + pattern: ctx.userNamePattern, + }) %> </li> <li> - <%= ctx.makePasswordInput({text: 'Password', id: 'user-password', name: 'password', required: true, pattern: ctx.passwordPattern}) %> + <%= ctx.makePasswordInput({ + text: 'Password', + name: 'password', + required: true, + pattern: ctx.passwordPattern, + }) %> </li> <li> - <%= ctx.makeCheckbox({text: 'Remember me', id: 'remember-user', name: 'remember-user'}) %> + <%= ctx.makeCheckbox({ + text: 'Remember me', + name: 'remember-user', + }) %> </li> </ul> </div> diff --git a/client/html/password_reset.tpl b/client/html/password_reset.tpl index 8169a2b..a4ccc7e 100644 --- a/client/html/password_reset.tpl +++ b/client/html/password_reset.tpl @@ -4,7 +4,11 @@ <div class='input'> <ul> <li> - <%= ctx.makeTextInput({text: 'User name or e-mail address', id: 'user-name', name: 'user-name', required: true}) %> + <%= ctx.makeTextInput({ + text: 'User name or e-mail address', + name: 'user-name', + required: true, + }) %> </li> </ul> </div> diff --git a/client/html/settings.tpl b/client/html/settings.tpl index 743d6cd..1f52489 100644 --- a/client/html/settings.tpl +++ b/client/html/settings.tpl @@ -2,32 +2,62 @@ <form> <strong>Browsing settings</strong> <p>These settings are saved to the browser's local storage and are not coupled to the user account, so they don't apply to other devices or browsers alike.</p> - <div class='input'> - <ul> - <li> - <%= ctx.makeCheckbox({text: 'Enable keyboard shortcuts', id: 'keyboard-shortcuts', name: 'keyboard-shortcuts', checked: ctx.browsingSettings.keyboardShortcuts}) %> - <a class='append icon' href='/help/keyboard'><i class='fa fa-question-circle-o'></i></a> - </li> - <li> - <%= ctx.makeNumericInput({text: 'Number of posts per page', id: 'posts-per-page', name: 'posts-per-page', checked: ctx.browsingSettings.postCount, min: 10, max: 100, value: ctx.browsingSettings.postsPerPage}) %> - </li> - <li> - <%= ctx.makeCheckbox({text: 'Upscale small posts', id: 'upscale-small-posts', name: 'upscale-small-posts', checked: ctx.browsingSettings.upscaleSmallPosts}) %> - </li> - <li> - <%= ctx.makeCheckbox({text: 'Endless scroll', id: 'endless-scroll', name: 'endless-scroll', checked: ctx.browsingSettings.endlessScroll}) %> - <p class='hint'>Rather than using a paged navigation, smoothly scrolls through the content.</p> - </li> - <li> - <%= ctx.makeCheckbox({text: 'Enable transparency grid', id: 'transparency-grid', name: 'transparency-grid', checked: ctx.browsingSettings.transparencyGrid}) %> - <p class='hint'>Renders a checkered pattern behind posts with transparent background.</p> - </li> - <li> - <%= ctx.makeCheckbox({text: 'Show tag suggestions', id: 'tag-suggestions', name: 'tag-suggestions', checked: ctx.browsingSettings.tagSuggestions}) %> - <p class='hint'>Shows a popup with suggested tags in edit forms.</p> - </li> - </ul> - </div> + <ul class='input'> + <li> + <%= ctx.makeCheckbox({ + text: 'Enable keyboard shortcuts', + name: 'keyboard-shortcuts', + checked: ctx.browsingSettings.keyboardShortcuts, + }) %> + <a class='append icon' href='/help/keyboard'><i class='fa fa-question-circle-o'></i></a> + </li> + + <li> + <%= ctx.makeNumericInput({ + text: 'Number of posts per page', + name: 'posts-per-page', + checked: ctx.browsingSettings.postCount, + value: ctx.browsingSettings.postsPerPage, + min: 10, + max: 100, + }) %> + </li> + + <li> + <%= ctx.makeCheckbox({ + text: 'Upscale small posts', + name: 'upscale-small-posts', + checked: ctx.browsingSettings.upscaleSmallPosts}) %> + </li> + + <li> + <%= ctx.makeCheckbox({ + text: 'Endless scroll', + name: 'endless-scroll', + checked: ctx.browsingSettings.endlessScroll, + }) %> + <p class='hint'>Rather than using a paged navigation, smoothly scrolls through the content.</p> + </li> + + <li> + <%= ctx.makeCheckbox({ + text: 'Enable transparency grid', + name: 'transparency-grid', + checked: ctx.browsingSettings.transparencyGrid, + }) %> + <p class='hint'>Renders a checkered pattern behind posts with transparent background.</p> + </li> + + <li> + <%= ctx.makeCheckbox({ + text: 'Show tag suggestions', + name: 'tag-suggestions', + checked: ctx.browsingSettings.tagSuggestions, + }) %> + <p class='hint'>Shows a popup with suggested tags in edit forms.</p> + </li> + </ul> + <div class='messages'></div> <div class='buttons'> <input type='submit' value='Save settings'/> diff --git a/client/html/tag_delete.tpl b/client/html/tag_delete.tpl index 5b63aa0..82736fc 100644 --- a/client/html/tag_delete.tpl +++ b/client/html/tag_delete.tpl @@ -4,7 +4,11 @@ <ul> <li> - <%= ctx.makeCheckbox({id: 'confirm-deletion', name: 'confirm-deletion', required: true, text: 'I confirm that I want to delete this tag.'}) %> + <%= ctx.makeCheckbox({ + name: 'confirm-deletion', + text: 'I confirm that I want to delete this tag.', + required: true, + }) %> </li> </ul> diff --git a/client/html/user_delete.tpl b/client/html/user_delete.tpl index c7c8433..9704492 100644 --- a/client/html/user_delete.tpl +++ b/client/html/user_delete.tpl @@ -3,7 +3,11 @@ <div class='input'> <ul> <li> - <%= ctx.makeCheckbox({id: 'confirm-deletion', name: 'confirm-deletion', required: true, text: 'I confirm that I want to delete this account.'}) %> + <%= ctx.makeCheckbox({ + name: 'confirm-deletion', + text: 'I confirm that I want to delete this account.', + required: true, + }) %> </li> </ul> </div> diff --git a/client/html/user_edit.tpl b/client/html/user_edit.tpl index 3805c14..88d6037 100644 --- a/client/html/user_edit.tpl +++ b/client/html/user_edit.tpl @@ -1,27 +1,46 @@ <div id='user-edit'> <form> - <ul> + <ul class='input'> <% if (ctx.canEditName) { %> <li> - <%= ctx.makeTextInput({text: 'User name', id: 'user-name', name: 'name', value: ctx.user.name, pattern: ctx.userNamePattern}) %> + <%= ctx.makeTextInput({ + text: 'User name', + name: 'name', + value: ctx.user.name, + pattern: ctx.userNamePattern, + }) %> </li> <% } %> <% if (ctx.canEditPassword) { %> <li> - <%= ctx.makePasswordInput({text: 'Password', id: 'user-password', name: 'password', placeholder: 'leave blank if not changing', pattern: ctx.passwordPattern}) %> + <%= ctx.makePasswordInput({ + text: 'Password', + name: 'password', + placeholder: 'leave blank if not changing', + pattern: ctx.passwordPattern, + }) %> </li> <% } %> <% if (ctx.canEditEmail) { %> <li> - <%= ctx.makeEmailInput({text: 'Email', id: 'user-email', name: 'email', value: ctx.user.email}) %> + <%= ctx.makeEmailInput({ + text: 'Email', + name: 'email', + value: ctx.user.email, + }) %> </li> <% } %> <% if (ctx.canEditRank) { %> <li> - <%= ctx.makeSelect({text: 'Rank', id: 'user-rank', name: 'rank', keyValues: ctx.ranks, selectedKey: ctx.user.rank}) %> + <%= ctx.makeSelect({ + text: 'Rank', + name: 'rank', + keyValues: ctx.ranks, + selectedKey: ctx.user.rank, + }) %> </li> <% } %> @@ -30,8 +49,19 @@ <label>Avatar</label> <div id='avatar-content'></div> <div id='avatar-radio'> - <%= ctx.makeRadio({text: 'Gravatar', id: 'gravatar-radio', name: 'avatar-style', value: 'gravatar', selectedValue: ctx.user.avatarStyle}) %> - <%= ctx.makeRadio({text: 'Manual avatar', id: 'avatar-radio', name: 'avatar-style', value: 'manual', selectedValue: ctx.user.avatarStyle}) %> + <%= ctx.makeRadio({ + text: 'Gravatar', + name: 'avatar-style', + value: 'gravatar', + selectedValue: ctx.user.avatarStyle, + }) %> + + <%= ctx.makeRadio({ + text: 'Manual avatar', + name: 'avatar-style', + value: 'manual', + selectedValue: ctx.user.avatarStyle, + }) %> </div> </li> <% } %> diff --git a/client/html/user_registration.tpl b/client/html/user_registration.tpl index 8a6d3e4..9db35ce 100644 --- a/client/html/user_registration.tpl +++ b/client/html/user_registration.tpl @@ -4,14 +4,33 @@ <div class='input'> <ul> <li> - <%= ctx.makeTextInput({text: 'User name', id: 'user-name', name: 'user-name', placeholder: 'letters, digits, _, -', required: true, pattern: ctx.userNamePattern}) %> + <%= ctx.makeTextInput({ + text: 'User name', + name: 'name', + placeholder: 'letters, digits, _, -', + required: true, + pattern: ctx.userNamePattern, + }) %> </li> <li> - <%= ctx.makePasswordInput({text: 'Password', id: 'user-password', name: 'user-password', placeholder: '5+ characters', required: true, pattern: ctx.passwordPattern}) %> + <%= ctx.makePasswordInput({ + text: 'Password', + name: 'password', + placeholder: '5+ characters', + required: true, + pattern: ctx.passwordPattern, + }) %> </li> <li> - <%= ctx.makeEmailInput({text: 'Email', id: 'user-email', name: 'user-email', placeholder: 'optional'}) %> - <p class='hint'>Used for password reminder and to show a <a href='http://gravatar.com/'>Gravatar</a>. Leave blank for random Gravatar.</p> + <%= ctx.makeEmailInput({ + text: 'Email', + name: 'email', + placeholder: 'optional', + }) %> + <p class='hint'> + Used for password reminder and to show a <a href='http://gravatar.com/'>Gravatar</a>. + Leave blank for random Gravatar. + </p> </li> </ul> </div> |