feat: more color options for form alerts (#16729)

* Added green and orange color options for message
This commit is contained in:
Nikhil Kothari 2022-04-25 15:07:04 +05:30 committed by GitHub
parent eb92acfbf3
commit 2767ea9d25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -98,7 +98,7 @@ frappe.ui.form.Layout = class Layout {
// remove previous color
this.message.removeClass(this.message_color);
}
this.message_color = (color && ['yellow', 'blue', 'red'].includes(color)) ? color : 'blue';
this.message_color = (color && ['yellow', 'blue', 'red', 'green', 'orange'].includes(color)) ? color : 'blue';
if (html) {
if (html.substr(0, 1)!=='<') {
// wrap in a block
@ -439,7 +439,7 @@ frappe.ui.form.Layout = class Layout {
}
handle_tab(doctype, fieldname, shift) {
let grid_row = null,
let grid_row = null,
prev = null,
fields = this.fields_list,
focused = false;