- Added new method HTMLForm::setTableId() to allow to set the ID
of the main table (or the outermost <div> element depending on
the format).
- Changed the second parameter of HTMLForm::displaySection()
to take the full ID so that the one set with setTableId()
will not get prefixed with "mw-htmlform-"
Note: If someone has a better idea for the name of that method
(since it also applies to <div> elements), please tell me it :)
Change-Id: Id01bd0fa44512b0320f3c3ff79627e8a9bccd5bb
Added spaces after/before parenthesis
Removed unneeded parenthesis around some statements
Broke a long line
Change-Id: I7fbe129f7bbf524dd0598ece2a9708643f08453b
Bug: 47743
Renamed remove-options parameter of HTMLCheckMatrix to force-options-on
and added additional force-options-off. Minor refactor of
PreferencesForm::filterDataForSubmit to move class specific code into their
respective classes.
Change-Id: I61a6b2bcce3102e2350088912ee77620a9f678f9
Things like checkboxes have no label, yet a label div gets generated
anyway. This is annoying when maybe I don't want that empty div hanging
around (i.e., it looks like it's part of other option groups when I
have left margins on all .mw-input).
This patch will now also escape 'label' fields by default. For the old
functionality you must now explicitly use the 'label-raw' field.
Change-Id: I8f8340911b7495a91c93e7f2eb7c041b2a7f2179
- suppressReset() is useless since it's disabled by default now
- displayForm() requires an argument
Change-Id: I1125460611e74a3812784954a935fab612a7881c
- Buttons can now be marked disabled and they will not be clickable.
- The default submit button may now be opted out of.
Change-Id: I8293a3c09da51152bfc7f6f6951416c71ce0bb38
I set property "$typeMappings" to private (no clients outside this class
in our codebase).
I removed property $jsAdded, it is unused in this class and throughout
the codebase and seems a leftover from 2008.
Special:Preferences still works with this change.
Change-Id: Id5668141835e22e3e1b043109e50d73ccd6b1229
* Removed spaces around array index
* Removed double spaces or added spaces to begin or end of function
calls, method signature, conditions or foreachs
* Added braces to one-line ifs
* Changed multi line conditions to one line conditions
* Realigned some arrays
Change-Id: Ia04d2a99d663b07101013c2d53b3b2e872fd9cc3
* Ran spell-checker over code comments in /includes/
* A few spellchecking fixes for wfDebug() calls
Found one very strange (NOOP?) line in Linker.php - see "TODO: BUG?"
Change-Id: Ibb86b51073b980eda9ecce2cf0b8dd33f058adbf
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.
Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
Added/removed spaces around logical/arithmetic operator
Reduced multiple empty lines to one empty line
Removed wrong tabs before comments at end of line
Removed too many spaces in assigments
Change-Id: I2bba4e72f9b5f88c53324d7b70e6042f1aad8f6b
I'd rather just get rid of fieldsets when using the div output
format, but since I can't do that; at least give me the option
to style everything -- all the way down :)
Change-Id: Id95b1d98aa6ac11c5030d1ac96d05d6b60b7077e
Extensions can use their own interface for user preferences, with the
help of the action=options API.
For example, Universal Language Selector has a different UI to
allow anonymous and logged in users to set language related preferences.
Validation for the preference values is up to the extensions.
Change-Id: I18a5ffb5cc202c59ba76b86cfb63e49010cc1881
- Added HTMLFormField::msg() to check whether $this->mParent->msg()
can be called and otherwise use wfMessage()
- Made Licenses::msg() inline to prevent conflict with HTMLFormField::msg()
Change-Id: I7fa95e1d61ac4128d1d4d5f091c39bcbc8ecc651
The message is fetched using Message::escaped() but is
later passed to Xml::element() (from Xml::fieldset() call
HTMLForm::wrapForm()) which means it is double escaped.
Change-Id: I7154b3b26cc46759c184bdf9059d82470e2ab836
Add 'list' (new in HTML5 as part of datalist) to the allowed input attributes in HTMLForm.
Also move maxlength into the general foreach.
Change-Id: I2ba61b0cc1b9f8b3db6c419efb5cbadfde594699
array( 'required' => false ) will now result in the field not being required rather then the unexpected opossite.
And this is now possible (without doing some extra if)
array( 'required' => getSomeBoolean() )
Change-Id: I1fc22b16ab1fa17111c48aa664aaf47de5f7075a
This make HTMLForm mutator to return $this for easy method chaining such
as:
form = new HTMLForm( $someFields );
$form->setMethod( 'get' )
->setWrapperLegendMsg( 'message-key' )
->suppressReset()
->prepareForm()
->displayForm();
prepareForm()->displayForm(); should be at the very end apparently
though it is not enforced by the object.
Change-Id: Iebaa83a1da3c89e5ab729a889e54844535619d54
When inserting XML elements inline <such as this one>, doxygen chokes
about it not being known. Simply enclosing the tag in double quotes
prevents doxygen from emitting a warning.
Also enclosed a few invalid functions calls such as \. and double quoted
the HTML entities such as &foobar;
Change-Id: I4019637145e683c2bec3d17b2fd98b0c50a932f1
- $wgUsePathInfo is now only used on servers not passing REQUEST_URI to determine if PATH_INFO should be used
- WebRequest now extracts information from REQUEST_URI even when $wgUsePathInfo is false
- HTMLForm bases it's decision on whether or not to include a hidden 'title' input on whether $wgArticlePath uses a query instead of assuming that $wgUsePathInfo was used to set the article path
Change-Id: I1b461fef88b26d045f4edd7553b59255c5e595d8