Use string interpolation rather than passing action text in via a var

This commit is contained in:
mabashian 2018-04-25 11:41:20 -04:00
parent 82f2783c97
commit cf38faa899
6 changed files with 5 additions and 8 deletions

View File

@ -33,6 +33,7 @@ export default ['$filter', '$state', '$stateParams', '$http', 'Wait',
};
$scope.preventCredsWithPasswords = true;
$scope.strings = TemplatesStrings;
/*
* This is a workaround for the angular-scheduler library inserting `ll` into fields after an
@ -88,8 +89,6 @@ export default ['$filter', '$state', '$stateParams', '$http', 'Wait',
$scope.hideForm = true;
$scope.promptActionText = TemplatesStrings.get('prompt.CONFIRM');
// extra_data field is not manifested in the UI when scheduling a Management Job
if ($state.current.name === 'jobTemplateSchedules.add'){
$scope.parseType = 'yaml';

View File

@ -21,7 +21,7 @@ function($filter, $state, $stateParams, Wait, $scope, moment,
$scope.hideForm = true;
$scope.parseType = 'yaml';
$scope.promptActionText = TemplatesStrings.get('prompt.CONFIRM');
$scope.strings = TemplatesStrings;
$scope.processSchedulerEndDt = function(){
// set the schedulerEndDt to be equal to schedulerStartDt + 1 day @ midnight

View File

@ -686,5 +686,5 @@
ng-disabled="!schedulerIsValid || promptModalMissingReqFields"> Save</button>
</div>
</div>
<prompt prompt-data="promptData" action-text="promptActionText" prevent-creds-with-passwords="preventCredsWithPasswords"></prompt>
<prompt prompt-data="promptData" action-text="{{:: strings.get('prompt.CONFIRM')}}" prevent-creds-with-passwords="preventCredsWithPasswords"></prompt>
</div>

View File

@ -5,7 +5,7 @@ export default [ 'templateUrl',
scope: {
promptData: '=',
onFinish: '&',
actionText: '@actionText',
actionText: '@',
preventCredsWithPasswords: '<'
},
templateUrl: templateUrl('templates/prompt/prompt'),

View File

@ -16,8 +16,6 @@ export default ['$scope', 'WorkflowService', 'GetBasePath', 'TemplatesService',
$scope.strings = TemplatesStrings;
$scope.preventCredsWithPasswords = true;
$scope.promptActionText = $scope.strings.get('prompt.CONFIRM');
$scope.workflowMakerFormConfig = {
nodeMode: "idle",
activeTab: "jobs",

View File

@ -129,5 +129,5 @@
<button type="button" class="btn btn-sm WorkflowMaker-cancelButton" ng-click="closeWorkflowMaker()"> Close</button>
<button type="button" class="btn btn-sm WorkflowMaker-saveButton" ng-click="saveWorkflowMaker()" ng-show="workflowJobTemplateObj.summary_fields.user_capabilities.edit || canAddWorkflowJobTemplate" ng-disabled="edgeFlags.conflict || workflowMakerFormConfig.nodeMode === 'add'"> Save</button>
</div>
<prompt prompt-data="promptData" action-text="promptActionText" prevent-creds-with-passwords="preventCredsWithPasswords"></prompt>
<prompt prompt-data="promptData" action-text="{{:: strings.get('prompt.CONFIRM')}}" prevent-creds-with-passwords="preventCredsWithPasswords"></prompt>
</div>