Bläddra i källkod

add disabling of dialog primary button (#4503)

version-14
Prateeksha Singh 7 år sedan
committed by Nabin Hait
förälder
incheckning
af9d7dc07c
3 ändrade filer med 17 tillägg och 0 borttagningar
  1. +5
    -0
      frappe/public/css/desk.css
  2. +6
    -0
      frappe/public/js/frappe/ui/dialog.js
  3. +6
    -0
      frappe/public/less/desk.less

+ 5
- 0
frappe/public/css/desk.css Visa fil

@@ -475,6 +475,11 @@ fieldset[disabled] .form-control {
.modal-title {
margin-top: 5px;
}
.btn-primary.disabled {
background-color: #b1bdca;
color: #fff;
border-color: #b1bdca;
}
.form-control {
position: relative;
}


+ 6
- 0
frappe/public/js/frappe/ui/dialog.js Visa fil

@@ -86,6 +86,12 @@ frappe.ui.Dialog = frappe.ui.FieldGroup.extend({
click.apply(me, [values]);
});
},
disable_primary_action: function() {
this.get_primary_btn().addClass('disabled');
},
enable_primary_action: function() {
this.get_primary_btn().removeClass('disabled');
},
make_head: function() {
var me = this;
this.set_title(this.title);


+ 6
- 0
frappe/public/less/desk.less Visa fil

@@ -289,6 +289,12 @@ textarea.form-control {
margin-top: 5px;
}

.btn-primary.disabled {
background-color: #b1bdca;
color: #fff;
border-color: #b1bdca;
}

.form-control {
position: relative;



Laddar…
Avbryt
Spara