mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-05 19:11:00 +08:00
In safe mode plugins are not loaded, so the plugin admin routes are not loaded. This was causing errors in the admin sidebar because we are trying to show links to the plugin admin routes. This fixes the issue by just not adding the plugin links if we are in safe mode.
45 lines
1.1 KiB
Text
45 lines
1.1 KiB
Text
<div class='container safe-mode'>
|
|
<h2><%= t 'safe_mode.title'%></h2>
|
|
<%= form_tag(safe_mode_enter_path) do %>
|
|
<p>
|
|
<%= t 'safe_mode.description' %>
|
|
</p>
|
|
<p>
|
|
<label>
|
|
<%= check_box_tag 'no_themes', true, !flash[:must_select]%>
|
|
<%= t 'safe_mode.no_themes' %>
|
|
</label>
|
|
</p>
|
|
<p>
|
|
<label>
|
|
<%= check_box_tag 'no_unofficial_plugins', true, !flash[:must_select] %>
|
|
<%= t 'safe_mode.no_unofficial_plugins' %>
|
|
</label>
|
|
</p>
|
|
<p>
|
|
<label>
|
|
<%= check_box_tag 'no_plugins', true, !flash[:must_select] %>
|
|
<%= t 'safe_mode.no_plugins' %>
|
|
</label>
|
|
</p>
|
|
|
|
<p>
|
|
<%= t 'safe_mode.deprecation_error_description' %>
|
|
</p>
|
|
<p>
|
|
<label>
|
|
<%= check_box_tag 'deprecation_errors', true, false %>
|
|
<%= t 'safe_mode.deprecation_error_label' %>
|
|
</label>
|
|
</p>
|
|
|
|
<p>
|
|
<%= submit_tag t('safe_mode.enter'), class: 'btn btn-danger', id: "btn-enter-safe-mode" %>
|
|
<%- if flash[:must_select] %>
|
|
<span class='safe-mode-warning'>
|
|
⚠️ <%= t 'safe_mode.must_select' %>
|
|
</span>
|
|
<%- end %>
|
|
</p>
|
|
<% end %>
|
|
</div>
|