<% if @casted_settings && @casted_settings[:errors].any? %>
<%= t('settings.index.settings_include_errors') %>
<% end %> <%= form_tag [:update_all], method: :put, class: 'form' do %> <% @settings.each do |name, value| %> <% errors = @errors.has_key?(name.to_sym) ? @errors[name.to_sym].join(', ') : nil %> <% end %>
<%= t('settings.index.description') %> <%= t('settings.index.value') %>
<%= I18n.t("settings.attributes.#{name}.name") %> <% setting_with_error = @casted_settings && @casted_settings[:errors].include?(name) %>
<%= setting_field(name, value, @settings) %> <%- if errors.present? %> <%= errors %> <% end %>
<%= submit_tag t('settings.index.save_all'), class: 'btn btn-primary btn-lg' %> <% end %>