<div class="l-admin-content">
    <div ng-form="config.form">
        <div class="admin-form">
            <div class="ui-fixed-width-wide">
                <span class="ui-title">{{::SettingsText.Label_OrganizationName}}</span>
                <label class="ui-field" tooltip="InitializationTooltips.OrganizationName">
                    <input type="text"
                           required
                           ng-pattern="'[^\\\\/]*'"
                           ng-model="config.orgName"
                           ng-model-options="{ updateOn: 'default blur', debounce: { default: 500 } }"
                           custom-validation="{ unique: !config.orgNameConflict.value }"
                           name="name"
                           class="ui-input-box ui-field-input" />
                    <spinner-medium ng-if="config.orgNameConflict.isPending"></spinner-medium>
                    <span ng-if="!config.orgNameConflict.isPending && config.form.name.$dirty">
                        <ng-messages for="config.form.name.$error" class="ui-validation">
                            <span ng-message="required" class="ui-indicator-medium ui-indicator-error" title="{{::SettingsText.Message_TenantNameEmpty}}"></span>
                            <span ng-message="pattern" class="ui-indicator-medium ui-indicator-error" title="{{::SettingsText.Message_InvalidTenantName}}"></span>
                            <span ng-message="unique" class="ui-indicator-medium ui-indicator-error" title="{{::SettingsText.Message_TenantExists}}"></span>
                        </ng-messages>
                    </span>
                </label>
                <label class="ui-field" tooltip="InitializationTooltips.OrganizationAddress">
                    <span class="ui-field-label">{{::SettingsText.Label_OrganizationAddress}}</span>
                    <span class="ui-text">{{config.orgAddress}}</span>
                </label>
            </div>
        </div>
        <dataserver-config ng-if="config.showDataServerConfig" class="admin-form"></dataserver-config>


        <div class="admin-form buttonContainer">
            <spinner-medium ng-if="config.saving.isPending"></spinner-medium>
            <button ng-click="config.save()" ng-disabled="config.saving.isPending" class="button-raised button-primary">{{::InitializationText.Label_Create}}</button>
        </div>
    </div>
</div>
