diff --git a/awx/ui/client/legacy-styles/forms.less b/awx/ui/client/legacy-styles/forms.less index 0556f7e1cd..df21f8534c 100644 --- a/awx/ui/client/legacy-styles/forms.less +++ b/awx/ui/client/legacy-styles/forms.less @@ -364,6 +364,16 @@ input[type='radio']:checked:before { justify-content: flex-end; } +.Form-button{ + margin-left: 4px; +} + +.Form-buttonDefault { + background-color: @default-bg; + color: @default-interface-txt; + border-color: @default-border; +} + .Form-saveButton{ background-color: @submit-button-bg; margin-right: 20px; diff --git a/awx/ui/client/legacy-styles/main-layout.less b/awx/ui/client/legacy-styles/main-layout.less index 803d554eaf..5b7f8f1c01 100644 --- a/awx/ui/client/legacy-styles/main-layout.less +++ b/awx/ui/client/legacy-styles/main-layout.less @@ -91,6 +91,10 @@ body { margin-top: 20px; } +.btn{ + text-transform: uppercase; +} + @media (max-width: 1075px) { #main-menu-container { diff --git a/awx/ui/client/src/adhoc/adhoc.controller.js b/awx/ui/client/src/adhoc/adhoc.controller.js index 24a289ebe9..cb9e0a648e 100644 --- a/awx/ui/client/src/adhoc/adhoc.controller.js +++ b/awx/ui/client/src/adhoc/adhoc.controller.js @@ -1,5 +1,5 @@ /************************************************* - * Copyright (c) 2015 Ansible, Inc. + * Copyright (c) 2016 Ansible, Inc. * * All Rights Reserved *************************************************/ @@ -10,7 +10,7 @@ * @description This controller controls the adhoc form creation, command launching and navigating to standard out after command has been succesfully ran. */ function adhocController($q, $scope, $rootScope, $location, $stateParams, - CheckPasswords, PromptForPasswords, CreateLaunchDialog, adhocForm, + $state, CheckPasswords, PromptForPasswords, CreateLaunchDialog, adhocForm, GenerateForm, Rest, ProcessErrors, ClearScope, GetBasePath, GetChoices, KindChange, LookUpInit, CredentialList, Empty, Wait) { @@ -162,6 +162,10 @@ function adhocController($q, $scope, $rootScope, $location, $stateParams, privateFn.initializeForm(id, urls, hostPattern); + $scope.formCancel = function(){ + $state.go('inventoryManage'); + } + // remove all data input into the form and reset the form back to defaults $scope.formReset = function () { GenerateForm.reset(); @@ -291,7 +295,7 @@ function adhocController($q, $scope, $rootScope, $location, $stateParams, } export default ['$q', '$scope', '$rootScope', '$location', '$stateParams', - 'CheckPasswords', 'PromptForPasswords', 'CreateLaunchDialog', 'adhocForm', + '$state', 'CheckPasswords', 'PromptForPasswords', 'CreateLaunchDialog', 'adhocForm', 'GenerateForm', 'Rest', 'ProcessErrors', 'ClearScope', 'GetBasePath', 'GetChoices', 'KindChange', 'LookUpInit', 'CredentialList', 'Empty', 'Wait', adhocController]; diff --git a/awx/ui/client/src/adhoc/adhoc.form.js b/awx/ui/client/src/adhoc/adhoc.form.js index d200d37b47..2632a0e7bb 100644 --- a/awx/ui/client/src/adhoc/adhoc.form.js +++ b/awx/ui/client/src/adhoc/adhoc.form.js @@ -12,7 +12,7 @@ export default function() { return { - editTitle: 'Execute Command', + addTitle: 'Execute Command', name: 'adhoc', well: true, forceListeners: true, @@ -125,13 +125,16 @@ export default function() { buttons: { launch: { - label: 'Launch', + label: 'Save', ngClick: 'launchJob()', - ngDisabled: true + ngDisabled: true, + 'class': 'Form-buttonDefault Form-button' }, reset: { ngClick: 'formReset()', - ngDisabled: true + ngDisabled: true, + label: 'Reset', + 'class': 'Form-buttonDefault Form-button' } }, diff --git a/awx/ui/client/src/adhoc/adhoc.partial.html b/awx/ui/client/src/adhoc/adhoc.partial.html index 7420af3ea9..eb25ec5b56 100644 --- a/awx/ui/client/src/adhoc/adhoc.partial.html +++ b/awx/ui/client/src/adhoc/adhoc.partial.html @@ -1,4 +1,4 @@ -