Fix #6384 - See if we can get checkbox to render on tests
[roojs1] / examples / bootstrap / RadioSet.js
index 7de2e39..695b6c2 100644 (file)
@@ -5,12 +5,26 @@
 RadioSet = new Roo.XComponent({
 
  _strings : {
-  '0c83f57c786a0b4a39efab23731c7ebc' :"email",
-  '3c0445c81a81e7508168c61674497f7d' :"Sign me in",
-  'b05d72142020283dc6812fd3a9bc691c' :"I forgot my password",
-  'b6d4223e60986fa4c9af77ee5f7149c5' :"Sign in",
-  '5f4dcc3b5aa765d61d8327deb882cf99' :"password",
-  '11268c03b59cc646b0fb7c4cb592130b' :"Register a new menbership"
+  '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" ],
@@ -33,93 +47,246 @@ RadioSet = new Roo.XComponent({
    items  : [
     {
      xtype : 'Container',
-     cls : 'form-box',
      xns : Roo.bootstrap,
      '|xns' : 'Roo.bootstrap',
      items  : [
-      {
-       xtype : 'Container',
-       cls : 'header',
-       html : _this._strings['b6d4223e60986fa4c9af77ee5f7149c5'] /* Sign in */,
-       xns : Roo.bootstrap,
-       '|xns' : 'Roo.bootstrap'
-      },
       {
        xtype : 'Form',
+       errorMask : true,
+       listeners : {
+        render : function (_self)
+         {
+             _this.form = this;
+         }
+       },
        xns : Roo.bootstrap,
        '|xns' : 'Roo.bootstrap',
        items  : [
         {
-         xtype : 'Container',
-         cls : 'body bg-gray',
+         xtype : 'Row',
          xns : Roo.bootstrap,
          '|xns' : 'Roo.bootstrap',
          items  : [
           {
-           xtype : 'Input',
-           placeholder : _this._strings['0c83f57c786a0b4a39efab23731c7ebc'] /* email */,
+           xtype : 'Column',
+           xs : 12,
            xns : Roo.bootstrap,
-           '|xns' : 'Roo.bootstrap'
-          },
+           '|xns' : 'Roo.bootstrap',
+           items  : [
+            {
+             xtype : 'Header',
+             html : _this._strings['b7dc22f0e17f4dfca2940eb0bd0cdc54'] /* Radio Set Example */,
+             level : 1,
+             xns : Roo.bootstrap,
+             '|xns' : 'Roo.bootstrap'
+            }
+           ]
+          }
+         ]
+        },
+        {
+         xtype : 'Row',
+         xns : Roo.bootstrap,
+         '|xns' : 'Roo.bootstrap',
+         items  : [
           {
-           xtype : 'Input',
-           inputType : 'password',
-           placeholder : _this._strings['5f4dcc3b5aa765d61d8327deb882cf99'] /* password */,
+           xtype : 'Column',
+           xs : 12,
            xns : Roo.bootstrap,
-           '|xns' : 'Roo.bootstrap'
-          },
+           '|xns' : 'Roo.bootstrap',
+           items  : [
+            {
+             xtype : 'RadioSet',
+             allowBlank : false,
+             fieldLabel : _this._strings['8d80ce38760953b68529d7fc9d8d89b6'] /* Radio Field Lable */,
+             indicatorpos : 'right',
+             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 : 'CheckBox',
-           boxLabel : 'Remember me',
+           xtype : 'Column',
+           style : 'margin-top: 15px;',
+           xs : 12,
            xns : Roo.bootstrap,
-           '|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 : _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 : 'Container',
-       cls : 'footer',
-       xns : Roo.bootstrap,
-       '|xns' : 'Roo.bootstrap',
-       items  : [
+        },
         {
-         xtype : 'Button',
-         cls : 'btn-block',
-         html : _this._strings['3c0445c81a81e7508168c61674497f7d'] /* Sign me in */,
-         weight : 'primary',
+         xtype : 'Row',
          xns : Roo.bootstrap,
-         '|xns' : 'Roo.bootstrap'
+         '|xns' : 'Roo.bootstrap',
+         items  : [
+          {
+           xtype : 'Column',
+           style : 'margin-top: 15px;',
+           xs : 12,
+           xns : Roo.bootstrap,
+           '|xns' : 'Roo.bootstrap',
+           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 : 'Container',
-         tag : 'p',
+         xtype : 'Row',
          xns : Roo.bootstrap,
          '|xns' : 'Roo.bootstrap',
          items  : [
           {
-           xtype : 'Link',
-           href : '#',
-           html : _this._strings['b05d72142020283dc6812fd3a9bc691c'] /* I forgot my password */,
+           xtype : 'Column',
+           xs : 12,
            xns : Roo.bootstrap,
-           '|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 : 'Container',
-         tag : 'p',
+         xtype : 'Row',
          xns : Roo.bootstrap,
          '|xns' : 'Roo.bootstrap',
          items  : [
           {
-           xtype : 'Link',
-           cls : 'text-center',
-           href : '#',
-           html : _this._strings['11268c03b59cc646b0fb7c4cb592130b'] /* Register a new menbership */,
+           xtype : 'Column',
+           style : 'margin-top: 15px;',
+           xs : 12,
            xns : Roo.bootstrap,
-           '|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'
+            }
+           ]
           }
          ]
         }