X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=examples%2Fbootstrap%2FRadioSet.js;h=695b6c2b88f825c62a60ce5ca2bb2a7525e103ab;hp=86cc03eb504c1055bb200129807e17004c01e8f0;hb=07830f57369f060d2684d2efc7e7bea00fe9e0e4;hpb=e4175eef7dcd34c8bbf795576972dc3e770f1067 diff --git a/examples/bootstrap/RadioSet.js b/examples/bootstrap/RadioSet.js index 86cc03eb50..695b6c2b88 100644 --- a/examples/bootstrap/RadioSet.js +++ b/examples/bootstrap/RadioSet.js @@ -5,11 +5,27 @@ RadioSet = new Roo.XComponent({ _strings : { + 'ce8ae9da5b7cd6c3df2929543a9af92d' :"Email", + 'bafd7322c6e97d25b6299b5d6fe8920b' :"No", '7fa3b767c460b54a2be4d49030b349c7' :"no", + 'e3917ff2d3b3a88eab391651215d6445' :"Radio Field Lable Left", + '9dffbf69ffba8bc38bc4e01abf4b1675' :"Text", + '0d16301f634dadc4d7b280f7e375e3ad' :"Text for checkbox", '8d80ce38760953b68529d7fc9d8d89b6' :"Radio Field Lable", + '015ae6f41d4b86ad13ac0fde840d2280' :"Text Input", + '93cba07454f06a4a960172bbd6e2a435' :"Yes", 'a6105c0a611b41b08f1209506350279e' :"yes", + 'ad3d06d03d94223fa652babc913de686' :"Validate", 'b7dc22f0e17f4dfca2940eb0bd0cdc54' :"Radio Set Example" }, + _named_strings : { + 'text_name_fieldLabel' : '015ae6f41d4b86ad13ac0fde840d2280' /* Text Input */ , + 'left_radio_fieldLabel' : 'e3917ff2d3b3a88eab391651215d6445' /* Radio Field Lable Left */ , + 'text_name_placeholder' : '9dffbf69ffba8bc38bc4e01abf4b1675' /* Text */ , + 'email_name_placeholder' : 'ce8ae9da5b7cd6c3df2929543a9af92d' /* Email */ , + 'top_radio_fieldLabel' : '8d80ce38760953b68529d7fc9d8d89b6' /* Radio Field Lable */ , + 'test1_boxLabel' : '0d16301f634dadc4d7b280f7e375e3ad' /* Text for checkbox */ + }, part : ["bootstrap", "RadioSet" ], order : '001-RadioSet', @@ -36,6 +52,7 @@ RadioSet = new Roo.XComponent({ items : [ { xtype : 'Form', + errorMask : true, listeners : { render : function (_self) { @@ -83,20 +100,63 @@ RadioSet = new Roo.XComponent({ allowBlank : false, fieldLabel : _this._strings['8d80ce38760953b68529d7fc9d8d89b6'] /* Radio Field Lable */, indicatorpos : 'right', - name : 'radio_name', + labelAlign : 'top', + name : 'top_radio', + xns : Roo.bootstrap, + '|xns' : 'Roo.bootstrap', + items : [ + { + xtype : 'Radio', + boxLabel : _this._strings['93cba07454f06a4a960172bbd6e2a435'] /* Yes */, + value : _this._strings['a6105c0a611b41b08f1209506350279e'] /* yes */, + xns : Roo.bootstrap, + '|xns' : 'Roo.bootstrap' + }, + { + xtype : 'Radio', + boxLabel : _this._strings['bafd7322c6e97d25b6299b5d6fe8920b'] /* No */, + value : _this._strings['7fa3b767c460b54a2be4d49030b349c7'] /* no */, + xns : Roo.bootstrap, + '|xns' : 'Roo.bootstrap' + } + ] + } + ] + } + ] + }, + { + xtype : 'Row', + xns : Roo.bootstrap, + '|xns' : 'Roo.bootstrap', + items : [ + { + xtype : 'Column', + style : 'margin-top: 15px;', + xs : 12, + xns : Roo.bootstrap, + '|xns' : 'Roo.bootstrap', + items : [ + { + xtype : 'RadioSet', + allowBlank : false, + fieldLabel : _this._strings['e3917ff2d3b3a88eab391651215d6445'] /* Radio Field Lable Left */, + indicatorpos : 'right', + labelAlign : 'left', + name : 'left_radio', xns : Roo.bootstrap, '|xns' : 'Roo.bootstrap', items : [ { xtype : 'Radio', - boxLabel : 'Yes', + boxLabel : _this._strings['93cba07454f06a4a960172bbd6e2a435'] /* Yes */, value : _this._strings['a6105c0a611b41b08f1209506350279e'] /* yes */, xns : Roo.bootstrap, '|xns' : 'Roo.bootstrap' }, { xtype : 'Radio', - boxLabel : 'No', + boxLabel : _this._strings['bafd7322c6e97d25b6299b5d6fe8920b'] /* No */, value : _this._strings['7fa3b767c460b54a2be4d49030b349c7'] /* no */, xns : Roo.bootstrap, '|xns' : 'Roo.bootstrap' @@ -121,7 +181,108 @@ RadioSet = new Roo.XComponent({ items : [ { xtype : 'Input', + allowBlank : false, + fieldLabel : _this._strings['015ae6f41d4b86ad13ac0fde840d2280'] /* Text Input */, name : 'text_name', + placeholder : _this._strings['9dffbf69ffba8bc38bc4e01abf4b1675'] /* Text */, + xns : Roo.bootstrap, + '|xns' : 'Roo.bootstrap' + } + ] + } + ] + }, + { + xtype : 'Row', + xns : Roo.bootstrap, + '|xns' : 'Roo.bootstrap', + items : [ + { + xtype : 'Column', + xs : 12, + xns : Roo.bootstrap, + '|xns' : 'Roo.bootstrap', + items : [ + { + xtype : 'Input', + allowBlank : false, + name : 'email_name', + placeholder : _this._strings['ce8ae9da5b7cd6c3df2929543a9af92d'] /* Email */, + regexText : 'This field should be an e-mail address in the format \"user@domain.com\"', + vtype : 'email', + xns : Roo.bootstrap, + '|xns' : 'Roo.bootstrap' + } + ] + } + ] + }, + { + xtype : 'Row', + xns : Roo.bootstrap, + '|xns' : 'Roo.bootstrap', + items : [ + { + xtype : 'Column', + xs : 12, + xns : Roo.bootstrap, + '|xns' : 'Roo.bootstrap', + items : [ + { + xtype : 'TextArea', + allowBlank : false, + name : 'text_area', + xns : Roo.bootstrap, + '|xns' : 'Roo.bootstrap' + } + ] + } + ] + }, + { + xtype : 'Row', + xns : Roo.bootstrap, + '|xns' : 'Roo.bootstrap', + items : [ + { + xtype : 'Column', + xs : 12, + xns : Roo.bootstrap, + '|xns' : 'Roo.bootstrap', + items : [ + { + xtype : 'CheckBox', + boxLabel : _this._strings['0d16301f634dadc4d7b280f7e375e3ad'] /* Text for checkbox */, + name : 'test1', + xns : Roo.bootstrap, + '|xns' : 'Roo.bootstrap' + } + ] + } + ] + }, + { + xtype : 'Row', + xns : Roo.bootstrap, + '|xns' : 'Roo.bootstrap', + items : [ + { + xtype : 'Column', + style : 'margin-top: 15px;', + xs : 12, + xns : Roo.bootstrap, + '|xns' : 'Roo.bootstrap', + items : [ + { + xtype : 'Button', + html : _this._strings['ad3d06d03d94223fa652babc913de686'] /* Validate */, + weight : 'primary', + listeners : { + click : function (_self, e) + { + _this.form.isValid(); + } + }, xns : Roo.bootstrap, '|xns' : 'Roo.bootstrap' }