{% if info.error|default(null) %}

  <div class="form-group">
    <div class="col-md-6 col-md-offset-3">
      <div class="alert alert-danger key-error-alert">
        {{ 'admin.edu_cloud.key_info.key_error_tips'|trans|copyright_less }}
      </div>
    </div>
  </div>

{% else %}

  {% if not info.licenseDomains|default(null) %}

  <div class="form-group">
    <label class="col-md-3 control-label">{{'admin.edu_cloud.key_info.license_domain'|trans}}</label>
    <div class="col-md-6">
      <p class="form-control-static">{{ app.request.server.get('HTTP_HOST') }} <span class="text-warning">({{'admin.edu_cloud.key_info.not_license_tips'|trans}})</span></p>
      <p class="help-block">{{'admin.edu_cloud.key_info.domain_bind_tips'|trans}}</p>
    </div>
  </div>

  <div class="form-group">
    <div class="col-md-6 col-md-offset-3">
      <button type="button" class="btn btn-sm btn-warning key-bind-btn" data-url="{{ path('admin_v2_setting_cloud_key_bind') }}" data-loading-text="{{'admin.edu_cloud.key_info.domain_bind.submiting'|trans}}">{{'admin.edu_cloud.key_info.domain_bind'|trans}}</button>
    </div>
  </div>

  {% else %}

    <div class="form-group">
      <label class="col-md-3 control-label">{{'admin.edu_cloud.key_info.license_info'|trans}}</label>
      <div class="col-md-6">
        <p class="form-control-static">{{ info.levelName }}</p>
      </div>
    </div>

    <div class="form-group">
      <label class="col-md-3 control-label">{{'admin.edu_cloud.key_info.license_domain'|trans}}</label>
      <div class="col-md-6">
        <p class="form-control-static text-success">{% if info.licenseDomainCount|default(1) == 1 %}{{ info.licenseDomains }}{% else %}<span class="license-domain" data-toggle="tooltip" data-placement="bottom" title="{% for doman in info.licenseDomains|split(';') %}{{doman}}
        {% endfor %}">{{info.licenseDomainCount}}{{ 'site.data.num'|trans }}</span>{% endif %}</p>
        {% if currentHost not in info.licenseDomains|split(';') %}
          <div class="alert alert-danger">
            {{'admin.edu_cloud.key_info.licese_domain_not_match_tips'|trans({'%currentHost%':currentHost,'%EduSoho%': 'EduSoho'|copyright_less})}}
          </div>
        {% endif %}
      </div>
    </div>



    {% if info.copyright and info.thirdCopyright != 2 and currentHost in info.licenseDomains|split(';')%}
      <div class="form-group">
        <label class="col-md-3 control-label">{{'admin.edu_cloud.key_info.copyright_name'|trans}}</label>
        <div class="col-md-6">
          <input id="field-copyrightName" class="form-control" type="text" name="copyrightName" value="{{ setting('copyright.name', '') }}">
          <p class="help-block">{{'admin.edu_cloud.key_info.copyright_name_hint'|trans}}</p>
        </div>
      </div>

      <div class="form-group">
        <div class="col-md-6 col-md-offset-3">
          <button class="btn btn-primary save-copyright-btn" data-url="{{ path('admin_v2_setting_cloud_key_copyright') }}" data-loading-text="{{'admin.edu_cloud.key_info.copyright_save.submiting'|trans}}">{{'admin.edu_cloud.key_info.copyright_save_btn'|trans}}</button>
        </div>
      </div>
    {% else %}
    <div class="form-group">
        <label class="col-md-3 control-label">{{'admin.edu_cloud.key_info.copyright_info'|trans}}</label>
        <div class="col-md-6">
          <p class="form-control-static">{{'admin.edu_cloud.key_info.copyright_not_remove_hint'|trans}}</p>
        </div>
      </div>
    {% endif %}




  {% endif %}

{% endif %}

