Commit Graph

72 Commits

Author SHA1 Message Date
Jake Dallimore 1c1d738ba0 MDL-52318 core_form: allow multiple filepicker-enabled url elements
In cases when filepicker support is enabled, this patch adds a wrapper
div around the url element and includes the filepicker id in its id.
This allows the js callback code to target the specific input field
with which it is associated.
2018-07-09 11:29:23 +08:00
Jake Dallimore 548c260d82 MDL-62730 themes: Fix calendar icon alignment for datetime in Boost 2018-06-22 10:16:28 +08:00
David Monllao 76fc9a4f5a Merge branch 'MDL-62376-master' of git://github.com/bmbrands/moodle 2018-05-11 14:47:32 +02:00
Bas Brands f01734122a MDL-62277 Theme boost: add badge criteria layout 2018-05-10 16:32:41 +02:00
Bas Brands d2d150b21d MDL-62376 Theme boost: server side form validation for checkboxes 2018-05-10 11:12:31 +02:00
David Monllao 69a0a8edef NOBUG: Fixed file access permissions 2018-05-08 14:02:40 +02:00
Bas Brands 54cbfbca8a MDL-62295 Theme boost: duration form field alignment 2018-05-07 11:39:57 +02:00
David Monllao c5a8065258 Merge branch 'MDL-61028-master' of https://github.com/sammarshallou/moodle 2018-04-23 13:09:53 +02:00
sam marshall a97c937033 MDL-61028 core_form: Autocomplete field to support HTML selection
When using the AJAX autocomplete field, it allows JavaScript to add
custom HTML to selected options. For example, the user field from
the assign roles page includes an icon and other information by the
user's name.

Once you submit the form and the page reloads, there was no way to
provide this information back to the autocomplete field. HTML
<option> tag was used for the value names but it may only contain
text, not tags, so including it in the normal value did not work.

This change adds a new option for the autocomplete field that lets
you include HTML to override the default (text-only) value of the
label used to represent each option.
2018-04-20 16:42:54 +01:00
Bas Brands 3ec69c2ece MDL-56511 theme_boost: Update to Bootstrap 4 stable
Behat fixes by David Monllao <davidm@moodle.com>
    - Blocks
    - Modals
    - Messaging styling
    - Breadcrumb
    - Pagination
    - Course & categories management
2018-04-18 09:31:53 +08:00
Eloy Lafuente (stronk7) 66434106ed MDL-60548 test: Change modified lang string to get tests back to pass
Also modified a template example use, so there aren't courrencies
of the old string in codebase.
2018-04-10 23:24:17 +02:00
Andrew Nicols 2f920d9be8 Merge branch 'wip-MDL-56864-master' of git://github.com/marinaglancy/moodle 2017-12-12 13:36:32 +08:00
Damyon Wiese 992c5ccfbf MDL-60526 forms: Button elements should have type
The mform "buttons" should be of type "button", instead it's not specified so they get
the default of "submit". This is causing behat fails.
2017-11-22 13:24:32 +01:00
Marina Glancy be2e38ed92 MDL-56864 forms: boost templates don't allow remove last tag 2017-11-21 15:29:02 +08:00
Marina Glancy 032674eebc MDL-59775 forms: add femptylabel class to els without labels
This class was present in clean/more but was forgotted in boost
2017-09-11 10:33:48 +08:00
Davo Smith 766d6f9a61 MDL-53848 form: hide entire group if hideIf test is applied to the group 2017-08-17 14:52:10 +01:00
Ryan Wyllie 0a501e1b2e MDL-59749 form: revert setting id on inline form elements
Revert the change I made in MDL-59382 to correctly set the id for inline
form elements because it's breaking a bunch of different places that had
already worked around the problem.
2017-08-08 03:28:36 +00:00
Ryan Wyllie 6973baa31e MDL-59382 form: fix name in template context 2017-08-02 04:47:42 +00:00
Jonathon Fowler 97bb4f755e MDL-53240 filetypes: Introduce the form element to specify plugin types
This is a stripped down version of the original Jonathon's element
without the actual JS selector. The options "allowall" and "onlytypes"
are not fully supported right now yet.
2017-06-01 09:18:38 +02:00
Dan Poltawski 48f5c05019 Merge branch 'wip-MDL-34859-master' of git://github.com/marinaglancy/moodle 2017-03-20 07:54:22 +00:00
Marina Glancy b4eb5f0212 MDL-34859 forms: new element defaultcustom 2017-03-20 14:59:45 +08:00
Damyon Wiese 348aed801c MDL-40759 pix: Use proper pix tags for required fields. 2017-03-17 15:51:29 +08:00
Damyon Wiese a26ce2482a MDL-40759 themes: font awesome support
We add a new theme config so the theme can say it supports font-awesome.
If this is true, the pix_icon renderer will call a mapping function to map
from the moodle style t/edit to a font-awesome style fa-cog icon name. Then the renderer
will either render an image tag for old icons - or an accessible font-awesome <i> tag.

This mostly works - but there are some places where we don't use the pix icon renderer, and
we directly create image tags with pix_url image sources. These will need updating (Atto icons,
drag and drop move icons, editpdf icons).
2017-03-17 15:51:28 +08:00
Jake Dallimore a1f95d48b9 MDL-57368 templates: add example context to core_form/element-template 2017-01-12 11:31:47 +08:00
Tony Butler 3132ba0278 MDL-57451 theme_boost: Add checkboxgroup class to checkbox input element 2016-12-22 11:29:55 +00:00
Damyon Wiese ef06bc18b0 MDL-57220 boost: Fix for date selector inline template
It was putting the label on a separate line.
2016-12-01 09:48:59 +08:00
Damyon Wiese 52ee200368 MDL-57220 boost: minimal fix for radio button template
It still does not match
http://v4-alpha.getbootstrap.com/components/forms/#radios
but I don't want to make radical changes before 3.2 release.
2016-12-01 09:48:06 +08:00
Andrew Nicols a57699ead8 Merge branch 'MDL-57177-master' of git://github.com/cameron1729/moodle 2016-11-30 13:15:58 +08:00
David Mudrák 1270616023 MDL-56800 theme_boost: Radios should not have name if soft frozen, too 2016-11-29 11:32:28 +00:00
Andrew Nicols 06ded0ed5f MDL-56800 theme_boost: Remove name from hardFrozen radio 2016-11-29 08:11:31 +00:00
Andrew Nicols 220f3ac711 MDL-56858 theme_boost: Correct bad merge conflict 2016-11-29 13:49:18 +08:00
Andrew Nicols 740dbe77a2 Merge branch 'MDL-56858_master-alt-2' of git://github.com/markn86/moodle 2016-11-29 11:52:32 +08:00
Cameron Ball d91cbe1e62 MDL-57177 theme_boost: Use regular ! for advanced form fields
Previously we used U+2757 on advanced form fields, which was problematic
as it's part of emoji and displays differently on different platforms.
This is a problem since we explicitly style it to be blue, but, for
example on OS X it's red (since it gets replaced with their emoji).
2016-11-29 10:48:38 +08:00
Mark Nelson dc801cb6b9 MDL-56858 theme_boost: separate input description and label
Also added missing advanced and required form symbols.
2016-11-28 18:24:16 +08:00
Dan Poltawski 1f5fbd1696 Merge branch 'wip-mdl-56659' of https://github.com/rajeshtaneja/moodle 2016-11-25 11:17:36 +00:00
Rajesh Taneja dfa707c994 MDL-56659 core: No need for noscript tag and set size later
1. BrowserKitDriver::setValue only checks if the element is
   disabled. It still is able to set value on hidden elements
   So there is no need for noscript tag in password unmask
2. Set size on hidden field is not valid html, so set it later
   when text element is displayed
2016-11-25 12:09:37 +08:00
David Mudrák c03f1de198 MDL-56800 theme_boost: Clean up rendering of the radio buttons
The <input type="radio"> element does not support the size attribute so
there is no point of rendering it. Also fixed the example data as the
field name must not contain any whitespace.
2016-11-24 23:50:21 +01:00
David Mudrák edd837038a MDL-56800 theme_boost: Display frozen form's radios as disabled
For frozen (read-only) forms, the radio widget was not displayed at all
and only the legend text was displayed. So it was not possible to see
which one of the radios in a group was selected.

This patch mimics the original quick form rendering and displays the
radio as disabled.
2016-11-24 23:47:39 +01:00
Ankit Agarwal f318b74b49 MDL-56809 boost: Don't escape html in single select options 2016-11-21 11:38:51 +05:30
Ankit Agarwal 63531fff79 MDL-56809 boost: Add template context info 2016-11-21 11:38:51 +05:30
Damyon Wiese 998432c2c9 MDL-56724 mod_choice: Improve alignment and checkboxes on dates 2016-11-15 09:07:42 +00:00
Damyon Wiese 50302c404a MDL-56790 boost: Styling fixes for mod_feedback
Also fixed are problems with frozen select from elements showing raw
HTML. I checked the other form templates for similar problems and fixed
them all.
2016-11-09 11:29:58 +08:00
Dan Poltawski ebdd54f476 MDL-56161 boost: fix confict resolution mistake 2016-11-02 10:20:34 +00:00
Dan Poltawski e5c726353f MDL-56161 boost: add missing example context 2016-11-02 10:14:00 +00:00
Dan Poltawski 540b01b60d Merge branch 'MDL-56161-master' of git://github.com/damyon/moodle 2016-11-02 09:36:09 +00:00
David Monllao f5d9072e51 Merge branch 'MDL-56462-master' of git://github.com/damyon/moodle 2016-11-02 09:14:09 +08:00
Damyon Wiese 9e2f13125a MDL-56161 boost: alignment static form elements
Wrap the HTML from a static form element with "form-control-static" to apply correct padding.

Also use a span, not a label for unlabelable static form elements.
2016-11-02 09:06:12 +08:00
Dan Poltawski b9703b8e05 Merge branch 'MDL-56621-master' of git://github.com/damyon/moodle 2016-11-01 21:20:53 +00:00
Dan Poltawski 9bf205fb73 Merge branch 'MDL-55732-master' of git://github.com/damyon/moodle 2016-11-01 09:47:11 +00:00
Eloy Lafuente (stronk7) 2fd11f3516 Merge branch 'MDL-56188-master' of git://github.com/damyon/moodle 2016-10-31 19:59:21 +01:00