1221 Commits

Author SHA1 Message Date
sam marshall
4bb42cc362 MDL-80608 core_form: Fire modal form event for errors in definition
The ERROR event is defined as being fired if an exception occurs while
contacting the server. This change ensures it is fired for exceptions
in the form definition AJAX request, not just form submission.

Additionally, if such an error occurs in submission, the form buttons
were left in disabled state. This change makes them enabled again.
2024-02-14 13:49:39 +00:00
meirzamoodle
9ba1423359 MDL-74641 repository: Handles increase bytes while extracting zip files
We should not rely solely on the provided size information.
Therefore the system needs to recalculate the size of each file in the zip file,
whether small or big.

The changes also cover the filemanager.js file if an error appears.
2024-02-07 02:34:19 +01:00
Ilya Tregubov
59cac76dc1 Merge branch 'MDL-79927' of https://github.com/paulholden/moodle 2024-01-25 09:53:21 +08:00
Sara Arjona
8b36abdb9d
Merge branch 'MDL-80259-main' of https://github.com/roland04/moodle 2024-01-24 09:16:12 +01:00
Mikel Martín
a198884333 MDL-80259 theme_boost: Refactor badge helper classes for Bootstrap 5 2024-01-23 08:27:23 +01:00
Ferran Recio
f4adbc8a11 MDL-79029 behat: replace deprecated behat steps 2024-01-22 11:12:28 +01:00
Jun Pataleta
82c9578e36
Merge branch 'MDL-72308' of https://github.com/paulholden/moodle 2024-01-18 11:31:09 +08:00
Paul Holden
e2cb2fa5dc
MDL-72308 forms: final removal of legacy formchangechecker YUI. 2024-01-15 14:24:51 +00:00
Paul Holden
9357a1c583
MDL-80192 forms: implement method to set group element hidden label.
This is consistent with the API used for other form element types,
in order to provide screen-readable text in the fieldset legend while
not necessarily wanting to display said label.

The new class property is automatically exported to the template via
the `templatable_form_element` trait.
2024-01-12 08:33:37 +00:00
Paul Holden
24f59a7d32
MDL-79927 files: scope toggleall checkboxes per filemanager instance.
Ensures that when multiple exist on the same page, each operates
independently of the others.
2024-01-04 13:22:33 +00:00
Ilya Tregubov
1e83b9eba7 Merge branch 'MDL-79985-master' of https://github.com/ferranrecio/moodle 2023-12-20 09:06:08 +08:00
Ferran Recio
3344354641 MDL-79985 forms: add choicedropdown form element
The new quick form field uses a choice list to display a dropdown
component inside a form. Apart from que quick form code, the patch also
include a small improvement to the choicelist class to disable empty
values. This small patch is needed because the quickform field won't
allow empty values.
2023-12-19 09:43:35 +01:00
Jun Pataleta
030def7a46
Merge branch 'MDL-80079-master' of https://github.com/andrewnicols/moodle 2023-12-06 21:59:47 +08:00
Paul Holden
b7205c5c84
MDL-71336 forms: ensure grouped date elements have unique IDs.
Previously they were each taking the ID of their parent group element.
2023-11-23 12:01:24 +00:00
Huong Nguyen
4cf3f384c3 Merge branch 'MDL-80066' of https://github.com/elza3ym/moodle 2023-11-16 10:52:48 +07:00
Andrew Nicols
dab4a2b66f
MDL-80079 core: Correct incorrect arg to format_string::$options 2023-11-14 22:28:55 +08:00
Sara Arjona
ff518d3e71
Merge branch 'MDL-77581-master' of https://github.com/dpalou/moodle 2023-11-13 17:19:02 +01:00
Mohamed Shehata
52b9a59d79 MDL-80066 form: fix date picker on small screens 2023-11-09 17:39:10 +02:00
Dani Palou
273251d765 MDL-77581 behat: Apply new lesson generators to existing tests 2023-11-09 10:18:43 +01:00
Paul Holden
58d9babe56
MDL-79629 javascript: native promises enhancing autocomplete module.
Preserve existing `enhance` method return of jQuery style promises to
allow calling code to continue relying on that (e.g. when calling old
style `.done` and `.fail`).

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2023-11-08 20:05:35 +00:00
Mikel Martín
e9afd7f072
MDL-79629 forms: Improvements to autocomplete form element
- Preserve autocomplete input options classes to the autocomplete suggestions
- Add new styles for suggestions headings
- Add a new class selector form-autocomplete-input so input can be easily selected
  for styling.

Various improvements to make the module more re-usable elsewhere:
change event bubbling, promise argument support when enhancing.

Co-authored-by: Paul Holden <paulh@moodle.com>
2023-11-02 14:50:10 +00:00
viettruongq
2375b00a08 MDL-70760 admin: Limited length config setting validate client-side 2023-11-01 22:02:58 +07:00
Ruslan Kabalin
afe7f76e14 MDL-79762 core: Add possibility to define modal type for modalform
If `moduleName` param is passed in config object for modalform, it will be
used to instantiate modal class, otherwise 'core/modal_save_cancel' is
used.

Co-authored-by: Marina Glancy <marina@moodle.com>
2023-10-25 15:56:33 +01:00
Sara Arjona
cc9430929d
MDL-77708 docs: Update references from docs.moodle.org/dev 2023-09-26 10:30:19 +02:00
Huong Nguyen
632e603304
Merge branch 'MDL-78728' of https://github.com/paulholden/moodle 2023-09-15 16:19:27 +08:00
Jun Pataleta
4370887449
Merge branch 'MDL-78916-master' of https://github.com/junpataleta/moodle 2023-09-15 16:19:06 +08:00
Jake Dallimore
893ce4f7b2
MDL-78916 core_form: allow class overrides on button form element
This works the same as the customclassoverride on the submit element,
in that only the 'btn' class is hard coded in the template. Passing
$options['customclassoverride'] to the constructor allows calling code
to specify other classes to be added beside 'btn'. E.g. 'btn-primary'.
If no options array is passed, 'btn-secondary' is used (the existing
class used for button elements).
2023-09-13 17:37:06 +08:00
Jun Pataleta
6c6a655b0b
Merge branch 'MDL-78527-master' of https://github.com/aanabit/moodle 2023-09-13 11:17:20 +08:00
Amaia Anabitarte
85d07564cb MDL-78527 core_completion: Improving core completion styling 2023-09-12 15:43:48 +02:00
Amaia Anabitarte
054092519e MDL-78527 forms: Improve error showing for radio buttons 2023-09-12 09:59:36 +02:00
Amaia Anabitarte
0122c2c3e7 MDL-78527 forms: New parentclass attribute to wrapper element only 2023-09-12 09:59:36 +02:00
Andrew Nicols
48bc688ccd
MDL-78324 core: Convert modals to use new static methods
This commit takes all modals which were not using the legacy
ModalFactory.create triggers and migrates them to the new Modal.create
method.
2023-09-09 00:04:11 +08:00
Paul Holden
d0051760e5
MDL-78728 forms: correctly refer to outermost form element.
Read-only forms do not belong to a <form> element, so we can't refer
to that. Instead find the `.mform` element (which exists for regular
and read-only forms).
2023-09-04 16:33:51 +01:00
Philipp Memmel
c9398e27f2 MDL-78795 core_form: Fix repeated elements JS problem
Co-authored-by: Stefan Hanauska <stefan.hanauska@csg-in.de>
2023-09-03 14:12:30 +02:00
Ilya Tregubov
42aff47fff
Merge branch 'MDL-74429-master' of https://github.com/roland04/moodle 2023-09-01 11:15:09 +08:00
Jun Pataleta
cc7bc1a553
Merge branch 'MDL-79064-master' of https://github.com/andrewnicols/moodle 2023-08-29 13:32:45 +08:00
Andrew Nicols
af7719682d
MDL-79064 core: Update all get_strings as uses 2023-08-29 10:57:54 +08:00
Sara Arjona
31e9a68197
Merge branch 'MDL-78707' of https://github.com/paulholden/moodle 2023-08-28 16:40:47 +02:00
Paul Holden
b30245b3e2
MDL-76974 javascript: convert remaining uses of old preferences API.
Implement component preference definition callbacks, update JS code
to use the `core_user/repository` module instead of the now deprecated
API.
2023-08-22 14:43:34 +01:00
Paul Holden
0d4d8f8a8c
MDL-78707 forms: improve form container collapsing mechanism.
By using a more explicit selector for matching containers we avoid
previous problems such as incorrect count, and collapsing of elements
that had the same class name.
2023-08-21 12:38:45 +01:00
Mikel Martín
ea3ecbb3ab MDL-74429 core_form: Fix element url input overflow 2023-08-18 10:11:52 +02:00
Jun Pataleta
51e86626d1
Merge branch 'MDL-77174-master' of https://github.com/andrewnicols/moodle 2023-08-08 15:15:32 +08:00
Angelia Dela Cruz
ebbe96905a MDL-78498 Behat: Use data generators for forum posts and replies
This commit does few things:
* Replace manual forum posts and replies to use data generator.
* It also changes the code to handle social forums.
* Other behat clean-ups and optimization.

Co-authored-by: Simey Lameze <simey@moodle.com>
2023-08-01 13:39:52 +08:00
Andrew Nicols
56260354b1
MDL-77174 filemanager: Switch from YUI dialogue to utility modal 2023-07-31 10:57:09 +08:00
Sara Arjona
2e78301afb
Merge branch 'MDL-78288-master' of https://github.com/aanabit/moodle 2023-07-13 16:51:37 +02:00
Ilya Tregubov
09c7cd98f4
Merge branch 'MDL-73213' of https://github.com/pedrojordao/moodle 2023-07-13 16:49:58 +02:00
Amaia Anabitarte
13857d4af9 MDL-78288 core_course: Fixing collapse/expand all changed behavior 2023-07-13 09:32:20 +02:00
Amaia Anabitarte
290e6f4c6f MDL-78288 core_course: Adding filter_shown_headers option to forms 2023-07-12 14:22:56 +02:00
Pedro Jordao
8658b4937f MDL-73213 autocomplete: keep selected value when the state changes.
The selected value of the dropdown was being cleared when the dropdown
was opened, this was causing an error when submitting the form if the
field was required. The main cause was that we were emptying the
select before loading new values, this solution was created because
of an issue where we could not deselect values if the list was
reloaded. To fix this problem, I added an empty option as the first
element of the select only when deselecting a certain item.
2023-07-06 14:52:18 -03:00
Jun Pataleta
c1de49bd6c
Merge branch 'MDL-78484-master' of https://github.com/NashTechOpenUniversity/moodle 2023-07-06 09:41:41 +08:00