diff --git a/platform/forms/bundle.json b/platform/forms/bundle.json index 776d0ee596..782f2e4a2e 100644 --- a/platform/forms/bundle.json +++ b/platform/forms/bundle.json @@ -1,42 +1,53 @@ { - "name": "MCT Forms", - "description": "Form generator; includes directive and some controls.", - "extensions": { - "directives": [ - { - "key": "mctForm", - "implementation": "MCTForm.js" - } - ], - "templates": [ - { - "key": "_checkbox", - "templateUrl": "templates/_checkbox.html" - }, - { - "key": "_checkboxes", - "templateUrl": "templates/_checkboxes.html" - }, - { - "key": "_datetime", - "templateUrl": "templates/_datetime.html" - }, - { - "key": "_select", - "templateUrl": "templates/_select.html" - }, - { - "key": "_selects", - "templateUrl": "templates/_selects.html" - }, - { - "key": "_textfield", - "templateUrl": "templates/_textfield.html" - }, - { - "key": "_textfields", - "templateUrl": "templates/_textfields.html" - } - ] - } + "name": "MCT Forms", + "description": "Form generator; includes directive and some controls.", + "extensions": { + "directives": [ + { + "key": "mctForm", + "implementation": "MCTForm.js" + }, + { + "key": "mctControl", + "implementation": "MCTControl.js", + "depends": [ "controls[]" ] + } + ], + "controls": [ + { + "key": "checkbox", + "templateUrl": "templates/controls/checkbox.html" + } + ], + "templates": [ + { + "key": "_checkbox", + "templateUrl": "templates/_checkbox.html" + }, + { + "key": "_checkboxes", + "templateUrl": "templates/_checkboxes.html" + }, + { + "key": "_datetime", + "templateUrl": "templates/_datetime.html" + }, + { + "key": "_select", + "templateUrl": "templates/_select.html" + }, + { + "key": "_selects", + "templateUrl": "templates/_selects.html" + }, + { + "key": "_textfield", + "templateUrl": "templates/_textfield.html" + }, + { + "key": "_textfields", + "templateUrl": "templates/_textfields.html" + } + ] + } } \ No newline at end of file diff --git a/platform/forms/res/templates/controls/checkbox.html b/platform/forms/res/templates/controls/checkbox.html new file mode 100644 index 0000000000..a33eb4b86e --- /dev/null +++ b/platform/forms/res/templates/controls/checkbox.html @@ -0,0 +1,7 @@ + diff --git a/platform/forms/res/templates/form.html b/platform/forms/res/templates/form.html index b3dc0db27b..9b2b2c5d64 100644 --- a/platform/forms/res/templates/form.html +++ b/platform/forms/res/templates/form.html @@ -1,38 +1,42 @@ -{{structure.name}} +