Index: branches/wmf/1.16wmf4/skins/common/shared.css |
— | — | @@ -109,6 +109,10 @@ |
110 | 110 | |
111 | 111 | table.mw-htmlform-nolabel td.mw-label { width: 0 !important; } |
112 | 112 | |
| 113 | +tr.mw-htmlform-vertical-label td.mw-label { |
| 114 | + text-align: left !important; |
| 115 | +} |
| 116 | + |
113 | 117 | input#wpSummary { |
114 | 118 | width: 80%; |
115 | 119 | } |
Property changes on: branches/wmf/1.16wmf4/skins/common/shared.css |
___________________________________________________________________ |
Added: svn:mergeinfo |
116 | 120 | Merged /trunk/phase3/skins/common/shared.css:r63545-63546,63549,63643,63764,63897-63901,65015,65387,65391,65555,65590,65774,67836,68909 |
117 | 121 | Merged /branches/wmf-deployment/skins/common/shared.css:r60970 |
Index: branches/wmf/1.16wmf4/includes/HTMLForm.php |
— | — | @@ -769,21 +769,42 @@ |
770 | 770 | global $wgRequest; |
771 | 771 | |
772 | 772 | $errors = $this->validate( $value, $this->mParent->mFieldData ); |
| 773 | + |
| 774 | + $cellAttributes = array(); |
| 775 | + $verticalLabel = false; |
| 776 | + |
| 777 | + if ( !empty($this->mParams['vertical-label']) ) { |
| 778 | + $cellAttributes['colspan'] = 2; |
| 779 | + $verticalLabel = true; |
| 780 | + } |
| 781 | + |
773 | 782 | if ( $errors === true || !$wgRequest->wasPosted() ) { |
774 | 783 | $errors = ''; |
775 | 784 | } else { |
776 | 785 | $errors = Html::rawElement( 'span', array( 'class' => 'error' ), $errors ); |
777 | 786 | } |
778 | | - |
779 | | - $html = $this->getLabelHtml(); |
780 | | - $html .= Html::rawElement( 'td', array( 'class' => 'mw-input' ), |
781 | | - $this->getInputHTML( $value ) ."\n$errors" ); |
782 | | - |
| 787 | + |
| 788 | + $label = $this->getLabelHtml( $cellAttributes ); |
| 789 | + $field = Html::rawElement( |
| 790 | + 'td', |
| 791 | + array( 'class' => 'mw-input' ) + $cellAttributes, |
| 792 | + $this->getInputHTML( $value ) . "\n$errors" |
| 793 | + ); |
| 794 | + |
783 | 795 | $fieldType = get_class( $this ); |
| 796 | + |
| 797 | + if ($verticalLabel) { |
| 798 | + $html = Html::rawElement( 'tr', |
| 799 | + array( 'class' => 'mw-htmlform-vertical-label' ), $label ); |
| 800 | + $html .= Html::rawElement( 'tr', |
| 801 | + array( 'class' => "mw-htmlform-field-$fieldType {$this->mClass}" ), |
| 802 | + $field ); |
| 803 | + } else { |
| 804 | + $html = Html::rawElement( 'tr', |
| 805 | + array( 'class' => "mw-htmlform-field-$fieldType {$this->mClass}" ), |
| 806 | + $label . $field ); |
| 807 | + } |
784 | 808 | |
785 | | - $html = Html::rawElement( 'tr', array( 'class' => "mw-htmlform-field-$fieldType" ), |
786 | | - $html ) . "\n"; |
787 | | - |
788 | 809 | $helptext = null; |
789 | 810 | if ( isset( $this->mParams['help-message'] ) ) { |
790 | 811 | $msg = $this->mParams['help-message']; |
— | — | @@ -809,14 +830,14 @@ |
810 | 831 | function getLabel() { |
811 | 832 | return $this->mLabel; |
812 | 833 | } |
813 | | - function getLabelHtml() { |
| 834 | + function getLabelHtml( $cellAttributes = array() ) { |
814 | 835 | # Don't output a for= attribute for labels with no associated input. |
815 | 836 | # Kind of hacky here, possibly we don't want these to be <label>s at all. |
816 | 837 | $for = array(); |
817 | 838 | if ( $this->needsLabel() ) { |
818 | 839 | $for['for'] = $this->mID; |
819 | 840 | } |
820 | | - return Html::rawElement( 'td', array( 'class' => 'mw-label' ), |
| 841 | + return Html::rawElement( 'td', array( 'class' => 'mw-label' ) + $cellAttributes, |
821 | 842 | Html::rawElement( 'label', $for, $this->getLabel() ) |
822 | 843 | ); |
823 | 844 | } |
Property changes on: branches/wmf/1.16wmf4/includes/HTMLForm.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
824 | 845 | Merged /branches/wmf-deployment/includes/HTMLForm.php:r53381,60970 |
825 | 846 | Merged /branches/REL1_15/phase3/includes/HTMLForm.php:r51646 |
826 | 847 | Merged /branches/wmf/1.16wmf4/includes/HTMLForm.php:r68909 |
827 | 848 | Merged /branches/sqlite/includes/HTMLForm.php:r58211-58321 |
828 | 849 | Merged /trunk/phase3/includes/HTMLForm.php:r63549,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816,68909 |