There are no machine credentials defined in Tower. Launching this job requires a machine credential. " +
+ body: "
There are no machine credentials defined in Tower. Launching this job requires a machine credential. " +
"Create one now?",
action: action
});
diff --git a/awx/ui/client/src/helpers/Jobs.js b/awx/ui/client/src/helpers/Jobs.js
index adbe640f4b..115af21b62 100644
--- a/awx/ui/client/src/helpers/Jobs.js
+++ b/awx/ui/client/src/helpers/Jobs.js
@@ -540,8 +540,9 @@ export default
body = (action_label === 'cancel' || job.status === 'new') ? "Submit the request to cancel" : "Delete";
Prompt({
hdr: hdr,
- body: "
" + body + " job #" + id + " " + job.name + "?
",
- action: action
+ body: "
" + body + " job #" + id + " " + job.name + "?
",
+ action: action,
+ actionText: (action_label === 'cancel' || job.status === 'new') ? "YES" : "DELETE"
});
});
diff --git a/awx/ui/client/src/helpers/Schedules.js b/awx/ui/client/src/helpers/Schedules.js
index 0537a07c4d..f744d6731c 100644
--- a/awx/ui/client/src/helpers/Schedules.js
+++ b/awx/ui/client/src/helpers/Schedules.js
@@ -541,8 +541,9 @@ export default
Prompt({
hdr: hdr,
- body: "
Are you sure you want to delete the " + schedule.name + " schedule?
",
+ body: '
Are you sure you want to delete the schedule below?
' + schedule.name + '
',
action: action,
+ actionText: 'DELETE',
backdrop: false
});
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 ef19014a56..1dad7b230d 100644
--- a/awx/ui/client/src/inventory-scripts/list/list.controller.js
+++ b/awx/ui/client/src/inventory-scripts/list/list.controller.js
@@ -70,11 +70,12 @@ export default
});
};
- var bodyHtml = "
Are you sure you want to delete " + name + "?
";
+ var bodyHtml = '
Are you sure you want to delete the inventory script below?
' + name + '
';
Prompt({
hdr: 'Delete',
body: bodyHtml,
- action: action
+ action: action,
+ actionText: 'DELETE'
});
};
diff --git a/awx/ui/client/src/permissions/list/list.controller.js b/awx/ui/client/src/permissions/list/list.controller.js
index 1112043a15..4b6412fff4 100644
--- a/awx/ui/client/src/permissions/list/list.controller.js
+++ b/awx/ui/client/src/permissions/list/list.controller.js
@@ -127,8 +127,9 @@ export default
if ($scope.PermissionAddAllowed) {
Prompt({
hdr: 'Delete',
- body: 'Are you sure you want to delete ' + name + '?',
- action: action
+ body: '
Are you sure you want to delete the permission below?
' + name + '
',
+ action: action,
+ actionText: 'DELETE'
});
}
};
diff --git a/awx/ui/client/src/shared/prompt-dialog.js b/awx/ui/client/src/shared/prompt-dialog.js
index 602368efe7..1ee2ad1fa7 100644
--- a/awx/ui/client/src/shared/prompt-dialog.js
+++ b/awx/ui/client/src/shared/prompt-dialog.js
@@ -41,10 +41,11 @@ angular.module('PromptDialog', ['Utilities', 'sanitizeFilter'])
scope.promptHeader = params.hdr;
scope.promptBody = params.body;
scope.promptAction = params.action;
+ scope.promptActionText = (params.actionText === null || params.actionText === undefined || params.actionText === '') ? 'YES' : params.actionText;
local_backdrop = (params.backdrop === undefined) ? "static" : params.backdrop;
- cls = (params['class'] === null || params['class'] === undefined) ? 'btn-danger' : params['class'];
+ cls = (params['class'] === null || params['class'] === undefined) ? 'Prompt-errorButton' : params['class'];
$('#prompt_action_btn').removeClass(cls).addClass(cls);
diff --git a/awx/ui/client/src/shared/prompt/prompt.less b/awx/ui/client/src/shared/prompt/prompt.less
new file mode 100644
index 0000000000..7879374422
--- /dev/null
+++ b/awx/ui/client/src/shared/prompt/prompt.less
@@ -0,0 +1,98 @@
+@import "awx/ui/client/src/shared/branding/colors.default.less";
+
+.Prompt-content {
+ display:flex;
+ flex-wrap:wrap;
+ flex-direction: row;
+ padding: 15px 20px;
+}
+
+.Prompt-header {
+ display: flex;
+ width: 100%;
+}
+
+.Prompt-title {
+ flex: 1 0 auto;
+ text-transform: uppercase;
+ color: @list-header-txt;
+ font-size: 14px;
+ font-weight: bold;
+ white-space: nowrap;
+}
+
+.Prompt-exitHolder{
+ justify-content: flex-end;
+ display:flex;
+}
+
+.Prompt-exit{
+ cursor:pointer;
+ padding:0px;
+ border: none;
+ height:20px;
+ font-size: 20px;
+ background-color:@default-bg;
+ color:@default-second-border;
+ transition: color 0.2s;
+ line-height:1;
+}
+
+.Prompt-exit:hover{
+ color:@default-icon;
+}
+
+.Prompt-body {
+ width: 100%;
+}
+
+.Prompt-bodyQuery {
+ padding: 15px 0px;
+ color: @default-interface-txt;
+}
+
+.Prompt-bodyTarget {
+ color: @default-data-txt;
+}
+
+.Prompt-footer {
+ display: flex;
+ justify-content: flex-end;
+ padding-top: 20px;
+ width: 100%;
+}
+
+.Prompt-defaultButton {
+ background-color: @default-bg;
+ color: @btn-txt;
+ text-transform: uppercase;
+ border-radius: 5px;
+ border: 1px solid @btn-bord;
+ transition: background-color 0.2s;
+ padding-left:15px;
+ padding-right: 15px;
+}
+
+.Prompt-defaultButton:hover {
+ background-color: @btn-bg-hov;
+ color: @btn-txt;
+}
+
+.Prompt-errorButton {
+ background-color: @default-err;
+ color: @btn-txt-sel;
+ text-transform: uppercase;
+ border-radius: 5px;
+ transition: background-color 0.2s;
+ padding-left:15px;
+ padding-right: 15px;
+}
+
+.Prompt-errorButton:hover {
+ background-color: @default-err-hov;
+ color: @btn-txt-sel;
+}
+
+.Prompt-footerButton + .Prompt-footerButton {
+ margin-left: 20px;
+}
diff --git a/awx/ui/templates/ui/index.html b/awx/ui/templates/ui/index.html
index 8b529e3b3e..c5aefc097d 100644
--- a/awx/ui/templates/ui/index.html
+++ b/awx/ui/templates/ui/index.html
@@ -97,17 +97,18 @@