Commit graph

8 commits

Author SHA1 Message Date
Prateek Saxena
820a18762f SelectWithInput: Add 'disabled' property on main widget
…also HTMLSelectAndOtherField and HTMLSelectOrOtherField now
pass the 'disabled' field when creating the input widget.

The OOUI versions of these HTMLFormFields would get enabled
right after infusion even they were disabled in PHP. This
makes sure that they remain disabled.

Change-Id: Iddd8ad81731dba7bdcb599d6fe104cb259b11733
2018-07-25 12:02:50 +05:30
Bartosz Dziewoński
485f66f174 Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient
Find: /isset\(\s*([^()]+?)\s*\)\s*\?\s*\1\s*:\s*/
Replace with: '\1 ?? '

(Everywhere except includes/PHPVersionCheck.php)
(Then, manually fix some line length and indentation issues)

Then manually reviewed the replacements for cases where confusing
operator precedence would result in incorrect results
(fixing those in I478db046a1cc162c6767003ce45c9b56270f3372).

Change-Id: I33b421c8cb11cdd4ce896488c9ff5313f03a38cf
2018-05-30 18:06:13 -07:00
Ori Livneh
a603ae73a7 Fix letter-case of several namespace and class names
'Mediawiki\Widget\SelectWithInputWidget' is the only one that shows up
in the logs, but I tidied up a few others I came across.

Change-Id: I700dec858007a8013e6d7b9e37ddf518f223d8b7
2017-10-14 21:43:05 -04:00
Bartosz Dziewoński
e8a0b0552d HTMLSelectAndOtherField/HTMLSelectOrOtherField: Change how ID is handled in OOUI mode
Set the ID on the main widget (mw.widgets.SelectWithInputWidget), so
that it can be infused by ID.

The dropdown/textbox by themselves can't be infused individually,
therefore IDs on them are pretty useless; remove those where they're
not necessary.

Follow-up to 8bd6605736.

Change-Id: If54dd48f1000e3e0f5a978428a5b622797b4f765
2017-09-25 20:50:34 +02:00
Prateek Saxena
8bd6605736 HTMLSelectAndOtherField/HTMLSelectOrOtherField: Add OOUI implementation
Bug: T106999
Change-Id: I0f437ed8a8808f8090bf466fd939345d74d57c34
2017-06-15 08:52:08 +05:30
umherirrender
34fe90ac52 Remove empty lines at end of functions
It looks like there is something missing after the last statement
Also remove some other empty lines at begin of functions, ifs or loops
while at these files

Change-Id: Ib00b5cfd31ca4dcd0c32ce33754d3c80bae70641
2016-11-05 11:55:10 +01:00
addshore
63dd31cd31 Add access modifiers to htmlform classes
Change-Id: Id8c0f0676b3200993af3cec493efc99839211bcc
2016-11-04 11:40:42 +01:00
Bartosz Dziewoński
15692fa6d4 Move HTMLFormField subclasses to a separate directory
It's getting more difficult to navigate the files in includes/htmlform/
with every new field and every new helper class that is being added.

Change-Id: I92ce2356baf6151f17b2440970d5abdf86503820
2016-08-01 07:58:56 +00:00
Renamed from includes/htmlform/HTMLSelectOrOtherField.php (Browse further)