jenkins-bot has submitted this change and it was merged.
Change subject: Add and remove <br> tags on Wikibase Repo special pages
......................................................................
Add and remove <br> tags on Wikibase Repo special pages
They are not necessary because all elements do have outer margins.
But if looking at the page with no CSS the form elements are all in
a single line. The <br> tags are kind of a fail-safe for usability
(e.g. screenreaders). They don't have impact on how the pages look.
Change-Id: Ie1c3fb66f99b92044799838c8c86dc7ca991d85c
---
M repo/includes/specials/SpecialMergeItems.php
M repo/includes/specials/SpecialModifyEntity.php
M repo/includes/specials/SpecialModifyTerm.php
M repo/includes/specials/SpecialNewEntity.php
M repo/includes/specials/SpecialNewProperty.php
M repo/includes/specials/SpecialSetLabelDescriptionAliases.php
M repo/includes/specials/SpecialSetSiteLink.php
7 files changed, 22 insertions(+), 12 deletions(-)
Approvals:
Addshore: Looks good to me, approved
jenkins-bot: Verified
diff --git a/repo/includes/specials/SpecialMergeItems.php
b/repo/includes/specials/SpecialMergeItems.php
index 8c3cef8..84cc0d7 100644
--- a/repo/includes/specials/SpecialMergeItems.php
+++ b/repo/includes/specials/SpecialMergeItems.php
@@ -240,7 +240,8 @@
// Form body
$this->getOutput()->addHTML(
- Html::input(
+ Html::element( 'br' )
+ . Html::input(
'wikibase-mergeitems-submit',
$this->msg( 'wikibase-mergeitems-submit'
)->text(),
'submit',
@@ -305,8 +306,7 @@
'class' => 'wb-input',
'id' => 'wb-mergeitems-toid'
)
- )
- . Html::element( 'br' );
+ );
// TODO: Selector for ignoreconflicts
}
diff --git a/repo/includes/specials/SpecialModifyEntity.php
b/repo/includes/specials/SpecialModifyEntity.php
index af3b8c0..ed13cdb 100644
--- a/repo/includes/specials/SpecialModifyEntity.php
+++ b/repo/includes/specials/SpecialModifyEntity.php
@@ -235,8 +235,7 @@
'class' => 'wb-input',
'id' => $id
)
- )
- . Html::element( 'br' );
+ );
}
/**
diff --git a/repo/includes/specials/SpecialModifyTerm.php
b/repo/includes/specials/SpecialModifyTerm.php
index 0baeb0f..1d7a44e 100644
--- a/repo/includes/specials/SpecialModifyTerm.php
+++ b/repo/includes/specials/SpecialModifyTerm.php
@@ -200,8 +200,7 @@
'class' => 'wb-input',
'id' => 'wb-modifyterm-value',
)
- )
- . Html::element( 'br' );
+ );
$languageName = Language::fetchLanguageName(
$this->languageCode, $this->getLanguage()->getCode() );
@@ -230,6 +229,7 @@
$this->msg( 'wikibase-' . strtolower(
$this->getName() ) . '-intro' )->parse()
)
. parent::getFormElements( $entity )
+ . Html::element( 'br' )
. Html::element(
'label',
array(
@@ -258,7 +258,8 @@
// wikibase-setaliases-label
$this->msg( 'wikibase-' . strtolower(
$this->getName() ) . '-label' )->text()
)
- . $valueinput;
+ . $valueinput
+ . Html::element( 'br' );
}
}
diff --git a/repo/includes/specials/SpecialNewEntity.php
b/repo/includes/specials/SpecialNewEntity.php
index b42fe98..f535a3f 100644
--- a/repo/includes/specials/SpecialNewEntity.php
+++ b/repo/includes/specials/SpecialNewEntity.php
@@ -252,6 +252,7 @@
)->text(),
)
)
+ . Html::element( 'br' )
. Html::element(
'label',
array(
@@ -274,7 +275,9 @@
$langName
)->text(),
)
- ). Html::element(
+ )
+ . Html::element( 'br' )
+ . Html::element(
'label',
array(
'for' => 'wb-newentity-aliases',
@@ -333,6 +336,7 @@
$this->getUser()->getEditToken()
)
. $additionalHtml
+ . Html::element( 'br' )
. Html::input(
'submit',
$this->msg( 'wikibase-newentity-submit'
)->text(),
diff --git a/repo/includes/specials/SpecialNewProperty.php
b/repo/includes/specials/SpecialNewProperty.php
index e742d68..fda837e 100644
--- a/repo/includes/specials/SpecialNewProperty.php
+++ b/repo/includes/specials/SpecialNewProperty.php
@@ -100,6 +100,7 @@
$selector = new DataTypeSelector( $dataTypeFactory->getTypes(),
$this->getLanguage()->getCode() );
return parent::additionalFormElements()
+ . Html::element( 'br' )
. Html::element(
'label',
array(
diff --git a/repo/includes/specials/SpecialSetLabelDescriptionAliases.php
b/repo/includes/specials/SpecialSetLabelDescriptionAliases.php
index 5f36c20..bf3117d 100644
--- a/repo/includes/specials/SpecialSetLabelDescriptionAliases.php
+++ b/repo/includes/specials/SpecialSetLabelDescriptionAliases.php
@@ -170,7 +170,9 @@
$this->languageCode
)
. $this->getLabeledInputField( 'label',
$this->label )
+ . Html::element( 'br' )
. $this->getLabeledInputField( 'description',
$this->description )
+ . Html::element( 'br' )
. $this->getLabeledInputField( 'aliases',
implode( '|', $this->aliases ) );
} else {
$intro = $this->msg(
'wikibase-setlabeldescriptionaliases-intro' );
@@ -178,6 +180,7 @@
$languageCode = $this->languageCode ? :
$this->getLanguage()->getCode();
$html = parent::getFormElements( $entity )
+ . Html::element( 'br' )
. Html::label(
$this->msg(
'wikibase-modifyterm-language' )->text(),
$fieldId,
@@ -201,7 +204,8 @@
array(),
$intro->parse()
)
- . $html;
+ . $html
+ . Html::element( 'br' );
}
/**
diff --git a/repo/includes/specials/SpecialSetSiteLink.php
b/repo/includes/specials/SpecialSetSiteLink.php
index 0a14f86..e8fdb74 100644
--- a/repo/includes/specials/SpecialSetSiteLink.php
+++ b/repo/includes/specials/SpecialSetSiteLink.php
@@ -212,7 +212,8 @@
if ( empty( $this->badges ) ) {
$this->badges = $this->site === null ? array() :
$this->getBadges( $entity, $this->site );
}
- $pageinput = Html::element(
+ $pageinput = Html::element( 'br' )
+ . Html::element(
'label',
array(
'for' => 'wb-setsitelink-page',
@@ -272,6 +273,7 @@
$intro
)
. parent::getFormElements( $entity )
+ . Html::element( 'br' )
. Html::element(
'label',
array(
@@ -289,7 +291,6 @@
'id' => 'wb-setsitelink-site'
)
)
- . Html::element( 'br' )
. $pageinput;
}
}
--
To view, visit https://gerrit.wikimedia.org/r/189735
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie1c3fb66f99b92044799838c8c86dc7ca991d85c
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Adrian Lang <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Henning Snater <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits