6 * Allows custom data specific to HTMLFormField to be set for OOjs UI forms. This picks up the
7 * extra config from a matching PHP widget (defined in HTMLFormElement.php) when constructed using
10 * Currently only supports passing 'hide-if' data.
13 * @param {Object} [config] Configuration options
15 mw.htmlform.Element = function ( config ) {
16 // Configuration initialization
17 config = config || {};
20 this.hideIf = config.hideIf;
24 this.$element.addClass( 'mw-htmlform-hide-if' );
28 mw.htmlform.FieldLayout = function ( config ) {
30 mw.htmlform.FieldLayout.parent.call( this, config );
32 mw.htmlform.Element.call( this, config );
34 OO.inheritClass( mw.htmlform.FieldLayout, OO.ui.FieldLayout );
35 OO.mixinClass( mw.htmlform.FieldLayout, mw.htmlform.Element );
37 mw.htmlform.ActionFieldLayout = function ( config ) {
39 mw.htmlform.ActionFieldLayout.parent.call( this, config );
41 mw.htmlform.Element.call( this, config );
43 OO.inheritClass( mw.htmlform.ActionFieldLayout, OO.ui.ActionFieldLayout );
44 OO.mixinClass( mw.htmlform.ActionFieldLayout, mw.htmlform.Element );