<div class="ui-fixed-width-wide" ng-disabled="!upgrade.canEdit">
    <div class="admin-form" ng-form="upgrade.form">
        <div class="ui-field">
            <span class="ui-field-label">{{::InitializationText.Label_UpgradeServer}}</span>
            <span class="ui-text">{{::upgrade.upgradeInfo.value.Server}}</span>
        </div>
        <div class="ui-field">
            <span class="ui-field-label">{{::InitializationText.Label_UpgradeDatabase}}</span>
            <span class="ui-text">{{::upgrade.upgradeInfo.value.DatabaseName}}</span>
        </div>
        <div class="ui-field">
            <span class="ui-field-label">{{::InitializationText.Label_UpgradeDatabaseVersion}}</span>
            <span class="ui-text">{{::upgrade.databaseVersion}}</span>
        </div>
        <div class="ui-field">
            <span class="ui-field-label">{{::InitializationText.Label_UpgradeVersion}}</span>
            <span class="ui-text">{{::upgrade.upgradeInfo.value.UpgradeVersion}}</span>
        </div>
        <div ng-if="::upgrade.upgradeInfo.value.CanBackup">
            <label class="ui-field ui-checkbox" tooltip="InitializationTooltips.BackupDatabase">
                <input type="checkbox" ng-model="upgrade.backup"/>
                <span class="ui-checkbox-label">{{::InitializationText.Label_BackupDatabase}}</span>
            </label>
            <impersonation ng-model="upgrade.upgradeConfig.ElevatedCredentials"
                           ng-disabled="!upgrade.backup"
                           impersonate-label="{{::InitializationText.Label_BackupWithImpersonation}}"
                           enabled-error="upgrade.impersonationEnabledError"
                           credentials-error="upgrade.impersonationCredentialsError"
                           user-error="upgrade.impersonationUserError">
            </impersonation>
        </div>
    </div>
    <div class="admin-form" ng-if="::upgrade.upgradeInfo.value.PromptForReportProductUsage">
        <div class="ui-title">{{::CoreSettingsText.cApplicationMetrics}}</div>
        <label tooltip="SettingsTooltips.ReportProductUsage" class="ui-checkbox ui-text">
            <input type="checkbox" ng-model="upgrade.upgradeConfig.ReportProductUsage">
            <span>{{::CoreSettingsText.pReportProductUsage}}</span>
        </label>
    </div>
    <div class="admin-form buttonContainer">
        <a ui-sref="initializeExisting" class="button-raised" ng-show="upgrade.canEdit">{{::InitializationText.Label_ConnectToDifferentDatabase}}</a>
        <a ui-sref="initializeNew" class="button-raised" ng-show="upgrade.canEdit">{{::InitializationText.Label_CreateNewDatabaseShort}}</a>
        <spinner-medium ng-if="upgrade.applying.isPending"></spinner-medium>
        <button type="button" ng-click="upgrade.apply()" class="button-raised button-primary">{{::InitializationText.Label_UpgradeExistingDatabase}}</button>
    </div>
</div>