X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fhtmlform%2FHTMLForm.php;h=6b2afe12f57c1216a84c33d0b8efe98f941a2927;hb=7afc5cf735a9c1e9c96c62ff227571d03f53b454;hp=af1743e07831d1c83bd1c002d343af97c62df7ff;hpb=2c46e066763dfd968e7fc7a594ca700e4a236329;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index af1743e078..6b2afe12f5 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -159,6 +159,7 @@ class HTMLForm extends ContextSource { 'date' => HTMLDateTimeField::class, 'time' => HTMLDateTimeField::class, 'datetime' => HTMLDateTimeField::class, + 'expiry' => HTMLExpiryField::class, // HTMLTextField will output the correct type="" attribute automagically. // There are about four zillion other HTML5 input types, like range, but // we don't use those at the moment, so no point in adding all of them. @@ -1336,10 +1337,13 @@ class HTMLForm extends ContextSource { /** * Identify that the submit button in the form has a progressive action * @since 1.25 + * @deprecated since 1.32, No need to call. Submit button already + * has a progressive action form. * * @return HTMLForm $this for chaining calls (since 1.28) */ public function setSubmitProgressive() { + wfDeprecated( __METHOD__, '1.32' ); $this->mSubmitFlags = [ 'progressive', 'primary' ]; return $this; @@ -1600,9 +1604,10 @@ class HTMLForm extends ContextSource { * @param string $legend Legend text for the fieldset * @param string $section The section content in plain Html * @param array $attributes Additional attributes for the fieldset + * @param bool $isRoot Section is at the root of the tree * @return string The fieldset's Html */ - protected function wrapFieldSetSection( $legend, $section, $attributes ) { + protected function wrapFieldSetSection( $legend, $section, $attributes, $isRoot ) { return Xml::fieldset( $legend, $section, $attributes ) . "\n"; } @@ -1685,7 +1690,9 @@ class HTMLForm extends ContextSource { if ( $fieldsetIDPrefix ) { $attributes['id'] = Sanitizer::escapeIdForAttribute( "$fieldsetIDPrefix$key" ); } - $subsectionHtml .= $this->wrapFieldSetSection( $legend, $section, $attributes ); + $subsectionHtml .= $this->wrapFieldSetSection( + $legend, $section, $attributes, $fields === $this->mFieldTree + ); } else { // Just return the inputs, nothing fancy. $subsectionHtml .= $section;