Difference between revisions of "Template:Tester"

From FIThydrowiki
Jump to navigation Jump to search
(Blanked the page)
Tag: Blanking
Line 1: Line 1:
 
+
// 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 );

Revision as of 13:12, 18 October 2019

// 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 );