From 312c76788d9e38fa82265417e9c8efb5ce372722 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Mon, 15 Dec 2014 10:14:14 -0500 Subject: [PATCH] Copy JT Cleared the value of the copy JT form of any stale text --- awx/ui/static/js/controllers/JobTemplates.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/awx/ui/static/js/controllers/JobTemplates.js b/awx/ui/static/js/controllers/JobTemplates.js index ffbf445be5..9110638ccf 100644 --- a/awx/ui/static/js/controllers/JobTemplates.js +++ b/awx/ui/static/js/controllers/JobTemplates.js @@ -165,10 +165,14 @@ function JobTemplatesList($scope, $rootScope, $location, $log, $routeParams, Res $scope.removeCopyDialogReady(); } $scope.removeCopyDialogReady = $scope.$on('CopyDialogReady', function() { + //clear any old remaining text + $scope.new_copy_name = "" ; + $scope.copy_form.$setPristine(); $('#copy-job-modal').dialog('open'); $('#job-copy-button').attr('ng-disabled', "!copy_form.$valid"); element = angular.element(document.getElementById('job-copy-button')); $compile(element)($scope); + }); if ($scope.removeGoToCopy) {