Difference between revisions of "MediaWiki:Gadget-calculator-patients-patientInput.js"
From WikiAnesthesia
				Chris Rishel (talk | contribs)  | 
				Chris Rishel (talk | contribs)   | 
				||
| Line 17: | Line 17: | ||
             'age',  |              'age',  | ||
             'gender'  |              'gender'  | ||
         ] ) );  |          ], true ) );  | ||
         $container.appendTo( $( '#contentHeader' ) );  |          $container.appendTo( $( '#contentHeader' ) );  | ||
     }  |      }  | ||
}() );  | }() );  | ||
Revision as of 20:28, 22 August 2021
/**
 * @author Chris Rishel
 */
( function() {
    var containerId = 'calculator-patientInput';
    if( !$( '#' + containerId ).length ) {
        var $container = $( '<div>', {
            id: containerId
        } );
        $container.addClass( 'container border-bottom px-0 py-1' );
        $container.append( mw.calculators.createInputGroup( [
            'weight',
            'height',
            'age',
            'gender'
        ], true ) );
        $container.appendTo( $( '#contentHeader' ) );
    }
}() );