<commit_before><section>
  {{#if isEnabled}}
    <h3>{{t 'ldap.header.enabled.label' providerName=(t providerName)}}</h3>
    <hr/>
  {{else}}
    <div class="banner bg-warning">
      <div class="banner-icon"><span class="icon icon-alert"></span></div>
      <div class="banner-message">
        <p>{{t 'ldap.header.disabled.label' providerName=(t providerName)}}</p>
      </div>
    </div>
  {{/if}}

  <div>
    {{#if isEnabled}}
      {{t (concat 'ldap.header.enabled.' authConfig.accessMode) appName=settings.appName providerName=(t providerName) users=numUsers groups=numGroups}}
    {{else}}
      {{t 'ldap.header.disabled.warning' appName=settings.appName providerName=(t providerName)}}
    {{/if}}
  </div>
</section>

{{#accordion-list showExpandAll=false  as |al expandFn|}}
  {{#if isEnabled}}
    {{#accordion-list-item
         classNames="mt-30"
         detail=(t 'ldap.accessConfig.subtext1' providerName=(t providerName) htmlSafe=true)
         expand=(action expandFn)
         expandAll=al.expandAll
         expandOnInit=true
         expanded=true
         showExpand=false
         title=(t 'ldap.accessEnabled.header')
    }}
      <section class="">
        <div class="clearfix">
          <div class="pull-right">
            <button class="btn btn-sm bg-primary" {{action "edit"}}>
              {{t 'generic.edit'}}
            </button>
            <button class="btn btn-sm right-divider-btn bg-error" {{action "disable"}}>
              {{t 'ldap.accessEnabled.disable.confirmDisable.pre'}}
            </button>
          </div>
        </div>
        <hr/>
        <p class="text-info">{{t 'ldap.accessEnabled.subtext'}}</p>

        <div class="row">
          <div class="col span-4">
            <h3>{{t 'ldap.accessEnabled.general.header'}}</h3>
            <div><b>{{t 'ldap.accessEnabled.general.server'}} </b> <span class="text-muted">{{authConfig.servers.firstObject}}:{{authConfig.port}}</span></div>
            <div><b>{{t 'ldap.accessEnabled.general.tls'}} </b> <span class="text-muted">{{if authConfig.tls "Yes" "No"}}</span></div>
            {{#if authConfig.serviceAccountUsername}}
              <div><b>{{t 'ldap.accessEnabled.general.serviceAccount'}} </b> <span class="text-muted">{{authConfig.serviceAccountUsername}}</span></div>
            {{/if}}
            {{#if authConfig.serviceAccountDistinguishedName}}
              <div><b>{{t 'ldap.accessEnabled.general.serviceAccount'}} </b> <span class="text-muted">{{authConfig.serviceAccountDistinguishedName}}</span></div>
            {{/if}}
            {{#if (eq authConfig.type "activeDirectoryConfig")}}
              <div><b>{{t 'ldap.accessEnabled.general.defaultDomain'}} </b> <span class="text-muted">{{authConfig.defaultLoginDomain}}</span></div>
            {{/if}}
            <div><b>{{t 'ldap.accessConfig.connectionTimeout.labelText'}}</b> <span class="text-muted">{{authConfig.connectionTimeout}}</span></div>
          </div>
          <div class="col span-4">
            <h3>{{t 'ldap.accessEnabled.users.header'}}</h3>
            <div class="force-wrap"><b>{{t 'ldap.accessEnabled.general.searchBase'}} </b> <span class="text-muted">{{authConfig.userSearchBase}}</span></div>
            <div><b>{{t 'ldap.accessEnabled.users.objectClass'}} </b> <span class="text-muted">{{authConfig.userObjectClass}}</span></div>
            <div><b>{{t 'ldap.accessEnabled.users.login'}} </b> <span class="text-muted">{{authConfig.userLoginAttribute}}</span></div>
            <div><b>{{t 'ldap.accessEnabled.users.name'}} </b> <span class="text-muted">{{authConfig.userNameAttribute}}</span></div>
            <div><b>{{t 'ldap.accessEnabled.users.search'}} </b> <span class="text-muted">{{authConfig.userSearchAttribute}}</span></div>
            <div><b>{{t 'ldap.accessEnabled.users.enabled'}} </b> <span class="text-muted">{{authConfig.userEnabledAttribute}}</span></div>
            <div><b>{{t 'ldap.accessEnabled.users.disabledBitMask'}} </b> <span class="text-muted">{{authConfig.userDisabledBitMask}}</span></div>
          </div>
          <div class="col span-4">
            <h3>{{t 'ldap.accessEnabled.group.header'}}</h3>
            <div class="force-wrap"><b>{{t 'ldap.accessEnabled.general.searchBase'}} </b> <span class="text-muted">{{authConfig.groupSearchBase}}</span></div>
            <div><b>{{t 'ldap.accessEnabled.group.objectClass'}} </b> <span class="text-muted">{{authConfig.groupObjectClass}}</span></div>
            <div><b>{{t 'ldap.accessEnabled.group.name'}} </b> <span class="text-muted">{{authConfig.groupNameAttribute}}</span></div>
            <div><b>{{t 'ldap.accessEnabled.group.search'}} </b> <span class="text-muted">{{authConfig.groupSearchAttribute}}</span></div>
          </div>
        </div>
      </section>
    {{/accordion-list-item}}

  {{/if}}

  {{#if (or (not isEnabled) editing)}}
    {{#accordion-list-item
         classNames="mt-30"
         detail=(t 'ldap.accessConfig.subtext1' providerName=(t providerName) htmlSafe=true)
         expand=(action expandFn)
         expandAll=al.expandAll
         expandOnInit=true
         expanded=true
         showExpand=false
         title=(t 'ldap.accessConfig.header' providerName=(t providerName))
    }}
      <section class="">
        <div class="row">
          <div class="col span-6 mb-0">
            <div class="inline-form">
              <label class="acc-label pb-5">{{t 'model.openldapconfig.server.label'}}{{field-required}}</label>
              {{input value=configServers classNames="form-control"}}
            </div>
          </div>
          <div class="col span-6 mb-0">
            <label class="acc-label pb-5">{{t 'ldap.accessConfig.port.labelText'}}</label>
            <div class="input-group">
              {{input-integer value=authConfig.port min=1 max=65535 classNames="form-control"}}
              <span class="input-group-addon bg-default">
                <label>{{t 'ldap.accessConfig.port.checkbox'}} {{input type="checkbox" checked=authConfig.tls}}</label>
              </span>
            </div>
          </div>
        </div>
        {{#if authConfig.tls}}
          <hr/>
          <div class="row pt-10">
            <div class="col span-12 input-group mt-0">
              {{input-text-file
                  label='ldap.customizeSchema.cert.labelText'
                  value=authConfig.certificate
                  canChangeName=false
                  accept="text/plain,.pem,.pkey,.key"
                  minHeight=60
                  placeholder="ldap.customizeSchema.cert.placeholder"
                  shouldChangeName=false
              }}
              <p class="help-block">{{t 'ldap.customizeSchema.cert.helpText'}}</p>
            </div>
          </div>
        {{/if}}
        <div class="row">
          <div class="col span-6 offset-6 mb-0">
            <label class="acc-label pb-5">{{t 'ldap.accessConfig.connectionTimeout.labelText'}}{{field-required}}</label>
            <div class="input-group">
              {{input-integer value=authConfig.connectionTimeout min=1 max=65535 classNames="form-control"}}
              <span class="input-group-addon bg-default"><label>{{t 'generic.milliseconds'}}</label></span>
            </div>
          </div>
        </div>
        <hr class="mt-30 mb-30"/>
        <p class="text-info mb-0">{{t 'ldap.accessConfig.subtext2' appName=settings.appName}}</p>
        <div class="row">
          {{#if (eq authConfig.type "activeDirectoryConfig")}}
            <div class="col span-6">
              <div class="inline-form">
                <label class="acc-label pb-5">{{t 'model.openldapconfig.serviceAccountUsername.label'}}{{field-required}}</label>
                {{input value=authConfig.serviceAccountUsername classNames="form-control"}}
              </div>
            </div>
          {{else}}
            <div class="col span-6">
              <div class="inline-form">
                <label class="acc-label pb-5">{{t 'ldap.accessConfig.serviceAccountDistinguishedName.labelText'}}{{field-required}}</label>
                {{input value=authConfig.serviceAccountDistinguishedName classNames="form-control"}}
              </div>
            </div>
          {{/if}}
          <div class="col span-6">
            <div class="inline-form">
              <label class="acc-label pb-5">{{t 'model.openldapconfig.serviceAccountPassword.label'}}{{field-required}}</label>
              {{input type="password" value=authConfig.serviceAccountPassword classNames="form-control"}}
            </div>
          </div>
        </div>
        {{#if (eq authConfig.type "activeDirectoryConfig")}}
          <div class="row"><commit_msg>move input remove max<commit_after><section>
  {{#if isEnabled}}
    <h3>{{t 'ldap.header.enabled.label' providerName=(t providerName)}}</h3>
    <hr/>
  {{else}}
    <div class="banner bg-warning">
      <div class="banner-icon"><span class="icon icon-alert"></span></div>
      <div class="banner-message">
        <p>{{t 'ldap.header.disabled.label' providerName=(t providerName)}}</p>
      </div>
    </div>
  {{/if}}

  <div>
    {{#if isEnabled}}
      {{t (concat 'ldap.header.enabled.' authConfig.accessMode) appName=settings.appName providerName=(t providerName) users=numUsers groups=numGroups}}
    {{else}}
      {{t 'ldap.header.disabled.warning' appName=settings.appName providerName=(t providerName)}}
    {{/if}}
  </div>
</section>

{{#accordion-list showExpandAll=false  as |al expandFn|}}
  {{#if isEnabled}}
    {{#accordion-list-item
         classNames="mt-30"
         detail=(t 'ldap.accessConfig.subtext1' providerName=(t providerName) htmlSafe=true)
         expand=(action expandFn)
         expandAll=al.expandAll
         expandOnInit=true
         expanded=true
         showExpand=false
         title=(t 'ldap.accessEnabled.header')
    }}
      <section class="">
        <div class="clearfix">
          <div class="pull-right">
            <button class="btn btn-sm bg-primary" {{action "edit"}}>
              {{t 'generic.edit'}}
            </button>
            <button class="btn btn-sm right-divider-btn bg-error" {{action "disable"}}>
              {{t 'ldap.accessEnabled.disable.confirmDisable.pre'}}
            </button>
          </div>
        </div>
        <hr/>
        <p class="text-info">{{t 'ldap.accessEnabled.subtext'}}</p>

        <div class="row">
          <div class="col span-4">
            <h3>{{t 'ldap.accessEnabled.general.header'}}</h3>
            <div><b>{{t 'ldap.accessEnabled.general.server'}} </b> <span class="text-muted">{{authConfig.servers.firstObject}}:{{authConfig.port}}</span></div>
            <div><b>{{t 'ldap.accessEnabled.general.tls'}} </b> <span class="text-muted">{{if authConfig.tls "Yes" "No"}}</span></div>
            {{#if authConfig.serviceAccountUsername}}
              <div><b>{{t 'ldap.accessEnabled.general.serviceAccount'}} </b> <span class="text-muted">{{authConfig.serviceAccountUsername}}</span></div>
            {{/if}}
            {{#if authConfig.serviceAccountDistinguishedName}}
              <div><b>{{t 'ldap.accessEnabled.general.serviceAccount'}} </b> <span class="text-muted">{{authConfig.serviceAccountDistinguishedName}}</span></div>
            {{/if}}
            {{#if (eq authConfig.type "activeDirectoryConfig")}}
              <div><b>{{t 'ldap.accessEnabled.general.defaultDomain'}} </b> <span class="text-muted">{{authConfig.defaultLoginDomain}}</span></div>
            {{/if}}
            <div><b>{{t 'ldap.accessConfig.connectionTimeout.labelText'}}</b> <span class="text-muted">{{authConfig.connectionTimeout}}</span></div>
          </div>
          <div class="col span-4">
            <h3>{{t 'ldap.accessEnabled.users.header'}}</h3>
            <div class="force-wrap"><b>{{t 'ldap.accessEnabled.general.searchBase'}} </b> <span class="text-muted">{{authConfig.userSearchBase}}</span></div>
            <div><b>{{t 'ldap.accessEnabled.users.objectClass'}} </b> <span class="text-muted">{{authConfig.userObjectClass}}</span></div>
            <div><b>{{t 'ldap.accessEnabled.users.login'}} </b> <span class="text-muted">{{authConfig.userLoginAttribute}}</span></div>
            <div><b>{{t 'ldap.accessEnabled.users.name'}} </b> <span class="text-muted">{{authConfig.userNameAttribute}}</span></div>
            <div><b>{{t 'ldap.accessEnabled.users.search'}} </b> <span class="text-muted">{{authConfig.userSearchAttribute}}</span></div>
            <div><b>{{t 'ldap.accessEnabled.users.enabled'}} </b> <span class="text-muted">{{authConfig.userEnabledAttribute}}</span></div>
            <div><b>{{t 'ldap.accessEnabled.users.disabledBitMask'}} </b> <span class="text-muted">{{authConfig.userDisabledBitMask}}</span></div>
          </div>
          <div class="col span-4">
            <h3>{{t 'ldap.accessEnabled.group.header'}}</h3>
            <div class="force-wrap"><b>{{t 'ldap.accessEnabled.general.searchBase'}} </b> <span class="text-muted">{{authConfig.groupSearchBase}}</span></div>
            <div><b>{{t 'ldap.accessEnabled.group.objectClass'}} </b> <span class="text-muted">{{authConfig.groupObjectClass}}</span></div>
            <div><b>{{t 'ldap.accessEnabled.group.name'}} </b> <span class="text-muted">{{authConfig.groupNameAttribute}}</span></div>
            <div><b>{{t 'ldap.accessEnabled.group.search'}} </b> <span class="text-muted">{{authConfig.groupSearchAttribute}}</span></div>
          </div>
        </div>
      </section>
    {{/accordion-list-item}}

  {{/if}}

  {{#if (or (not isEnabled) editing)}}
    {{#accordion-list-item
         classNames="mt-30"
         detail=(t 'ldap.accessConfig.subtext1' providerName=(t providerName) htmlSafe=true)
         expand=(action expandFn)
         expandAll=al.expandAll
         expandOnInit=true
         expanded=true
         showExpand=false
         title=(t 'ldap.accessConfig.header' providerName=(t providerName))
    }}
      <section class="">
        <div class="row">
          <div class="col span-6 mb-0">
            <div class="inline-form">
              <label class="acc-label pb-5">{{t 'model.openldapconfig.server.label'}}{{field-required}}</label>
              {{input value=configServers classNames="form-control"}}
            </div>
          </div>
          <div class="col span-6 mb-0">
            <label class="acc-label pb-5">{{t 'ldap.accessConfig.port.labelText'}}</label>
            <div class="input-group">
              {{input-integer value=authConfig.port min=1 max=65535 classNames="form-control"}}
              <span class="input-group-addon bg-default">
                <label>{{t 'ldap.accessConfig.port.checkbox'}} {{input type="checkbox" checked=authConfig.tls}}</label>
              </span>
            </div>
          </div>
        </div>
        {{#if authConfig.tls}}
          <hr/>
          <div class="row pt-10">
            <div class="col span-12 input-group mt-0">
              {{input-text-file
                  label='ldap.customizeSchema.cert.labelText'
                  value=authConfig.certificate
                  canChangeName=false
                  accept="text/plain,.pem,.pkey,.key"
                  minHeight=60
                  placeholder="ldap.customizeSchema.cert.placeholder"
                  shouldChangeName=false
              }}
              <p class="help-block">{{t 'ldap.customizeSchema.cert.helpText'}}</p>
            </div>
          </div>
        {{/if}}
        <div class="row">
          <div class="col span-6 mb-0">
            <label class="acc-label pb-5">{{t 'ldap.accessConfig.connectionTimeout.labelText'}}{{field-required}}</label>
            <div class="input-group">
              {{input-integer value=authConfig.connectionTimeout min=1 classNames="form-control"}}
              <span class="input-group-addon bg-default"><label>{{t 'generic.milliseconds'}}</label></span>
            </div>
          </div>
        </div>
        <hr class="mt-30 mb-30"/>
        <p class="text-info mb-0">{{t 'ldap.accessConfig.subtext2' appName=settings.appName}}</p>
        <div class="row">
          {{#if (eq authConfig.type "activeDirectoryConfig")}}
            <div class="col span-6">
              <div class="inline-form">
                <label class="acc-label pb-5">{{t 'model.openldapconfig.serviceAccountUsername.label'}}{{field-required}}</label>
                {{input value=authConfig.serviceAccountUsername classNames="form-control"}}
              </div>
            </div>
          {{else}}
            <div class="col span-6">
              <div class="inline-form">
                <label class="acc-label pb-5">{{t 'ldap.accessConfig.serviceAccountDistinguishedName.labelText'}}{{field-required}}</label>
                {{input value=authConfig.serviceAccountDistinguishedName classNames="form-control"}}
              </div>
            </div>
          {{/if}}
          <div class="col span-6">
            <div class="inline-form">
              <label class="acc-label pb-5">{{t 'model.openldapconfig.serviceAccountPassword.label'}}{{field-required}}</label>
              {{input type="password" value=authConfig.serviceAccountPassword classNames="form-control"}}
            </div>
          </div>
        </div>
        {{#if (eq authConfig.type "activeDirectoryConfig")}}
          <div class="row">
{'fraction_non_alphanumeric': 0.18464024003231205, 'fraction_numerical': 0.006347008251110726, 'mean_word_length': 2.5538240721755177, 'pattern_counts': {'":': 0, '<': 419, '<?xml version=': 0, '>': 419, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4223210', 'n_tokens_mistral': 5381, 'n_tokens_neox': 5205, 'n_words': 814}