X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2Fhtmlform%2Ffields%2FHTMLButtonField.php;h=84719a7adddd88661b6f1146139781fd11c1f5a6;hb=a5230acd936b5b9270037c35b9d2d419f4c8d9a6;hp=a19bd5a1e455b84cfb4e9a0e9227091985e05ad0;hpb=5b1dcdc344f5d251120a161637bcb89e01b0f6a4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/htmlform/fields/HTMLButtonField.php b/includes/htmlform/fields/HTMLButtonField.php index a19bd5a1e4..84719a7add 100644 --- a/includes/htmlform/fields/HTMLButtonField.php +++ b/includes/htmlform/fields/HTMLButtonField.php @@ -34,6 +34,11 @@ class HTMLButtonField extends HTMLFormField { public function __construct( $info ) { $info['nodata'] = true; + + $this->setShowEmptyLabel( false ); + + parent::__construct( $info ); + if ( isset( $info['flags'] ) ) { $this->mFlags = $info['flags']; } @@ -46,19 +51,15 @@ class HTMLButtonField extends HTMLFormField { if ( isset( $info['buttonlabel-message'] ) ) { $this->buttonLabel = $this->getMessage( $info['buttonlabel-message'] )->parse(); } elseif ( isset( $info['buttonlabel'] ) ) { - if ( $info['buttonlabel'] === ' ' ) { + if ( $info['buttonlabel'] === ' ' || $info['buttonlabel'] === "\u{00A0}" ) { // Apparently some things set   directly and in an odd format - $this->buttonLabel = ' '; + $this->buttonLabel = "\u{00A0}"; } else { $this->buttonLabel = htmlspecialchars( $info['buttonlabel'] ); } } elseif ( isset( $info['buttonlabel-raw'] ) ) { $this->buttonLabel = $info['buttonlabel-raw']; } - - $this->setShowEmptyLabel( false ); - - parent::__construct( $info ); } public function getInputHTML( $value ) {