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.
14 mw
.htmlform
.Element = function ( config
) {
15 // Configuration initialization
16 config
= config
|| {};
19 this.hideIf
= config
.hideIf
;
23 this.$element
.addClass( 'mw-htmlform-hide-if' );
27 mw
.htmlform
.FieldLayout = function ( config
) {
29 mw
.htmlform
.FieldLayout
.parent
.call( this, config
);
31 mw
.htmlform
.Element
.call( this, config
);
33 OO
.inheritClass( mw
.htmlform
.FieldLayout
, OO
.ui
.FieldLayout
);
34 OO
.mixinClass( mw
.htmlform
.FieldLayout
, mw
.htmlform
.Element
);
36 mw
.htmlform
.ActionFieldLayout = function ( config
) {
38 mw
.htmlform
.ActionFieldLayout
.parent
.call( this, config
);
40 mw
.htmlform
.Element
.call( this, config
);
42 OO
.inheritClass( mw
.htmlform
.ActionFieldLayout
, OO
.ui
.ActionFieldLayout
);
43 OO
.mixinClass( mw
.htmlform
.ActionFieldLayout
, mw
.htmlform
.Element
);