UX: warn that something must be selected with safe mode

This commit is contained in:
Sam
2017-11-13 15:59:51 +11:00
parent 4f28c71b50
commit dfe9f70747
3 changed files with 10 additions and 3 deletions

View File

@@ -6,24 +6,29 @@
</p>
<p>
<label>
<%= check_box_tag 'no_customizations', true, true %>
<%= check_box_tag 'no_customizations', true, !flash[:must_select]%>
<%= t 'safe_mode.no_customizations' %>
</label>
</p>
<p>
<label>
<%= check_box_tag 'only_official', true, true %>
<%= check_box_tag 'only_official', true, !flash[:must_select] %>
<%= t 'safe_mode.only_official' %>
</label>
</p>
<p>
<label>
<%= check_box_tag 'no_plugins', true, true %>
<%= check_box_tag 'no_plugins', true, !flash[:must_select] %>
<%= t 'safe_mode.no_plugins' %>
</label>
</p>
<p>
<%= submit_tag t('safe_mode.enter'), class: 'btn btn-danger' %>
<%- if flash[:must_select] %>
<span class='safe-mode-warning'>
<i class='fa fa-warning'></i> <%= t 'safe_mode.must_select' %>
</span>
<%- end %>
</p>
<% end %>
</div>