Add form attribute to settings page inputs

pull/385/merge
Thibaut Courouble 8 years ago
parent aed1d8e56e
commit b353d3afa1

@ -6,13 +6,13 @@ app.templates.settingsPage = (settings) -> """
<div class="_settings-inputs"> <div class="_settings-inputs">
<label class="_settings-label"> <label class="_settings-label">
<input type="checkbox" name="dark" value="1"#{if settings.dark then ' checked' else ''}>Enable dark theme <input type="checkbox" form="settings" name="dark" value="1"#{if settings.dark then ' checked' else ''}>Enable dark theme
</label> </label>
<label class="_settings-label _setting-max-width"> <label class="_settings-label _setting-max-width">
<input type="checkbox" name="layout" value="_max-width"#{if settings['_max-width'] then ' checked' else ''}>Enable fixed-width layout <input type="checkbox" form="settings" name="layout" value="_max-width"#{if settings['_max-width'] then ' checked' else ''}>Enable fixed-width layout
</label> </label>
<label class="_settings-label _hide-on-mobile"> <label class="_settings-label _hide-on-mobile">
<input type="checkbox" name="layout" value="_sidebar-hidden"#{if settings['_sidebar-hidden'] then ' checked' else ''}>Automatically hide and show the sidebar <input type="checkbox" form="settings" name="layout" value="_sidebar-hidden"#{if settings['_sidebar-hidden'] then ' checked' else ''}>Automatically hide and show the sidebar
<small>Tip: drag the edge of the sidebar to resize it.</small> <small>Tip: drag the edge of the sidebar to resize it.</small>
</label> </label>
</div> </div>
@ -23,10 +23,10 @@ app.templates.settingsPage = (settings) -> """
<div class="_settings-inputs"> <div class="_settings-inputs">
<label class="_settings-label"> <label class="_settings-label">
<input type="checkbox" name="smoothScroll" value="1"#{if settings.smoothScroll then ' checked' else ''}>Use smooth scrolling <input type="checkbox" form="settings" name="smoothScroll" value="1"#{if settings.smoothScroll then ' checked' else ''}>Use smooth scrolling
</label> </label>
<label class="_settings-label"> <label class="_settings-label">
<input type="checkbox" name="arrowScroll" value="1"#{if settings.arrowScroll then ' checked' else ''}>Use arrow keys to scroll the main content area <input type="checkbox" form="settings" name="arrowScroll" value="1"#{if settings.arrowScroll then ' checked' else ''}>Use arrow keys to scroll the main content area
<small>With this checked, use <code class="_label">alt</code> + <code class="_label">&uarr;</code><code class="_label">&darr;</code><code class="_label">&larr;</code><code class="_label">&rarr;</code> to navigate the sidebar.</small> <small>With this checked, use <code class="_label">alt</code> + <code class="_label">&uarr;</code><code class="_label">&darr;</code><code class="_label">&larr;</code><code class="_label">&rarr;</code> to navigate the sidebar.</small>
</label> </label>
</div> </div>

Loading…
Cancel
Save