From a7110e4912d60bca0ea988ab43651a51155030ce Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 11 Jul 2012 20:08:32 +0000 Subject: [PATCH] Add label attribute to valueWidget to support most read-only widgets --- etemplate/js/et2_core_valueWidget.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/etemplate/js/et2_core_valueWidget.js b/etemplate/js/et2_core_valueWidget.js index 0e4d67c01e..02b53b2737 100644 --- a/etemplate/js/et2_core_valueWidget.js +++ b/etemplate/js/et2_core_valueWidget.js @@ -25,6 +25,13 @@ var et2_valueWidget = et2_baseWidget.extend({ attributes: { + "label": { + "name": "Label", + "default": "", + "type": "string", + "description": "The label is displayed by default in front (for radiobuttons behind) each widget (if not empty). If you want to specify a different position, use a '%s' in the label, which gets replaced by the widget itself. Eg. '%s Name' to have the label Name behind a checkbox. The label can contain variables, as descript for name. If the label starts with a '@' it is replaced by the value of the content-array at this index (with the '@'-removed and after expanding the variables).", + "translate": true + }, "value": { "name": "Value", "description": "The value of the widget",