mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
Etemplate - allow onchange for customfields
This commit is contained in:
parent
cbbd3e2cd8
commit
881f056c3c
@ -53,6 +53,13 @@ var et2_customfields_list = (function(){ "use strict"; return et2_valueWidget.ex
|
||||
'name': 'sub app name',
|
||||
'type': "string",
|
||||
'description': "Name of sub application"
|
||||
},
|
||||
// Allow onchange so you can put handlers on the sub-widgets
|
||||
'onchange': {
|
||||
"name": "onchange",
|
||||
"type": "string",
|
||||
"default": et2_no_init,
|
||||
"description": "JS code which is executed when the value changes."
|
||||
}
|
||||
},
|
||||
|
||||
@ -209,6 +216,11 @@ var et2_customfields_list = (function(){ "use strict"; return et2_valueWidget.ex
|
||||
// Can't have a required readonly, it will warn & be removed later, so avoid the warning
|
||||
if(attrs.readonly === true) delete attrs.needed;
|
||||
|
||||
if(this.options.onchange)
|
||||
{
|
||||
attrs.onchange = this.options.onchange;
|
||||
}
|
||||
|
||||
if(this[setup_function]) {
|
||||
var no_skip = this[setup_function].call(this, field_name, field, attrs);
|
||||
if(!no_skip) continue;
|
||||
|
Loading…
Reference in New Issue
Block a user