From feaee64706f7460ba09db45e3c903334520466db Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Tue, 16 Dec 2014 01:22:22 -0500 Subject: [PATCH] Made SCM update button disabled on edit projects On the edits project page I disabled the button if the SCM type is manual. --- awx/ui/static/js/forms/Projects.js | 3 ++- awx/ui/static/lib/ansible/generator-helpers.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/awx/ui/static/js/forms/Projects.js b/awx/ui/static/js/forms/Projects.js index e9822ccc66..5791ef43e2 100644 --- a/awx/ui/static/js/forms/Projects.js +++ b/awx/ui/static/js/forms/Projects.js @@ -32,7 +32,8 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition']) awToolTip: "{{ scm_update_tooltip }}", dataTipWatch: "scm_update_tooltip", ngClass: "scm_type_class", - dataPlacement: 'top' + dataPlacement: 'top', + ngDisabled: "scm_type.value === 'manual' " }, stream: { 'class': "btn-primary btn-xs activity-btn", diff --git a/awx/ui/static/lib/ansible/generator-helpers.js b/awx/ui/static/lib/ansible/generator-helpers.js index 979b662aa6..42985f96eb 100644 --- a/awx/ui/static/lib/ansible/generator-helpers.js +++ b/awx/ui/static/lib/ansible/generator-helpers.js @@ -219,7 +219,7 @@ angular.module('GeneratorHelpers', []) html += (btn.dataTitle) ? Attr(btn, 'dataTitle') : ""; html += (btn.ngShow) ? Attr(btn, 'ngShow') : ""; html += (btn.ngHide) ? Attr(btn, 'ngHide') : ""; - html += (btn.ngDisabled) ? Attr(btn, 'ngHide') : ""; + html += (btn.ngDisabled) ? Attr(btn, 'ngDisabled') : ""; html += (btn.ngClass) ? Attr(btn, 'ngClass') : ""; html += (btn.awTipPlacement) ? Attr(btn, 'awTipPlacement') : ""; html += " >";