History

Add form attribute to settings page inputs

Thibaut Courouble committed 9 years ago

Commit b353d3a1 parent aed1d8e1 file · +5 −5Browse files

Unified · Split

assets/javascripts/templates/pages/settings_tmpl.coffee+5−5
@@ -6,13 +6,13 @@ app.templates.settingsPage = (settings) -> """ · 5 unmodified lines
66
77 <div class="_settings-inputs">
88 <label class="_settings-label">
9− <input type="checkbox" name="dark" value="1"#{if settings.dark then ' checked' else ''}>Enable dark theme
9+ <input type="checkbox" form="settings" name="dark" value="1"#{if settings.dark then ' checked' else ''}>Enable dark theme
1010 </label>
1111 <label class="_settings-label _setting-max-width">
12− <input type="checkbox" name="layout" value="_max-width"#{if settings['_max-width'] then ' checked' else ''}>Enable fixed-width layout
12+ <input type="checkbox" form="settings" name="layout" value="_max-width"#{if settings['_max-width'] then ' checked' else ''}>Enable fixed-width layout
1313 </label>
1414 <label class="_settings-label _hide-on-mobile">
15− <input type="checkbox" name="layout" value="_sidebar-hidden"#{if settings['_sidebar-hidden'] then ' checked' else ''}>Automatically hide and show the sidebar
15+ <input type="checkbox" form="settings" name="layout" value="_sidebar-hidden"#{if settings['_sidebar-hidden'] then ' checked' else ''}>Automatically hide and show the sidebar
1616 <small>Tip: drag the edge of the sidebar to resize it.</small>
1717 </label>
1818 </div>
@@ -23,10 +23,10 @@ app.templates.settingsPage = (settings) -> """ · 4 unmodified lines
2323
2424 <div class="_settings-inputs">
2525 <label class="_settings-label">
26− <input type="checkbox" name="smoothScroll" value="1"#{if settings.smoothScroll then ' checked' else ''}>Use smooth scrolling
26+ <input type="checkbox" form="settings" name="smoothScroll" value="1"#{if settings.smoothScroll then ' checked' else ''}>Use smooth scrolling
2727 </label>
2828 <label class="_settings-label">
29− <input type="checkbox" name="arrowScroll" value="1"#{if settings.arrowScroll then ' checked' else ''}>Use arrow keys to scroll the main content area
29+ <input type="checkbox" form="settings" name="arrowScroll" value="1"#{if settings.arrowScroll then ' checked' else ''}>Use arrow keys to scroll the main content area
3030 <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>
3131 </label>
3232 </div>