359 Commits

Author SHA1 Message Date
Sam Hemelryk
3b53b85b47 Merge branch 'w52_MDL-29917_m23_autocomplete' of git://github.com/skodak/moodle 2012-01-04 10:58:03 +13:00
Petr Skoda
6e9989dbd3 MDL-29917 prevent form autocompletion in most Moodle forms
The password autocompletion in case of Moodle makes sense only on the login page, the form autocompletion in general is most probably useful only on the user signup page.

This patch is compatible with html 5, unfortunately we have to ignore strict warnings in legacy xhtml 1.0 standard.
2011-12-30 14:38:52 +01:00
Tim Hunt
820b41e34f MDL-30168 formslib: untangle automatic id generation.
Previously, we had overridden the _generateId method in almost all
subclasses; and then we mostly, but not always; ignored the value that
was generated there, and instead generated new (nicer) values in
MoodleQuickForm_Renderer::renderElement. Of course, that is not really a
logical place to (re)generate ids.

I have fixed the code so that the _generateId method now uses the 'nice
id' algorithm from renderElement. This should make the whole code flow
more logical.

This make all our overriding of _generateId unnecessary.

We do need a special _generateId for radio buttons, because you often
have different radio buttons with the same name but different values.

This change should only change the ids on radio, checkbox and
advcheckbox elements. Previously, those were essentially random, so I
don't think anyone could have been relying on the particular values.

This commit also has new unit tests, first to test the basic _generateId
algorithm, and then to create and render an example form (including some
tricky things like repeat_elements) and chech the acutal ids in the
generated HTML.
2011-12-23 11:51:45 +00:00
Rajesh Taneja
51070abc78 MDL-30560 Forms Lib: 'type' key for repeat_elements is restored 2011-12-07 11:56:34 +08:00
Aparup Banerjee
03848c4568 MDL-30335 formslib : phpdoc improvement 2011-11-23 11:47:06 +08:00
Aparup Banerjee
5cde86faa9 Merge branch 'MDL-30335' of git://github.com/timhunt/moodle 2011-11-23 11:41:58 +08:00
Tim Hunt
8f6384a9ec MDL-27045 formslib: fix disabledif for advcheckbox
This is based on earlier work by Henning Bostelmann and Tom Potts.
2011-11-17 17:57:27 +00:00
Tim Hunt
fa2fa5c698 MDL-30335 formslib: fix repeat_elements for groups that don't appendName 2011-11-17 16:42:13 +00:00
Marina Glancy
6798c63e20 Added form element grading and integrated it with grading_controller 2011-10-12 15:01:53 +08:00
Rajesh Taneja
63d5c4ac85 MDL-25937 Forms Library: Filepicker will respect disable if 2011-10-03 16:26:21 +08:00
Rajesh Taneja
c6aa3670d0 MDL-25937 Froms Library: Added server side validation for filepicker and filemanager 2011-09-29 09:39:44 +08:00
Eloy Lafuente (stronk7)
ac4a2a8c08 MDL-29512 Revert "MDL-25937 Froms Library: Added server side validation for filepicker and filemanager"
This reverts commit f03a17bb09bed83a29cda253c2049c937852dd38.
2011-09-25 17:13:40 +02:00
Eloy Lafuente (stronk7)
f0e2317087 MDL-29512 Revert "MDL-25937 Forms Library: Added Javascript validation for filepicker and filemanager. Also fixed disbledif rule check for both"
This reverts commit 7dfe3c517b8cf88356b1d1e208480b1a15452273.
2011-09-25 17:10:27 +02:00
Rajesh Taneja
7dfe3c517b MDL-25937 Forms Library: Added Javascript validation for filepicker and filemanager. Also fixed disbledif rule check for both 2011-09-16 09:17:20 +08:00
Rajesh Taneja
f03a17bb09 MDL-25937 Froms Library: Added server side validation for filepicker and filemanager 2011-09-16 09:17:19 +08:00
Tom Lanyon
af9b14446d MDL-28701 Change uses of make_upload_directory(temp) to make_temp_directory(). 2011-09-10 10:43:49 +02:00
Rajesh Taneja
ab978b38c4 MDL-28987 Forms Library: Added tinyMCE onblur event callback for required tinymce fields 2011-09-05 12:19:40 +08:00
Rajesh Taneja
cbe20ec362 MDL-28987 Forms Library: Added tinyMCE save for tinymce editor validation 2011-08-31 14:13:35 +08:00
Adam Olley
567282021a MDL-28987: Affix [text] to editor element in JS validation and add blur event 2011-08-31 14:09:12 +08:00
Petr Skoda
18bd7573d6 MDL-26796 convert array parameter cleaning to new functions 2011-08-18 08:40:33 +02:00
Eloy Lafuente (stronk7)
c4904bdab5 Merge branch 'MDL-28737' of git://github.com/timhunt/moodle 2011-08-17 02:51:09 +02:00
Eloy Lafuente (stronk7)
515380a992 Merge branch 'MDL-23872_M' of git://github.com/nebgor/moodle 2011-08-16 11:51:24 +02:00
Tim Hunt
775fd4f145 MDL-28737 advcheckboxes toggle state every submit if checkbox_controller present. 2011-08-12 19:11:45 +01:00
Rajesh Taneja
b29c9b05e6 MDL-27728 Moodleforms: Added validation for element before checking element values 2011-08-12 10:22:40 +08:00
Daren Chandisingh
f1f70bd4dd MDL-23872 Forms Library : Updated MoodleQuickForm to honour setConstant(), prevents injection. 2011-08-10 15:17:53 +08:00
Marina Glancy
7b5702b681 MDL-19907 rewrote validation for required fields in forms, including support for editor field. Added parameter to use strict (no spaces) required fields validation 2011-07-29 13:51:26 +08:00
Sam Hemelryk
0704038e41 Merge branch 'w28_MDL-28345_m22_utf8' of git://github.com/skodak/moodle 2011-07-18 21:16:43 +10:00
Petr Skoda
78fcdb5fdb MDL-28345 make sure input parameters do not contain invalid utf-8 chars 2011-07-15 15:00:49 +02:00
Rajesh Taneja
3a70ccb8ac MDL-27837 enrol - Fixed checkboxes for multiple self enrolment 2011-07-14 09:55:13 +08:00
Sam Hemelryk
8196e3c08d Merge branch 'MDL-26557' of git://git.luns.net.uk/moodle 2011-03-21 17:32:06 +08:00
Petr Skoda
d2b322ae3c MDL-26825 do not return any form data if form cancelled 2011-03-17 20:43:35 +01:00
Andrew Robert Nicols
d8e7d1a085 formslib: MDL-26557 Use correct variable name and specify defaults in function declaration
Signed-off-by: Andrew Robert Nicols <andrew.nicols@luns.net.uk>
2011-03-16 10:50:07 +00:00
Petr Skoda
365a594107 MDL-24321 switching to stdClass in /lib/ 2010-09-21 08:07:44 +00:00
David Mudrak
8af229fe37 MDL-21382 mform: escape invalid characters when generating javascript validation function name
This patch fixes the support for addGroupRule in cases when the element
name contains invalid characters like square brackets (that is if the
group element is an array element).

Credit goes to Hubert Chathi for the solution and the patch provided.

Cherry-picked from MOODLE_19_STABLE
2010-09-17 22:44:53 +00:00
Sam Hemelryk
c7e3e61c70 javascript MDL-23850 Moved mforms specific JavaScript to a separate file 2010-08-19 05:43:06 +00:00
David Mudrak
cde9bee874 MDL-21695 Got rid of the last call of setHelpButton() 2010-08-16 14:32:43 +00:00
Sam Hemelryk
e5473854a0 form-dateselector MDL-23096 Converted the date selector to a YUI-Moodle module 2010-08-04 09:13:27 +00:00
David Mudrak
cd188086d3 MDL-23561 Fixed support for addHelpButton() in repeated elements 2010-07-29 07:54:30 +00:00
David Mudrak
c9a2cdf8a7 MDL-21695 lib/formslib.php modifications, dropping support for setHelpButtons() 2010-07-28 11:04:35 +00:00
Petr Skoda
78bfb562a0 MDL-21249 improved php docs and adding direct access prevention in core libs 2010-07-25 13:35:05 +00:00
Petr Skoda
f728d49b00 MDL-19380 uploadlib cleanup before readding of antivirus integration 2010-07-14 08:40:48 +00:00
Petr Skoda
edfd6a5e73 MDL-14589 user icons now stored in file storage pool 2010-07-11 11:43:15 +00:00
Petr Skoda
64f93798d4 MDL-22950 adding new component column to the files table, unfortunately this change requires changes in all 2.0dev code, please review all custom code that was already upgraded to 2.0; fixing multiple problems and regressions in mod/assignment 2010-07-03 13:37:13 +00:00
David Mudrak
6855dc3088 MDL-21695 Removing unused help files
tableexportformats.html removed as suggested by Helen.
2010-06-28 14:36:50 +00:00
Dongsheng Cai
d3d98a3a98 MDL-22455, file picker conversion for SCORM. 2010-06-10 09:58:45 +00:00
Dongsheng Cai
0022e2d7f0 MDL-22574, added MoodleQuickForm_filemanager support, and added dispose function to clean up files 2010-06-08 03:09:14 +00:00
Petr Skoda
4b7c96d9e6 MDL-22574 removing obsolete choose file elements that can not work any more, developers have to upgrade code 2010-06-05 09:58:30 +00:00
Petr Skoda
2836e77da3 comment typos 2010-05-22 19:10:44 +00:00
Dongsheng Cai
573e7e3396 revert some changes, my cvs client (smartcvs) goes wrong, commited all my local changes, MDL-8224 2010-05-20 06:35:41 +00:00
Dongsheng Cai
af140288c4 MDL-8224, minor changes to tweak ui 2010-05-20 06:26:40 +00:00