1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 09:51:09 +03:00

ensure correct system and auth forms are loaded

This commit is contained in:
Jake McDermott 2018-04-09 11:07:34 -04:00
parent 27e8e55d15
commit 67ba534097
No known key found for this signature in database
GPG Key ID: 3B02CAD476EECB35
4 changed files with 47 additions and 10 deletions

View File

@ -82,7 +82,7 @@ export default [
};
var activeForm = function() {
if(!$scope.$parent[formTracker.currentFormName()].$dirty) {
if(!_.get($scope.$parent, [formTracker.currentFormName(), '$dirty'])) {
authVm.activeAuthForm = getActiveAuthForm();
formTracker.setCurrentAuth(authVm.activeAuthForm);
startCodeMirrors();

View File

@ -169,7 +169,7 @@ export default [
setCurrentSystem: function(form) {
this.currentSystem = form;
this.setCurrent(this.currentSystem);
}
},
};
// Default to auth form and tab
@ -275,7 +275,13 @@ export default [
vm.activeTab = setForm;
if (setForm !== 'license') {
formTracker.setCurrent(setForm);
if (setForm === 'auth') {
formTracker.setCurrentAuth(formTracker.currentAuth);
} else if (setForm === 'system') {
formTracker.setCurrentSystem(formTracker.currenSystem);
} else {
formTracker.setCurrent(setForm);
}
$state.go('configuration', {
currentTab: setForm

View File

@ -7,16 +7,47 @@
<div class="tab-pane" id="configuration-panel">
<div ng-cloak id="htmlTemplate" class="Panel">
<div class="Form-header">
<div class="Form-title Form-title--uppercase" translate>CONFIGURE {{BRAND_NAME}}</div>
<div class="Form-title Form-title--uppercase" translate>CONFIGURE {{ BRAND_NAME }}</div>
</div>
<div class="row Form-tabRow">
<div class="col-lg-12">
<div class="Form-tabHolder"ng-class="{'Form-tabHolder--licenseSelected': vm.activeTab === 'license'}">
<div class="Form-tab" ng-click="vm.activeTabCheck('auth')" ng-class="{'is-selected': vm.activeTab === 'auth' }" translate>Authentication</div>
<div class="Form-tab" ng-click="vm.activeTabCheck('jobs')" ng-class="{'is-selected': vm.activeTab === 'jobs' }" translate>Jobs</div>
<div class="Form-tab" ng-click="vm.activeTabCheck('system')" ng-class="{'is-selected': vm.activeTab === 'system' }" translate>System</div>
<div class="Form-tab" ng-click="vm.activeTabCheck('ui')" ng-class="{'is-selected': vm.activeTab === 'ui' }" translate>User Interface</div>
<div class="Form-tab" ng-show="vm.product === 'Tower'" ng-click="vm.activeTabCheck('license')" ng-class="{'is-selected': vm.activeTab === 'license' }" translate>License</div>
<div id="auth_tab"
class="Form-tab"
ng-click="vm.activeTabCheck('auth')"
ng-class="{'is-selected': vm.activeTab === 'auth' }"
translate>
Authentication
</div>
<div id="jobs_tab"
class="Form-tab"
ng-click="vm.activeTabCheck('jobs')"
ng-class="{'is-selected': vm.activeTab === 'jobs' }"
translate>
Jobs
</div>
<div id="system_tab"
class="Form-tab"
ng-click="vm.activeTabCheck('system')"
ng-class="{'is-selected': vm.activeTab === 'system' }"
translate>
System
</div>
<div id="ui_tab"
class="Form-tab"
ng-click="vm.activeTabCheck('ui')"
ng-class="{'is-selected': vm.activeTab === 'ui' }"
translate>
User Interface
</div>
<div id="license_tab"
class="Form-tab"
ng-show="vm.product === 'Tower'"
ng-click="vm.activeTabCheck('license')"
ng-class="{'is-selected': vm.activeTab === 'license' }"
translate>
License
</div>
</div>
</div>
</div>

View File

@ -47,7 +47,7 @@ export default [
}
var activeForm = function() {
if(!$scope.$parent[formTracker.currentFormName()].$dirty) {
if(!_.get($scope.$parent, [formTracker.currentFormName(), '$dirty'])) {
systemVm.activeSystemForm = systemVm.dropdownValue;
formTracker.setCurrentSystem(systemVm.activeSystemForm);
} else {