diff --git a/wwwroot/discount_setting/index.ui b/wwwroot/discount_setting/index.ui index ee4c5a6..528cde5 100644 --- a/wwwroot/discount_setting/index.ui +++ b/wwwroot/discount_setting/index.ui @@ -60,7 +60,6 @@ "options": { "width": "22%", "show_label": false, - "css": "childrensize", "submit_url": "{{entire_url('./save_discount.dspy')}}", "fields": [ {"name": "discountid", "uitype": "hide", "value": "{{params_kw.discountid}}"}, @@ -72,7 +71,7 @@ "binds": [ { "wid": "self", - "event": "changed", + "event": "blur", "actiontype": "script", "target": "self", "script": "var form = this.target; var d = form.getValue(); var old = form._last_val; if (d.discount === old) return; form._last_val = d.discount; fetch(form.options.submit_url, {method:'POST', headers:{'Content-Type':'application/json'}, body:JSON.stringify(d)}).then(function(r){ return r.json(); }).then(function(resp){ if (resp.widgettype === 'Error') bricks.show_error(resp.options); else console.log('discount saved'); }).catch(function(e){ console.error(e); });"