diff --git a/api/js/etemplate/et2_core_valueWidget.js b/api/js/etemplate/et2_core_valueWidget.js index db9cb16eb1..d2821d053e 100644 --- a/api/js/etemplate/et2_core_valueWidget.js +++ b/api/js/etemplate/et2_core_valueWidget.js @@ -114,6 +114,17 @@ var et2_valueWidget = /** @class */ (function (_super) { // Copy the given value this.label = _value; }; + et2_valueWidget.prototype.get_value = function () { + return this.value; + }; + /** + * Set value of widget + * + * @param {string} _value value to set + */ + et2_valueWidget.prototype.set_value = function (_value) { + this.value = _value; + }; et2_valueWidget._attributes = { "label": { "name": "Label", diff --git a/api/js/etemplate/et2_core_valueWidget.ts b/api/js/etemplate/et2_core_valueWidget.ts index cc2f9768ac..63aeb3d229 100644 --- a/api/js/etemplate/et2_core_valueWidget.ts +++ b/api/js/etemplate/et2_core_valueWidget.ts @@ -44,6 +44,7 @@ export class et2_valueWidget extends et2_baseWidget }; label: string = ''; + value: string|number|Object; protected _labelContainer: JQuery = null; /** @@ -143,5 +144,20 @@ export class et2_valueWidget extends et2_baseWidget // Copy the given value this.label = _value; } + + get_value() + { + return this.value; + } + + /** + * Set value of widget + * + * @param {string} _value value to set + */ + set_value(_value : any | null) + { + this.value = _value; + } }