Advertisement
Guest User

OOUI bad alignment

a guest
Mar 20th, 2018
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.74 KB | None | 0 0
  1.     static function buildFilterLoader() {
  2.         $loadText =
  3.         new OOUI\FieldLayout(
  4.             new OOUI\TextInputWidget(
  5.                 [
  6.                     'type' => 'number',
  7.                     'name' => 'wpInsertFilter',
  8.                     'id' => 'mw-abusefilter-load-filter'
  9.                 ]
  10.             ),
  11.             ['label' => wfMessage( 'abusefilter-test-load-filter' )->text()]
  12.             );
  13.         $loadButton =
  14.             new OOUI\ButtonInputWidget(
  15.                 [
  16.                     'label' => wfMessage( 'abusefilter-test-load' )->text(),
  17.                     'id' => 'mw-abusefilter-load'
  18.                 ]
  19.             );
  20.  
  21.         $loadGroup =
  22.         new OOUI\HorizontalLayout( [
  23.         'items' =>
  24.                 [$loadText, $loadButton]
  25.         ]);
  26.         // CSS hack to avoid huge input field
  27.         $loadDiv =
  28.             Xml::tags(
  29.                 'div',
  30.                 [ 'class' => 'mw-abusefilter-OOUI-smaller' ],
  31.                 $loadGroup
  32.             );
  33.         return $loadDiv;
  34.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement