<div class="panel panel-default m-t-md">
  <div class="panel-heading">
    <span class="font-sbold" translate>{{ 'app.admin.settings.account_creation' }}</span>
  </div>
  <div class="panel-body">
    <div class="row">
      <h3 class="m-l" translate>{{ 'app.admin.settings.general.public_registrations' }}</h3>
      <p class="alert alert-warning m-h-md" translate>
        {{ 'app.admin.settings.general.public_registrations_info' }}
      </p>
      <div class="col-md-10 col-md-offset-1">
        <boolean-setting name="'public_registrations'"
                         label="'app.admin.settings.general.public_registrations_allowed' | translate"
                         on-success="onSuccess"
                         on-error="onError">
        </boolean-setting>
      </div>
    </div>
    <div class="row">
        <h3 class="m-l" translate>{{ 'app.admin.settings.account_confirmation' }}</h3>
        <p class="alert alert-warning m-h-md" translate>
            {{ 'app.admin.settings.confirmation_required_info' }}
        </p>
        <div class="col-md-10 col-md-offset-1">
            <boolean-setting name="'confirmation_required'"
                             label="'app.admin.settings.confirmation_is_required' | translate"
                             on-success="onSuccess"
                             on-error="onError">
            </boolean-setting>
        </div>
    </div>
    <div class="row">
      <h3 class="m-l" translate>{{ 'app.admin.settings.change_group' }}</h3>
      <p class="alert alert-warning m-h-md" translate>
        {{ 'app.admin.settings.change_group_info' }}
      </p>
      <div class="col-md-10 col-md-offset-1">
        <boolean-setting name="'user_change_group'"
                         settings="allSettings"
                         label="'app.admin.settings.allow_group_change' | translate"
                         on-success="onSuccess"
                         on-error="onError">
        </boolean-setting>
      </div>
    </div>
    <div class="row">
      <h3 class="m-l" translate>{{ 'app.admin.settings.account.user_validation_required_title' }}</h3>
      <p class="alert alert-warning m-h-md" translate>
        {{ 'app.admin.settings.account.user_validation_required_info' }}
      <div class="col-md-10 col-md-offset-1">
        <user-validation-setting on-success="onSuccess" on-error="onError" />
      </div>
    </div>

    <div class="row">
      <h3 class="m-l" translate>{{ 'app.admin.settings.captcha' }}</h3>
      <p class="alert alert-warning m-h-md" ng-bind-html="'app.admin.settings.captcha_info_html' | translate"></p>
      <div class="col-md-6">
        <text-setting name="recaptcha_site_key"
                      settings="allSettings"
                      label="app.admin.settings.site_key"
                      fa-icon="fa-info"
                      placeholder="0000000000000000000000000000000000000000">
        </text-setting>
      </div>
      <div class="col-md-6">
        <text-setting name="recaptcha_secret_key"
                      settings="allSettings"
                      label="app.admin.settings.secret_key"
                      fa-icon="fa-key"
                      placeholder="0000000000000000000000000000000000000000">
        </text-setting>
      </div>
    </div>
  </div>
</div>

<div class="panel panel-default m-t-md">
  <div class="panel-heading">
    <span class="font-sbold" translate>{{ 'app.admin.settings.family_account' }}</span>
  </div>
  <div class="panel-body">
    <div class="row">
      <p class="alert alert-warning m-h-md" ng-bind-html="'app.admin.settings.family_account_info_html' | translate"></p>
      <div class="col-md-10 col-md-offset-1">
        <boolean-setting name="'family_account'"
                         settings="allSettings"
                         label="'app.admin.settings.enable_family_account' | translate"
                         on-success="onSuccess"
                         on-error="onError">
      </div>
      <div class="col-md-10 col-md-offset-1">
        <boolean-setting name="'child_validation_required'"
                         settings="allSettings"
                         label="'app.admin.settings.child_validation_required_label' | translate"
                         on-success="onSuccess"
                         on-error="onError">
      </div>
    </div>
    <div class="row">
      <div class="col-md-12">
        <supporting-documents-types-list on-success="onSuccess" on-error="onError" document-type="'Child'" />
      </div>
    </div>
  </div>
</div>

<div class="panel panel-default m-t-md">
  <div class="panel-heading">
    <span class="font-sbold" translate>{{ 'app.admin.settings.accounts_management' }}</span>
  </div>
  <div class="panel-body">
    <div class="row">
      <h3 class="m-l" translate>{{ 'app.admin.settings.members_list' }}</h3>
      <p class="alert alert-warning m-h-md" translate>
        {{ 'app.admin.settings.members_list_info' }}
      </p>
      <div class="col-md-10 col-md-offset-1">
        <boolean-setting name="'show_username_in_admin_list'"
          settings="allSettings"
          label="'app.admin.settings.show_username_in_admin_list' | translate"
          on-success="onSuccess"
          on-error="onError">
        </boolean-setting>
      </div>
    </div>
  </div>
</div>

<div class="panel panel-default m-t-md">
  <div class="panel-heading">
    <span class="font-sbold" translate>{{ 'app.admin.settings.account.customize_account_settings' }}</span>
  </div>
  <div class="panel-body">
    <div class="row">
      <h3 class="m-l" translate>{{ 'app.admin.settings.phone' }}</h3>
      <p class="alert alert-warning m-h-md" translate>
        {{ 'app.admin.settings.phone_required_info' }}
      </p>
      <div class="col-md-10 col-md-offset-1">
        <boolean-setting name="'phone_required'"
                         label="'app.admin.settings.phone_is_required' | translate"
                         on-success="onSuccess"
                         on-error="onError">
        </boolean-setting>
      </div>
    </div>
    <div class="row">
      <h3 class="m-l" translate>{{ 'app.admin.settings.address' }}</h3>
      <p class="alert alert-warning m-h-md" translate>
        {{ 'app.admin.settings.address_required_info_html' }}
      </p>
      <div class="col-md-10 col-md-offset-1">
        <boolean-setting name="'address_required'"
                         label="'app.admin.settings.address_is_required' | translate"
                         on-success="onSuccess"
                         on-error="onError">
        </boolean-setting>
      </div>
    </div>
    <div class="row">
      <h3 class="m-l" translate>{{ 'app.admin.settings.external_id' }}</h3>
      <p class="alert alert-warning m-h-md" translate>
        {{ 'app.admin.settings.external_id_info_html' }}
      </p>
      <div class="col-md-10 col-md-offset-1">
        <boolean-setting name="'external_id'"
                         label="'app.admin.settings.enable_external_id' | translate"
                         on-success="onSuccess"
                         on-error="onError">
        </boolean-setting>
      </div>
    </div>

    <div class="row">
      <h3 class="m-l" translate>{{ 'app.admin.settings.account.organization' }}</h3>
      <p class="alert alert-warning m-h-md m-b" translate>
        {{ 'app.admin.settings.account.organization_profile_custom_fields_info' }}
      </p>
      <p class="alert alert-danger m-h-md" translate>
        {{ 'app.admin.settings.account.organization_profile_custom_fields_alert' }}
      </p>
      <div class="col-md-12">
        <profile-custom-fields-list on-success="onSuccess" on-error="onError" />
      </div>
    </div>
  </div>
</div>


<supporting-documents-types-list on-success="onSuccess" on-error="onError" document-type="'User'" />
