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:
parent
27e8e55d15
commit
67ba534097
@ -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();
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user