Disable HTML widget buttons when readonly
issue10737 review334951002 (grafted from 3657026d8d0107d0605cbb43f902a59dca37f7c4) --HG-- branch : 6.0
This commit is contained in:
1 parent
d6da19ab3c
commit
bf05d192c0
1 file changed
+9
@@ -4390,6 +4390,15 @@ function eval_pyson(value){
|
||||
Sao.View.Form.HTML._super.display.call(this);
|
||||
this.button.attr('href', this.uri());
|
||||
},
|
||||
set_readonly: function(readonly) {
|
||||
Sao.View.Form.HTML._super.set_readonly.call(this, readonly);
|
||||
this.el.find('button').prop('disabled', readonly);
|
||||
if (readonly) {
|
||||
this.el.find('a').hide();
|
||||
} else {
|
||||
this.el.find('a').show();
|
||||
}
|
||||
},
|
||||
translate_dialog: function(languages) {
|
||||
var options = {};
|
||||
languages.forEach(function(language) {
|
||||
|
||||
Reference in new issue
Block a user