Template:Tester

From FIThydrowiki
Revision as of 13:12, 18 October 2019 by Bendikhansen (talk | contribs)
Jump to navigation Jump to search

// An example of selected, unselected, and disabled checkbox inputs. var checkbox1 = new OO.ui.CheckboxInputWidget( {

       value: 'a',
        selected: true
   } ),
   checkbox2 = new OO.ui.CheckboxInputWidget( {
       value: 'b'
   } ),
   checkbox3 = new OO.ui.CheckboxInputWidget( {
       value:'c',
       disabled: true
   } ),
   // Create a fieldset layout with fields for each checkbox.
   fieldset = new OO.ui.FieldsetLayout( {
       label: 'Checkboxes'
   } );

fieldset.addItems( [

   new OO.ui.FieldLayout( checkbox1, { label: 'Selected checkbox', align: 'inline' } ),
   new OO.ui.FieldLayout( checkbox2, { label: 'Unselected checkbox', align: 'inline' } ),
   new OO.ui.FieldLayout( checkbox3, { label: 'Disabled checkbox', align: 'inline' } ),

] ); $( document.body ).append( fieldset.$element );