diff --git a/awx/ui/client/src/configuration/system-form/configuration-system.controller.js b/awx/ui/client/src/configuration/system-form/configuration-system.controller.js index 2774c8ade5..da5a76181b 100644 --- a/awx/ui/client/src/configuration/system-form/configuration-system.controller.js +++ b/awx/ui/client/src/configuration/system-form/configuration-system.controller.js @@ -5,7 +5,7 @@ *************************************************/ export default [ - '$rootScope', '$scope', '$state', '$stateParams', + '$rootScope', '$scope', '$state', '$stateParams', '$timeout', 'AngularCodeMirror', 'systemActivityStreamForm', 'systemLoggingForm', @@ -16,7 +16,7 @@ export default [ 'GenerateForm', 'i18n', function( - $rootScope, $scope, $state, $stateParams, + $rootScope, $scope, $state, $stateParams, $timeout, AngularCodeMirror, systemActivityStreamForm, systemLoggingForm, @@ -171,6 +171,12 @@ export default [ }); + // Fix for bug where adding selected opts causes form to be $dirty and triggering modal + // TODO Find better solution for this bug + $timeout(function(){ + $scope.$parent.configuration_logging_template_form.$setPristine(); + }, 1000); + angular.extend(systemVm, { activeForm: activeForm, activeSystemForm: activeSystemForm, diff --git a/awx/ui/client/src/configuration/system-form/configuration-system.form.js b/awx/ui/client/src/configuration/system-form/configuration-system.form.js deleted file mode 100644 index 159dd99ee1..0000000000 --- a/awx/ui/client/src/configuration/system-form/configuration-system.form.js +++ /dev/null @@ -1,54 +0,0 @@ -/************************************************* - * Copyright (c) 2016 Ansible, Inc. - * - * All Rights Reserved - *************************************************/ - -export default ['i18n', function(i18n) { - return { - showHeader: false, - name: 'configuration_system_template', - showActions: true, - - fields: { - TOWER_URL_BASE: { - type: 'text', - reset: 'TOWER_URL_BASE', - }, - TOWER_ADMIN_ALERTS: { - type: 'toggleSwitch', - }, - ACTIVITY_STREAM_ENABLED: { - type: 'toggleSwitch', - }, - ACTIVITY_STREAM_ENABLED_FOR_INVENTORY_SYNC: { - type: 'toggleSwitch' - }, - ORG_ADMINS_CAN_SEE_ALL_USERS: { - type: 'toggleSwitch', - }, - // LICENSE: { - // type: 'textarea', - // rows: 6, - // codeMirror: true, - // class: 'Form-textAreaLabel Form-formGroup--fullWidth' - // } - }, - - buttons: { - reset: { - ngClick: 'vm.resetAllConfirm()', - label: i18n._('Reset All'), - class: 'Form-button--left Form-cancelButton' - }, - cancel: { - ngClick: 'vm.formCancel()', - }, - save: { - ngClick: 'vm.formSave()', - ngDisabled: true - } - } - }; -} -]; diff --git a/awx/ui/client/src/configuration/system-form/sub-forms/system-logging.form.js b/awx/ui/client/src/configuration/system-form/sub-forms/system-logging.form.js index 5264f3c845..ee99024b45 100644 --- a/awx/ui/client/src/configuration/system-form/sub-forms/system-logging.form.js +++ b/awx/ui/client/src/configuration/system-form/sub-forms/system-logging.form.js @@ -23,6 +23,7 @@ type: 'select', reset: 'LOG_AGGREGATOR_TYPE', ngOptions: 'type.label for type in LOG_AGGREGATOR_TYPE_options track by type.value', + multiSelect: true }, LOG_AGGREGATOR_USERNAME: { type: 'text',