[MediaWiki-commits] [Gerrit] Remove "required" messages. HTMLForm takes care of that with... - change (mediawiki...ContactPage)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/115977 Change subject: Remove "required" messages. HTMLForm takes care of that with validation. .. Remove "required" messages. HTMLForm takes care of that with validation. Change-Id: Ib49600ea251f8d4b28d894de7175b6027590ba8c --- M ContactPage.i18n.php M ContactPage_body.php M README 3 files changed, 11 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContactPage refs/changes/77/115977/1 diff --git a/ContactPage.i18n.php b/ContactPage.i18n.php index c134236..df57b29 100644 --- a/ContactPage.i18n.php +++ b/ContactPage.i18n.php @@ -23,13 +23,9 @@ 'contactpage-defsubject' => 'Contact message', 'contactpage-subject-and-sender' => '$1 (from $2)', 'contactpage-subject-and-sender-withip' => '$1 (from $2 at $3)', - 'contactpage-fromname' => 'Your name: *', - 'contactpage-fromaddress' => 'Your email address: **', - 'contactpage-formfootnotes' => '* optional -** optional, but needed if you want an answer', - 'contactpage-fromname-required' => 'Your name:', - 'contactpage-fromaddress-required' => 'Your email address:', - 'contactpage-formfootnotes-required' => 'All fields are required.', + 'contactpage-fromname' => 'Your name:', + 'contactpage-fromaddress' => 'Your email address:', + 'contactpage-formfootnotes' => '(needed if you want an answer)', 'contactpage-includeip' => 'Include my IP address in this message.', ); @@ -62,10 +58,6 @@ 'contactpage-fromaddress' => '{{Identical|E-mail address}}', 'contactpage-formfootnotes' => 'See also: * {{msg-mw|Contactpage-formfootnotes-required}}', - 'contactpage-fromname-required' => '{{Identical|Your name}}', - 'contactpage-fromaddress-required' => '{{Identical|E-mail address}}', - 'contactpage-formfootnotes-required' => 'See also: -* {{msg-mw|Contactpage-formfootnotes}}', 'contactpage-includeip' => 'Used as checkbox label in the ContactPage form.', ); diff --git a/ContactPage_body.php b/ContactPage_body.php index 9d06789..4cf8a42 100644 --- a/ContactPage_body.php +++ b/ContactPage_body.php @@ -95,8 +95,6 @@ } $this->getOutput()->setPageTitle( $pageTitle ); - $msgSuffix = $config['RequireDetails'] ? '-required' : ''; - $text = ''; $subject = ''; @@ -145,13 +143,13 @@ $formItems = array( 'FromName' => array( - 'label-message' => "contactpage-fromname$msgSuffix", + 'label-message' => 'contactpage-fromname', 'type' => 'text', 'required' => $config['RequireDetails'], 'default' => $fromName, ), 'FromAddress' => array( - 'label-message' => "contactpage-fromaddress$msgSuffix", + 'label-message' => 'contactpage-fromaddress', 'type' => 'email', 'required' => $config['RequireDetails'], 'default' => $fromAddress, @@ -160,7 +158,7 @@ 'label' => '', 'type' => 'info', 'default' => Html::rawElement( 'small', array(), - $this->msg( "contactpage-formfootnotes$msgSuffix" )->text() + $this->msg( 'contactpage-formfootnote' )->text() ), 'raw' => true, ), diff --git a/README b/README index 3c8384f..6ade0bd 100644 --- a/README +++ b/README @@ -53,8 +53,11 @@ SenderName is the display name used with SenderEmail. -IncludeIP if true, the form will include a checkbox offering to put the IP -address of the submitter in the subject line +RequireDetails Whether users will be required to supply a name and an +email address on Special:Contact. + +IncludeIP Whether the form will include a checkbox offering to put the IP +address of the submitter in the subject line. == Customization == -- To view, visit https://gerrit.wikimedia.org/r/115977 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib49600ea251f8d4b28d894de7175b6027590ba8c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContactPage Gerrit-Branch: master Gerrit-Owner: Reedy ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove "required" messages. HTMLForm takes care of that with... - change (mediawiki...ContactPage)
jenkins-bot has submitted this change and it was merged. Change subject: Remove "required" messages. HTMLForm takes care of that with validation. .. Remove "required" messages. HTMLForm takes care of that with validation. Change-Id: Ib49600ea251f8d4b28d894de7175b6027590ba8c --- M ContactPage.i18n.php M ContactPage_body.php M README 3 files changed, 14 insertions(+), 20 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/ContactPage.i18n.php b/ContactPage.i18n.php index c134236..14b963c 100644 --- a/ContactPage.i18n.php +++ b/ContactPage.i18n.php @@ -13,6 +13,7 @@ /** English * @author Daniel Kinzler + * @author Reedy */ $messages['en'] = array( 'contactpage' => 'Contact page', @@ -23,13 +24,9 @@ 'contactpage-defsubject' => 'Contact message', 'contactpage-subject-and-sender' => '$1 (from $2)', 'contactpage-subject-and-sender-withip' => '$1 (from $2 at $3)', - 'contactpage-fromname' => 'Your name: *', - 'contactpage-fromaddress' => 'Your email address: **', - 'contactpage-formfootnotes' => '* optional -** optional, but needed if you want an answer', - 'contactpage-fromname-required' => 'Your name:', - 'contactpage-fromaddress-required' => 'Your email address:', - 'contactpage-formfootnotes-required' => 'All fields are required.', + 'contactpage-fromname' => 'Your name:', + 'contactpage-fromaddress' => 'Your email address:', + 'contactpage-formfootnotes' => '(needed if you want an answer)', 'contactpage-includeip' => 'Include my IP address in this message.', ); @@ -40,6 +37,7 @@ * @author Lloffiwr * @author Purodha * @author Shirayuki + * @author Reedy */ $messages['qqq'] = array( 'contactpage' => '{{Identical|ContactPage}}', @@ -60,12 +58,7 @@ * $3 - IP address', 'contactpage-fromname' => '{{Identical|Your name}}', 'contactpage-fromaddress' => '{{Identical|E-mail address}}', - 'contactpage-formfootnotes' => 'See also: -* {{msg-mw|Contactpage-formfootnotes-required}}', - 'contactpage-fromname-required' => '{{Identical|Your name}}', - 'contactpage-fromaddress-required' => '{{Identical|E-mail address}}', - 'contactpage-formfootnotes-required' => 'See also: -* {{msg-mw|Contactpage-formfootnotes}}', + 'contactpage-formfootnotes' => 'Message to notify users that an email address is needed if an answer is required', 'contactpage-includeip' => 'Used as checkbox label in the ContactPage form.', ); diff --git a/ContactPage_body.php b/ContactPage_body.php index 9d06789..4cf8a42 100644 --- a/ContactPage_body.php +++ b/ContactPage_body.php @@ -95,8 +95,6 @@ } $this->getOutput()->setPageTitle( $pageTitle ); - $msgSuffix = $config['RequireDetails'] ? '-required' : ''; - $text = ''; $subject = ''; @@ -145,13 +143,13 @@ $formItems = array( 'FromName' => array( - 'label-message' => "contactpage-fromname$msgSuffix", + 'label-message' => 'contactpage-fromname', 'type' => 'text', 'required' => $config['RequireDetails'], 'default' => $fromName, ), 'FromAddress' => array( - 'label-message' => "contactpage-fromaddress$msgSuffix", + 'label-message' => 'contactpage-fromaddress', 'type' => 'email', 'required' => $config['RequireDetails'], 'default' => $fromAddress, @@ -160,7 +158,7 @@ 'label' => '', 'type' => 'info', 'default' => Html::rawElement( 'small', array(), - $this->msg( "contactpage-formfootnotes$msgSuffix" )->text() + $this->msg( 'contactpage-formfootnote' )->text() ), 'raw' => true, ), diff --git a/README b/README index 3c8384f..6ade0bd 100644 --- a/README +++ b/README @@ -53,8 +53,11 @@ SenderName is the display name used with SenderEmail. -IncludeIP if true, the form will include a checkbox offering to put the IP -address of the submitter in the subject line +RequireDetails Whether users will be required to supply a name and an +email address on Special:Contact. + +IncludeIP Whether the form will include a checkbox offering to put the IP +address of the submitter in the subject line. == Customization == -- To view, visit https://gerrit.wikimedia.org/r/115977 To unsubscribe, visi