%= form_tag({:action => 'edit', :tab => 'authentication'}) do %>
<%= setting_select :login_required, [[l(:label_login_required_yes), "1"], [l(:label_login_required_no), "0"]] %> <%= t(:text_login_required_html, anonymous_role_path: edit_role_path(Role.anonymous)) %>
<%= setting_select :autologin, [[l(:label_disabled), 0]] + [1, 7, 30, 365].collect{|days| [l('datetime.distance_in_words.x_days', :count => days), days.to_s]} %>
<%= setting_select :self_registration, [[l(:label_disabled), "0"], [l(:label_registration_activation_by_email), "1"], [l(:label_registration_manual_activation), "2"], [l(:label_registration_automatic_activation), "3"]], :onchange => "if (this.value != '0') { $('#settings_show_custom_fields_on_registration').removeAttr('disabled'); } else { $('#settings_show_custom_fields_on_registration').attr('disabled', true); }" %>
<%= setting_check_box :show_custom_fields_on_registration, :disabled => !Setting.self_registration? %>
<%= setting_text_field :password_min_length, :size => 6 %>
<%= setting_multiselect :password_required_char_classes, Setting::PASSWORD_CHAR_CLASSES.keys.collect {|c| [l("label_password_char_class_#{c}"), c]} , :inline => true %>
<%= setting_select :password_max_age, [[l(:label_disabled), 0]] + [7, 30, 60, 90, 180, 365].collect{|days| [l('datetime.distance_in_words.x_days', :count => days), days.to_s]} %>
<%= setting_check_box :lost_password %>
<%= setting_select :twofa, [[l(:label_disabled), "0"],
[l(:label_optional), "1"],
[l(:label_required_administrators), "3"],
[l(:label_required_lower), "2"]] -%>
<%= t 'twofa_hint_disabled_html', label: t(:label_disabled) -%>
<%= t 'twofa_hint_optional_html', label: t(:label_optional) -%>
<%= t 'twofa_hint_required_administrators_html', label: t(:label_required_administrators) -%>
<%= t 'twofa_hint_required_html', label: t(:label_required_lower) -%>