From 565b0b82dd90498f733b0ca4972c97d104114b91 Mon Sep 17 00:00:00 2001 From: mabashian Date: Fri, 17 Nov 2017 12:45:01 -0500 Subject: [PATCH 1/3] Tweaked language on delete warning modal --- awx/ui/client/features/credentials/credentials.strings.js | 3 +-- .../src/credentials/list/credentials-list.controller.js | 2 +- .../inventories/list/inventory-list.controller.js | 2 +- .../related/sources/list/sources-list.controller.js | 2 +- .../client/src/inventories-hosts/inventory-hosts.strings.js | 6 ++---- .../src/inventory-scripts/inventory-scripts.strings.js | 3 +-- awx/ui/client/src/inventory-scripts/list/list.controller.js | 2 +- awx/ui/client/src/projects/list/projects-list.controller.js | 2 +- awx/ui/client/src/projects/projects.strings.js | 3 +-- .../client/src/templates/list/templates-list.controller.js | 2 +- awx/ui/client/src/templates/templates.strings.js | 3 +-- 11 files changed, 12 insertions(+), 18 deletions(-) diff --git a/awx/ui/client/features/credentials/credentials.strings.js b/awx/ui/client/features/credentials/credentials.strings.js index 64af74726e..a89015dddd 100644 --- a/awx/ui/client/features/credentials/credentials.strings.js +++ b/awx/ui/client/features/credentials/credentials.strings.js @@ -29,8 +29,7 @@ function CredentialsStrings (BaseString) { }; ns.deleteCredential = { - CONFIRM: t.s('Are you sure you want to delete this credential?'), - INVALIDATE: t.s('Doing so will invalidate the following:') + CONFIRM: t.s('The credential is currently being used by other resources. Are you sure you want to delete this credential?') }; } diff --git a/awx/ui/client/src/credentials/list/credentials-list.controller.js b/awx/ui/client/src/credentials/list/credentials-list.controller.js index da2b27858b..8a37b3f7ae 100644 --- a/awx/ui/client/src/credentials/list/credentials-list.controller.js +++ b/awx/ui/client/src/credentials/list/credentials-list.controller.js @@ -123,7 +123,7 @@ export default ['$scope', 'Rest', 'CredentialList', 'Prompt', 'ProcessErrors', ' }); if (invalidateRelatedLines && invalidateRelatedLines.length > 0) { - deleteModalBody = `
${CredentialsStrings.get('deleteCredential.CONFIRM')} ${CredentialsStrings.get('deleteCredential.INVALIDATE')}
`; + deleteModalBody = `
${CredentialsStrings.get('deleteCredential.CONFIRM')}
`; invalidateRelatedLines.forEach(invalidateRelatedLine => { deleteModalBody += invalidateRelatedLine; }); diff --git a/awx/ui/client/src/inventories-hosts/inventories/list/inventory-list.controller.js b/awx/ui/client/src/inventories-hosts/inventories/list/inventory-list.controller.js index ee1783fec8..d30be1272e 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/list/inventory-list.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/list/inventory-list.controller.js @@ -110,7 +110,7 @@ function InventoriesList($scope, }); if (invalidateRelatedLines && invalidateRelatedLines.length > 0) { - deleteModalBody = `
${InventoryHostsStrings.get('deleteInventory.CONFIRM')} ${InventoryHostsStrings.get('deleteInventory.INVALIDATE')}
`; + deleteModalBody = `
${InventoryHostsStrings.get('deleteInventory.CONFIRM')}
`; invalidateRelatedLines.forEach(invalidateRelatedLine => { deleteModalBody += invalidateRelatedLine; }); diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/sources/list/sources-list.controller.js b/awx/ui/client/src/inventories-hosts/inventories/related/sources/list/sources-list.controller.js index b65c0433aa..c4fed3f97b 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/sources/list/sources-list.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/sources/list/sources-list.controller.js @@ -152,7 +152,7 @@ }); if (invalidateRelatedLines && invalidateRelatedLines.length > 0) { - deleteModalBody = `
${InventoryHostsStrings.get('deleteSource.CONFIRM')} ${InventoryHostsStrings.get('deleteSource.INVALIDATE')}
`; + deleteModalBody = `
${InventoryHostsStrings.get('deleteSource.CONFIRM')}
`; invalidateRelatedLines.forEach(invalidateRelatedLine => { deleteModalBody += invalidateRelatedLine; }); diff --git a/awx/ui/client/src/inventories-hosts/inventory-hosts.strings.js b/awx/ui/client/src/inventories-hosts/inventory-hosts.strings.js index 0744be46db..878aa7af27 100644 --- a/awx/ui/client/src/inventories-hosts/inventory-hosts.strings.js +++ b/awx/ui/client/src/inventories-hosts/inventory-hosts.strings.js @@ -5,13 +5,11 @@ function InventoryHostsStrings (BaseString) { let ns = this['inventory-hosts']; ns.deleteInventory = { - CONFIRM: t.s('Are you sure you want to delete this inventory?'), - INVALIDATE: t.s('Doing so will invalidate the following:') + CONFIRM: t.s('The inventory is currently being used by other resources. Are you sure you want to delete this inventory?') }; ns.deleteSource = { - CONFIRM: t.s('Are you sure you want to delete this inventory source?'), - INVALIDATE: t.s('Doing so will invalidate the following:') + CONFIRM: t.s('The inventory source is currently being used by other resources. Are you sure you want to delete this inventory source?') }; ns.deletegroup = { diff --git a/awx/ui/client/src/inventory-scripts/inventory-scripts.strings.js b/awx/ui/client/src/inventory-scripts/inventory-scripts.strings.js index 9b3fccd4af..4442bb9cf0 100644 --- a/awx/ui/client/src/inventory-scripts/inventory-scripts.strings.js +++ b/awx/ui/client/src/inventory-scripts/inventory-scripts.strings.js @@ -5,8 +5,7 @@ function InventoryScriptsStrings (BaseString) { let ns = this.inventory_scripts; ns.deleteInventoryScript = { - CONFIRM: t.s('Are you sure you want to delete this inventory script?'), - INVALIDATE: t.s('Doing so will invalidate the following:') + CONFIRM: t.s('The inventory script is currently being used by other resources. Are you sure you want to delete this inventory script?') }; } diff --git a/awx/ui/client/src/inventory-scripts/list/list.controller.js b/awx/ui/client/src/inventory-scripts/list/list.controller.js index b6630b7c2a..56c9525b9b 100644 --- a/awx/ui/client/src/inventory-scripts/list/list.controller.js +++ b/awx/ui/client/src/inventory-scripts/list/list.controller.js @@ -89,7 +89,7 @@ export default ['$rootScope', '$scope', 'Wait', 'InventoryScriptsList', }); if (invalidateRelatedLines && invalidateRelatedLines.length > 0) { - deleteModalBody = `
${InventoryScriptsStrings.get('deleteInventoryScript.CONFIRM')} ${InventoryScriptsStrings.get('deleteInventoryScript.INVALIDATE')}
`; + deleteModalBody = `
${InventoryScriptsStrings.get('deleteInventoryScript.CONFIRM')}
`; invalidateRelatedLines.forEach(invalidateRelatedLine => { deleteModalBody += invalidateRelatedLine; }); diff --git a/awx/ui/client/src/projects/list/projects-list.controller.js b/awx/ui/client/src/projects/list/projects-list.controller.js index 267eebe887..d61f77192e 100644 --- a/awx/ui/client/src/projects/list/projects-list.controller.js +++ b/awx/ui/client/src/projects/list/projects-list.controller.js @@ -215,7 +215,7 @@ export default ['$scope', '$rootScope', '$log', 'Rest', 'Alert', }); if (invalidateRelatedLines && invalidateRelatedLines.length > 0) { - deleteModalBody = `
${ProjectsStrings.get('deleteProject.CONFIRM')} ${ProjectsStrings.get('deleteProject.INVALIDATE')}
`; + deleteModalBody = `
${ProjectsStrings.get('deleteProject.CONFIRM')}
`; invalidateRelatedLines.forEach(invalidateRelatedLine => { deleteModalBody += invalidateRelatedLine; }); diff --git a/awx/ui/client/src/projects/projects.strings.js b/awx/ui/client/src/projects/projects.strings.js index 84566d12e7..2d8ba011ce 100644 --- a/awx/ui/client/src/projects/projects.strings.js +++ b/awx/ui/client/src/projects/projects.strings.js @@ -5,8 +5,7 @@ function ProjectsStrings (BaseString) { let ns = this.projects; ns.deleteProject = { - CONFIRM: t.s('Are you sure you want to delete this project?'), - INVALIDATE: t.s('Doing so will invalidate the following:') + CONFIRM: t.s('The project is currently being used by other resources. Are you sure you want to delete this project?') }; } diff --git a/awx/ui/client/src/templates/list/templates-list.controller.js b/awx/ui/client/src/templates/list/templates-list.controller.js index bd25143132..54deff2b9e 100644 --- a/awx/ui/client/src/templates/list/templates-list.controller.js +++ b/awx/ui/client/src/templates/list/templates-list.controller.js @@ -173,7 +173,7 @@ export default ['$scope', '$rootScope', }); if (invalidateRelatedLines && invalidateRelatedLines.length > 0) { - deleteModalBody = `
${TemplatesStrings.get('jobTemplates.deleteJobTemplate.CONFIRM')} ${TemplatesStrings.get('jobTemplates.deleteJobTemplate.INVALIDATE')}
`; + deleteModalBody = `
${TemplatesStrings.get('jobTemplates.deleteJobTemplate.CONFIRM')}
`; invalidateRelatedLines.forEach(invalidateRelatedLine => { deleteModalBody += invalidateRelatedLine; }); diff --git a/awx/ui/client/src/templates/templates.strings.js b/awx/ui/client/src/templates/templates.strings.js index 2391ea8134..3d6a8ba3bb 100644 --- a/awx/ui/client/src/templates/templates.strings.js +++ b/awx/ui/client/src/templates/templates.strings.js @@ -6,8 +6,7 @@ function TemplatesStrings (BaseString) { ns.jobTemplates = { deleteJobTemplate: { - CONFIRM: t.s('Are you sure you want to delete this job template?'), - INVALIDATE: t.s('Doing so will invalidate the following:') + CONFIRM: t.s('The job template is currently being used by other resources. Are you sure you want to delete this job template?') } }; From d3da899459543d4adeab118b6dd7136e8ee6fbfe Mon Sep 17 00:00:00 2001 From: mabashian Date: Wed, 22 Nov 2017 13:28:02 -0500 Subject: [PATCH 2/3] Defined delete string in the base with the ability to pass the resource name in --- awx/ui/client/lib/services/base-string.service.js | 4 ++++ .../credential-types/credential-types.strings.js | 1 - .../src/credential-types/list/list.controller.js | 2 +- .../list/credentials-list.controller.js | 4 ++-- .../inventories/list/inventory-list.controller.js | 4 ++-- .../sources/list/sources-list.controller.js | 4 ++-- .../inventories-hosts/inventory-hosts.strings.js | 8 -------- .../inventory-scripts.strings.js | 7 ------- .../src/inventory-scripts/list/list.controller.js | 4 ++-- .../src/projects/list/projects-list.controller.js | 4 ++-- awx/ui/client/src/projects/projects.strings.js | 7 ------- .../templates/list/templates-list.controller.js | 6 +++--- awx/ui/client/src/templates/templates.strings.js | 15 --------------- 13 files changed, 18 insertions(+), 52 deletions(-) diff --git a/awx/ui/client/lib/services/base-string.service.js b/awx/ui/client/lib/services/base-string.service.js index 74d6611956..f086c987a3 100644 --- a/awx/ui/client/lib/services/base-string.service.js +++ b/awx/ui/client/lib/services/base-string.service.js @@ -60,6 +60,10 @@ function BaseStringService (namespace) { this.CANCEL = t.s('CANCEL'); this.SAVE = t.s('SAVE'); this.OK = t.s('OK'); + this.deleteResource = { + USED_BY: resourceType => t.s('The {{ resourceType }} is currently being used by other resources.', { resourceType }), + CONFIRM: resourceType => t.s('Are you sure you want to delete this {{ resourceType }}?', { resourceType }) + }; /** * This getter searches the extending class' namespace first for a match then falls back to diff --git a/awx/ui/client/src/credential-types/credential-types.strings.js b/awx/ui/client/src/credential-types/credential-types.strings.js index ec2e478ef2..037c93a0ce 100644 --- a/awx/ui/client/src/credential-types/credential-types.strings.js +++ b/awx/ui/client/src/credential-types/credential-types.strings.js @@ -5,7 +5,6 @@ function CredentialTypesStrings (BaseString) { let ns = this.credential_types; ns.deleteCredentialType = { - CONFIRM: t.s('Are you sure you want to delete this credential type?'), CREDENTIAL_TYPE_IN_USE: t.s('This credential type is currently being used by one or more credentials. Credentials that use this credential type must be deleted before the credential type can be deleted.') }; } diff --git a/awx/ui/client/src/credential-types/list/list.controller.js b/awx/ui/client/src/credential-types/list/list.controller.js index db44d738c6..6e10b5cb34 100644 --- a/awx/ui/client/src/credential-types/list/list.controller.js +++ b/awx/ui/client/src/credential-types/list/list.controller.js @@ -90,7 +90,7 @@ export default ['$rootScope', '$scope', 'Wait', 'CredentialTypesList', credentialType.getDependentResourceCounts(id) .then((counts) => { let credentialTypeInUse = false; - let deleteModalBody = `
${CredentialTypesStrings.get('deleteCredentialType.CONFIRM')}
`; + let deleteModalBody = `
${CredentialTypesStrings.get('deleteResource.CONFIRM', 'credential type')}
`; counts.forEach(countObj => { if(countObj.count && countObj.count > 0) { diff --git a/awx/ui/client/src/credentials/list/credentials-list.controller.js b/awx/ui/client/src/credentials/list/credentials-list.controller.js index 8a37b3f7ae..658bbdaecb 100644 --- a/awx/ui/client/src/credentials/list/credentials-list.controller.js +++ b/awx/ui/client/src/credentials/list/credentials-list.controller.js @@ -114,7 +114,7 @@ export default ['$scope', 'Rest', 'CredentialList', 'Prompt', 'ProcessErrors', ' credential.getDependentResourceCounts(id) .then((counts) => { const invalidateRelatedLines = []; - let deleteModalBody = `
${CredentialsStrings.get('deleteCredential.CONFIRM')}
`; + let deleteModalBody = `
${CredentialsStrings.get('deleteResource.CONFIRM', 'credential')}
`; counts.forEach(countObj => { if(countObj.count && countObj.count > 0) { @@ -123,7 +123,7 @@ export default ['$scope', 'Rest', 'CredentialList', 'Prompt', 'ProcessErrors', ' }); if (invalidateRelatedLines && invalidateRelatedLines.length > 0) { - deleteModalBody = `
${CredentialsStrings.get('deleteCredential.CONFIRM')}
`; + deleteModalBody = `
${CredentialsStrings.get('deleteResource.USED_BY', 'credential')} ${CredentialsStrings.get('deleteResource.CONFIRM', 'credential')}
`; invalidateRelatedLines.forEach(invalidateRelatedLine => { deleteModalBody += invalidateRelatedLine; }); diff --git a/awx/ui/client/src/inventories-hosts/inventories/list/inventory-list.controller.js b/awx/ui/client/src/inventories-hosts/inventories/list/inventory-list.controller.js index d30be1272e..0846a21561 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/list/inventory-list.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/list/inventory-list.controller.js @@ -101,7 +101,7 @@ function InventoriesList($scope, inventory.getDependentResourceCounts(id) .then((counts) => { const invalidateRelatedLines = []; - let deleteModalBody = `
${InventoryHostsStrings.get('deleteInventory.CONFIRM')}
`; + let deleteModalBody = `
${InventoryHostsStrings.get('deleteResource.CONFIRM', 'inventory')}
`; counts.forEach(countObj => { if(countObj.count && countObj.count > 0) { @@ -110,7 +110,7 @@ function InventoriesList($scope, }); if (invalidateRelatedLines && invalidateRelatedLines.length > 0) { - deleteModalBody = `
${InventoryHostsStrings.get('deleteInventory.CONFIRM')}
`; + deleteModalBody = `
${InventoryHostsStrings.get('deleteResource.USED_BY', 'inventory')} ${InventoryHostsStrings.get('deleteResource.CONFIRM', 'inventory')}
`; invalidateRelatedLines.forEach(invalidateRelatedLine => { deleteModalBody += invalidateRelatedLine; }); diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/sources/list/sources-list.controller.js b/awx/ui/client/src/inventories-hosts/inventories/related/sources/list/sources-list.controller.js index c4fed3f97b..ef8c505943 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/sources/list/sources-list.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/sources/list/sources-list.controller.js @@ -143,7 +143,7 @@ inventorySource.getDependentResourceCounts(inventory_source.id) .then((counts) => { const invalidateRelatedLines = []; - let deleteModalBody = `
${InventoryHostsStrings.get('deleteSource.CONFIRM')}
`; + let deleteModalBody = `
${InventoryHostsStrings.get('deleteResource.CONFIRM', 'inventory source')}
`; counts.forEach(countObj => { if(countObj.count && countObj.count > 0) { @@ -152,7 +152,7 @@ }); if (invalidateRelatedLines && invalidateRelatedLines.length > 0) { - deleteModalBody = `
${InventoryHostsStrings.get('deleteSource.CONFIRM')}
`; + deleteModalBody = `
${InventoryHostsStrings.get('deleteResource.USED_BY', 'inventory source')} ${InventoryHostsStrings.get('deleteResource.CONFIRM', 'inventory source')}
`; invalidateRelatedLines.forEach(invalidateRelatedLine => { deleteModalBody += invalidateRelatedLine; }); diff --git a/awx/ui/client/src/inventories-hosts/inventory-hosts.strings.js b/awx/ui/client/src/inventories-hosts/inventory-hosts.strings.js index 878aa7af27..c64b73a933 100644 --- a/awx/ui/client/src/inventories-hosts/inventory-hosts.strings.js +++ b/awx/ui/client/src/inventories-hosts/inventory-hosts.strings.js @@ -4,14 +4,6 @@ function InventoryHostsStrings (BaseString) { let t = this.t; let ns = this['inventory-hosts']; - ns.deleteInventory = { - CONFIRM: t.s('The inventory is currently being used by other resources. Are you sure you want to delete this inventory?') - }; - - ns.deleteSource = { - CONFIRM: t.s('The inventory source is currently being used by other resources. Are you sure you want to delete this inventory source?') - }; - ns.deletegroup = { GROUP: count => t.p(count, 'group', 'groups'), HOST: count => t.p(count, 'host', 'hosts'), diff --git a/awx/ui/client/src/inventory-scripts/inventory-scripts.strings.js b/awx/ui/client/src/inventory-scripts/inventory-scripts.strings.js index 4442bb9cf0..0760b60add 100644 --- a/awx/ui/client/src/inventory-scripts/inventory-scripts.strings.js +++ b/awx/ui/client/src/inventory-scripts/inventory-scripts.strings.js @@ -1,12 +1,5 @@ function InventoryScriptsStrings (BaseString) { BaseString.call(this, 'inventory_scripts'); - - let t = this.t; - let ns = this.inventory_scripts; - - ns.deleteInventoryScript = { - CONFIRM: t.s('The inventory script is currently being used by other resources. Are you sure you want to delete this inventory script?') - }; } InventoryScriptsStrings.$inject = ['BaseStringService']; diff --git a/awx/ui/client/src/inventory-scripts/list/list.controller.js b/awx/ui/client/src/inventory-scripts/list/list.controller.js index 56c9525b9b..a9d1140fb0 100644 --- a/awx/ui/client/src/inventory-scripts/list/list.controller.js +++ b/awx/ui/client/src/inventory-scripts/list/list.controller.js @@ -80,7 +80,7 @@ export default ['$rootScope', '$scope', 'Wait', 'InventoryScriptsList', inventoryScript.getDependentResourceCounts(id) .then((counts) => { const invalidateRelatedLines = []; - let deleteModalBody = `
${InventoryScriptsStrings.get('deleteInventoryScript.CONFIRM')}
`; + let deleteModalBody = `
${InventoryScriptsStrings.get('deleteResource.CONFIRM', 'inventory script')}
`; counts.forEach(countObj => { if(countObj.count && countObj.count > 0) { @@ -89,7 +89,7 @@ export default ['$rootScope', '$scope', 'Wait', 'InventoryScriptsList', }); if (invalidateRelatedLines && invalidateRelatedLines.length > 0) { - deleteModalBody = `
${InventoryScriptsStrings.get('deleteInventoryScript.CONFIRM')}
`; + deleteModalBody = `
${InventoryScriptsStrings.get('deleteResource.USED_BY', 'inventory script')} ${InventoryScriptsStrings.get('deleteResource.CONFIRM', 'inventory script')}
`; invalidateRelatedLines.forEach(invalidateRelatedLine => { deleteModalBody += invalidateRelatedLine; }); diff --git a/awx/ui/client/src/projects/list/projects-list.controller.js b/awx/ui/client/src/projects/list/projects-list.controller.js index d61f77192e..f129fe5f7a 100644 --- a/awx/ui/client/src/projects/list/projects-list.controller.js +++ b/awx/ui/client/src/projects/list/projects-list.controller.js @@ -206,7 +206,7 @@ export default ['$scope', '$rootScope', '$log', 'Rest', 'Alert', project.getDependentResourceCounts(id) .then((counts) => { const invalidateRelatedLines = []; - let deleteModalBody = `
${ProjectsStrings.get('deleteProject.CONFIRM')}
`; + let deleteModalBody = `
${ProjectsStrings.get('deleteResource.CONFIRM', 'project')}
`; counts.forEach(countObj => { if(countObj.count && countObj.count > 0) { @@ -215,7 +215,7 @@ export default ['$scope', '$rootScope', '$log', 'Rest', 'Alert', }); if (invalidateRelatedLines && invalidateRelatedLines.length > 0) { - deleteModalBody = `
${ProjectsStrings.get('deleteProject.CONFIRM')}
`; + deleteModalBody = `
${ProjectsStrings.get('deleteResource.USED_BY', 'project')} ${ProjectsStrings.get('deleteResource.CONFIRM', 'project')}
`; invalidateRelatedLines.forEach(invalidateRelatedLine => { deleteModalBody += invalidateRelatedLine; }); diff --git a/awx/ui/client/src/projects/projects.strings.js b/awx/ui/client/src/projects/projects.strings.js index 2d8ba011ce..37e4141a7b 100644 --- a/awx/ui/client/src/projects/projects.strings.js +++ b/awx/ui/client/src/projects/projects.strings.js @@ -1,12 +1,5 @@ function ProjectsStrings (BaseString) { BaseString.call(this, 'projects'); - - let t = this.t; - let ns = this.projects; - - ns.deleteProject = { - CONFIRM: t.s('The project is currently being used by other resources. Are you sure you want to delete this project?') - }; } ProjectsStrings.$inject = ['BaseStringService']; diff --git a/awx/ui/client/src/templates/list/templates-list.controller.js b/awx/ui/client/src/templates/list/templates-list.controller.js index 54deff2b9e..a0575730fd 100644 --- a/awx/ui/client/src/templates/list/templates-list.controller.js +++ b/awx/ui/client/src/templates/list/templates-list.controller.js @@ -154,7 +154,7 @@ export default ['$scope', '$rootScope', Prompt({ hdr: i18n._('Delete'), resourceName: $filter('sanitize')(template.name), - body: TemplatesStrings.get('workflowJobTemplates.deleteWorkflowJobTemplate.CONFIRM'), + body: TemplatesStrings.get('deleteResource.CONFIRM', 'workflow job template'), action: action, actionText: 'DELETE' }); @@ -164,7 +164,7 @@ export default ['$scope', '$rootScope', jobTemplate.getDependentResourceCounts(template.id) .then((counts) => { const invalidateRelatedLines = []; - let deleteModalBody = `
${TemplatesStrings.get('jobTemplates.deleteJobTemplate.CONFIRM')}
`; + let deleteModalBody = `
${TemplatesStrings.get('deleteResource.CONFIRM', 'job template')}
`; counts.forEach(countObj => { if(countObj.count && countObj.count > 0) { @@ -173,7 +173,7 @@ export default ['$scope', '$rootScope', }); if (invalidateRelatedLines && invalidateRelatedLines.length > 0) { - deleteModalBody = `
${TemplatesStrings.get('jobTemplates.deleteJobTemplate.CONFIRM')}
`; + deleteModalBody = `
${TemplatesStrings.get('deleteResource.USED_BY', 'job template')} ${TemplatesStrings.get('deleteResource.CONFIRM', 'job template')}
`; invalidateRelatedLines.forEach(invalidateRelatedLine => { deleteModalBody += invalidateRelatedLine; }); diff --git a/awx/ui/client/src/templates/templates.strings.js b/awx/ui/client/src/templates/templates.strings.js index 3d6a8ba3bb..8eada73742 100644 --- a/awx/ui/client/src/templates/templates.strings.js +++ b/awx/ui/client/src/templates/templates.strings.js @@ -1,20 +1,5 @@ function TemplatesStrings (BaseString) { BaseString.call(this, 'templates'); - - let t = this.t; - let ns = this.templates; - - ns.jobTemplates = { - deleteJobTemplate: { - CONFIRM: t.s('The job template is currently being used by other resources. Are you sure you want to delete this job template?') - } - }; - - ns.workflowJobTemplates = { - deleteWorkflowJobTemplate: { - CONFIRM: t.s('Are you sure you want to delete this workflow job template?') - } - }; } TemplatesStrings.$inject = ['BaseStringService']; From ff1f322c881d3fdbb56d402b54826b1c74997b9f Mon Sep 17 00:00:00 2001 From: mabashian Date: Wed, 22 Nov 2017 13:29:52 -0500 Subject: [PATCH 3/3] Removed unused string from credentials strings --- awx/ui/client/features/credentials/credentials.strings.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/awx/ui/client/features/credentials/credentials.strings.js b/awx/ui/client/features/credentials/credentials.strings.js index a89015dddd..958282aa09 100644 --- a/awx/ui/client/features/credentials/credentials.strings.js +++ b/awx/ui/client/features/credentials/credentials.strings.js @@ -27,10 +27,6 @@ function CredentialsStrings (BaseString) { ns.permissions = { TITLE: t.s('CREDENTIALS PERMISSIONS') }; - - ns.deleteCredential = { - CONFIRM: t.s('The credential is currently being used by other resources. Are you sure you want to delete this credential?') - }; } CredentialsStrings.$inject = ['BaseStringService'];