'errors' => $errors,
'notices' => $notices,
'infusable' => $infusable,
+ 'helpInline' => $this->isHelpInline(),
];
$preloadModules = false;
* @return bool
*/
protected function shouldInfuseOOUI() {
- // Always infuse fields with help text, since the interface for it is nicer with JS
- return $this->getHelpText() !== null;
+ // Always infuse fields with popup help text, since the interface for it is nicer with JS
+ return $this->getHelpText() !== null && !$this->isHelpInline();
}
/**
return $helptext;
}
+ /**
+ * Determine if the help text should be displayed inline.
+ *
+ * Only applies to OOUI forms.
+ *
+ * @since 1.31
+ * @return bool
+ */
+ public function isHelpInline() {
+ return isset( $this->mParams['help-inline'] ) ? $this->mParams['help-inline'] : true;
+ }
+
/**
* Determine form errors to display and their classes
* @since 1.20