[fix] [minor] use prop instead of attr to disable a field
This commit is contained in:
parent
f7e5648365
commit
c8e39b0965
@ -395,7 +395,7 @@ erpnext.POS = Class.extend({
|
|||||||
});
|
});
|
||||||
dialog.show();
|
dialog.show();
|
||||||
|
|
||||||
dialog.get_input("total_amount").attr("disabled", "disabled");
|
dialog.get_input("total_amount").prop("disabled", true);
|
||||||
|
|
||||||
dialog.fields_dict.pay.input.onclick = function() {
|
dialog.fields_dict.pay.input.onclick = function() {
|
||||||
cur_frm.set_value("mode_of_payment", dialog.get_values().mode_of_payment);
|
cur_frm.set_value("mode_of_payment", dialog.get_values().mode_of_payment);
|
||||||
|
@ -18,7 +18,7 @@ erpnext.send_message = function(opts) {
|
|||||||
|
|
||||||
wn.call = function(opts) {
|
wn.call = function(opts) {
|
||||||
if(opts.btn) {
|
if(opts.btn) {
|
||||||
$(opts.btn).attr("disabled", "disabled");
|
$(opts.btn).prop("disabled", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(opts.msg) {
|
if(opts.msg) {
|
||||||
@ -51,7 +51,7 @@ wn.call = function(opts) {
|
|||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
if(opts.btn) {
|
if(opts.btn) {
|
||||||
$(opts.btn).attr("disabled", false);
|
$(opts.btn).prop("disabled", false);
|
||||||
}
|
}
|
||||||
if(data.exc) {
|
if(data.exc) {
|
||||||
if(opts.btn) {
|
if(opts.btn) {
|
||||||
|
@ -100,11 +100,11 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({
|
|||||||
|
|
||||||
toggle_enable_brand: function() {
|
toggle_enable_brand: function() {
|
||||||
if(!this.filter_inputs.item_code.val()) {
|
if(!this.filter_inputs.item_code.val()) {
|
||||||
this.filter_inputs.brand.removeAttr("disabled");
|
this.filter_inputs.brand.prop("disabled", false);
|
||||||
} else {
|
} else {
|
||||||
this.filter_inputs.brand
|
this.filter_inputs.brand
|
||||||
.val(this.filter_inputs.brand.get(0).opts.default_value)
|
.val(this.filter_inputs.brand.get(0).opts.default_value)
|
||||||
.attr("disabled", "disabled");
|
.prop("disabled", true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -115,11 +115,11 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({
|
|||||||
|
|
||||||
toggle_enable_brand: function() {
|
toggle_enable_brand: function() {
|
||||||
if(!this.filter_inputs.item_code.val()) {
|
if(!this.filter_inputs.item_code.val()) {
|
||||||
this.filter_inputs.brand.removeAttr("disabled");
|
this.filter_inputs.brand.prop("disabled", false);
|
||||||
} else {
|
} else {
|
||||||
this.filter_inputs.brand
|
this.filter_inputs.brand
|
||||||
.val(this.filter_inputs.brand.get(0).opts.default_value)
|
.val(this.filter_inputs.brand.get(0).opts.default_value)
|
||||||
.attr("disabled", "disabled");
|
.prop("disabled", true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
$("#login_btn").click(function() {
|
$("#login_btn").click(function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
$(this).html("Logging In...").attr("disabled", "disabled");
|
$(this).html("Logging In...").prop("disabled", true);
|
||||||
wn.call({
|
wn.call({
|
||||||
"method": "login",
|
"method": "login",
|
||||||
args: {
|
args: {
|
||||||
@ -12,7 +12,7 @@ $(document).ready(function() {
|
|||||||
lead_email: $("#lead-email").val(),
|
lead_email: $("#lead-email").val(),
|
||||||
},
|
},
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
$(me).attr("disabled", false);
|
$(me).prop("disabled", false);
|
||||||
if(r.exc) {
|
if(r.exc) {
|
||||||
alert("Error, please contact support@erpnext.com");
|
alert("Error, please contact support@erpnext.com");
|
||||||
} else {
|
} else {
|
||||||
@ -23,5 +23,5 @@ $(document).ready(function() {
|
|||||||
})
|
})
|
||||||
return false;
|
return false;
|
||||||
})
|
})
|
||||||
.attr("disabled", false);
|
.prop("disabled", false);
|
||||||
})
|
})
|
Loading…
Reference in New Issue
Block a user