<section>
  <div class="banner bg-warning">
    <div class="banner-icon"><span class="icon icon-alert"></span></div>
    <div class="banner-message">
      <p>{{t 'authPage.shibboleth.disabled.label' providerName=(t providerName)}}</p>
    </div>
  </div>
</section>
<section class="box mt-30">
  <h2>{{t 'authPage.shibboleth.disabled.header'}}</h2>
  <hr />
  <div class="row">
    <div class="col span-6">
      <label class="acc-label pb-5">{{t 'authPage.shibboleth.disabled.name.labelText'}}{{field-required}}</label>
      {{input type="text" value=config.displayNameField classNames="form-control"}}
    </div>
    <div class="col span-6">
      <label class="acc-label pb-5">{{t 'authPage.shibboleth.disabled.username.labelText'}}{{field-required}}</label>
      {{input type="text" value=config.userNameField classNames="form-control"}}
    </div>
  </div>
  <div class="row">
    <div class="col span-6">
      <label class="acc-label pb-5">{{t 'authPage.shibboleth.disabled.uid.labelText'}}{{field-required}}</label>
      {{input type="text" value=config.uidField classNames="form-control"}}
    </div>
    <div class="col span-6">
      <label class="acc-label pb-5">{{t 'authPage.shibboleth.disabled.groups.labelText'}}{{field-required}}</label>
      {{input type="text" value=config.groupsField classNames="form-control"}}
    </div>
  </div>
  <div class="row pt-20">
    <div class="col span-4">
      <div class="inline-form">
        <label class="acc-label pb-5">{{t 'inputCertificate.key.label'}}{{field-required}}</label>
        {{input-text-file
            value=config.spKey
            accept="text/*, .pem, .pkey, .key"
            minHeight=60
            placeholder="inputCertificate.key.placeholder"
            classNames="box"
        }}
      </div>
    </div>
    <div class="col span-4">
      <div class="inline-form">
        <label class="acc-label pb-5">{{t 'inputCertificate.cert.label'}}{{field-required}}</label>
        {{input-text-file
            accept="text/*, .pem, .crt"
            value=config.spCert
            minHeight=60
            placeholder="inputCertificate.cert.placeholder"
            classNames="box"
        }}
      </div>
    </div>
    <div class="col span-4">
      <div class="inline-form">
        <label class="acc-label pb-5">{{t 'inputCertificate.metaXML.label'}}{{field-required}}</label>
        {{input-text-file
            accept="text/xml"
            value=config.idpMetadataContent
            minHeight=60
            placeholder="inputCertificate.metaXML.placeholder"
            classNames="box"
        }}
      </div>
    </div>
  </div>
  <div class="row">
    <div class="inline-form">
      <label class="acc-label pb-5">&nbsp;</label>
      <button class="btn bg-primary" style="display: block;margin: 0 auto;" {{action "save"}}>
        {{#if saving}}
          <i class="icon icon-spinner icon-spin"></i> {{t 'generic.saving'}}
        {{else if saved}}
          {{t 'generic.saved'}}
        {{else}}
          {{t 'generic.save'}}
        {{/if}}
      </button>
    </div>
  </div>
</section>
<section class="box mt-30">
  <h3>{{t 'authPage.shibboleth.disabled.testAuth.header'}}</h3>
  <hr/>
  {{top-errors errors=errors}}
  <div class="row">
    <p>{{t 'authPage.github.testAuth.subtext'}}</p>
    <button class="btn bg-primary" {{action "authTest"}} disabled={{disableAuth}}>
      {{#if testing}}
        <i class="icon icon-spinner icon-spin"></i> {{t 'generic.testing'}}
      {{else}}
        {{t 'generic.test'}}
      {{/if}}
    </button>
  </div>
</section>
