skodak
854386bc04
MDL-10382 Allow removing of elements with disabledIf conditions
2007-07-08 21:31:14 +00:00
jamiesensei
43914931f7
validation can return an empty array() or true to indicate no errors. array() is preferred since then parent class validation functions can be chained. Changing moodle_form validation method to return array() so that chaining works in question types. Shouldn't affect other forms code.
2007-07-06 04:03:51 +00:00
toyomoyo
f4bee9e580
added a method that returns the submitted data without validation MDL-10181, please let me know if this is not needed, thanks
2007-07-04 02:32:08 +00:00
stronk7
6f05b1e149
Registering the choosecoursefileorimsrepo form element to
...
show the "Browse Repository" button
for IMS-CP resources type. (MDL-10036)
Merged from MOODLE_18_STABLE
2007-07-02 16:51:50 +00:00
jamiesensei
3673f6bc3b
added more phpdoc comments for hardFreezeAllVisibleExcept
2007-05-28 00:50:11 +00:00
jamiesensei
56015454dd
new method hardFreezeAllVisibleExcept
2007-05-28 00:46:11 +00:00
jamiesensei
64360ee7b5
made hardFreeze work properly for a whole form. New paramater in moodleform constructor 'editable' defaults to true. If true then display form as normal. If false then hardFreeze whole form. Now displays form without an submit buttons. If form is hard frozen no data is ever passed to get_data.
2007-05-27 05:01:51 +00:00
jamiesensei
9ae3af87ae
MDL-9856 allow passing moodle_url to moodle_form constructor as action instead of passing url as a string
2007-05-21 16:11:17 +00:00
jamiesensei
f161729e21
new element for formslib selectgroups is a select drop down with options grouped into optgroups
2007-05-20 11:48:02 +00:00
poltawski
a044c05ddb
MDL-9742 - changed tabs to spaces in a few places where there are one
...
or two
2007-05-08 15:07:25 +00:00
skodak
54bb33eb10
MDL-9652 rename new password reveal to unmask
2007-04-30 18:03:19 +00:00
tjhunt
7c77033fb6
MDL-9524 - Formslib gets confused if a required field is frozen. Merged from MOODLE_18_STABLE.
2007-04-23 16:19:25 +00:00
skodak
239ade458c
MDL-9239 New fromslib password element with reveal option; merged from MOODLE_18_STABLE
2007-04-06 14:18:02 +00:00
nfreear
5bff085524
Follow up fix for bug MDL-8695 "Form 'required' icon is hidden".
2007-03-30 10:52:45 +00:00
nfreear
653f890d22
Fixes bug MDL-8695 "Form 'required' icon is hidden", see commit 13 Jan (big woops, forgot to commit on 1/3).
2007-03-30 10:15:18 +00:00
moodler
8dec2253cf
Merged autofocus fixes for formslib to dev from stable
2007-03-16 01:46:17 +00:00
nicolasconnault
2ef7c374a4
MDL-8737 - Added a focus() to the generated validation JS, so that if an element fails client-side validation, the focus jumps straight to it when the submit button is clicked. This doesn't yet work with HTMLArea elements.
2007-03-12 06:43:24 +00:00
jamiesensei
bc9ec4a604
more clean fix to safari issue with fieldsets
2007-01-30 18:44:23 +00:00
jamiesensei
f60feba579
fix for bug in Safari displaying fieldsets when the last element is textarea in which case textarea tended to overlap fieldset boundary.
2007-01-30 16:55:18 +00:00
skodak
dcf6d93c9c
MDL-8323 Add proper setup of course $CFG variables, fix use of global $COURSE
...
new function course_setup() thats does proper $CFG-> , locale and themes setup much sooner than print_header() originally (needed for MDL-8067), cleanup of forgotten global $course issues
MDL-8067 Fixed several $HTTPSREQUIRED issues - html editor now loads from https (the old hack did not wotk with IE7, new hack is uglier but works), fixed formlibs images (we can not set them in library global scope, we must wait for httpsrequired() and require_login() and od that in function), fixed links in meta.php, fixed help images
fixed setting of new $USER values in user edit forms
2007-01-27 19:56:08 +00:00
skodak
4af06ddad0
MDL-8281 hardFreeze now removes previously defined required status and all rules
2007-01-25 17:59:46 +00:00
jamiesensei
3a298174e8
important security fix previous use of ['type'] in repeatedeloptions array would not have worked.
2007-01-21 10:32:42 +00:00
jamiesensei
988d1202e3
fixed focus method which was tring to focus on hidden fields.
2007-01-21 09:23:19 +00:00
jamiesensei
7b41a4a989
some more small changes to datasetdependent and calculated question type forms
2007-01-18 11:21:10 +00:00
moodler
6ba2c73d04
More fixes for the help on required fields
2007-01-13 04:54:44 +00:00
moodler
49c7f3a850
Tidying up form appearance
...
1) Changed required/advanced images to something language neutral (asterisks)
2) Moved them to pixpath so people can override them easily
3) Hide the images completely using CSS (keep them only for accessibility)
so that all the labels have a consistent alignment.
4) Use CSS to color the labels instead.
2007-01-13 04:24:15 +00:00
skodak
beac4717de
MDL-8166 rename in/out methods in formslib - HQ consensus
2007-01-12 18:52:09 +00:00
skodak
dd07bbac59
MDL-8157 improved hadling of conditions in disabledIf formslib method
2007-01-12 09:38:02 +00:00
jamiesensei
98af2d1dc3
small fix in hardFreeze
2007-01-12 08:36:24 +00:00
jamiesensei
acc9c3e037
added hardFreeze method and used it in edit_form.php it ensures frozen elements have persistantFreeze property set to false.
2007-01-12 06:19:39 +00:00
jamiesensei
0ffb4cc703
special handling of frozen fields - frozen elements pass the default value (set by set_defaults or setDefault) and ignore submitted data in data_submitted()
2007-01-12 04:36:02 +00:00
jamiesensei
78354cec8c
fixed xhtml problem in repeared header elements which had [] in id.
2007-01-10 06:17:45 +00:00
jamiesensei
10a3103164
fix for MDL-8117 - div nested in span for grouped elements in formslib - changed spans to div
2007-01-10 05:26:22 +00:00
jamiesensei
9aa022feef
xhtml validity fix for static element type
...
qtype calculated form - started
2007-01-10 05:05:26 +00:00
jamiesensei
86aab05ced
fix for xhtml probs MDL-8102 and MDL-7979 - invalid id attributes.
...
and stopped using label tag for a group of elements where the label refers to the group of elements and not an individual one.
2007-01-08 15:53:17 +00:00
skodak
18f3ad8372
xhtml fix - now only 'for=' with wrong id is removed from labels - static and grouped elemenst (date selector), because the missing label might cause problems with CSS styling
2007-01-08 08:00:46 +00:00
jamiesensei
111be766b6
changed implementation of advcheckbox so as to keep PEAR code seperate to Moodle code.
2007-01-07 16:41:06 +00:00
jamiesensei
271ffe3f25
various formslib work including bug fixes for MDL-8039 id attribute collision between forms and page ids. Also added editor helpbutton. This is a fix for MDL-6941 need the ability to associate several helptopics with htmleditor. Also started on converting forms for question types to formslib.
2007-01-07 12:46:47 +00:00
skodak
d36462eb00
MDL-7861 xhtml strict fixes - do not add label for static element in formslib, fixed wrong regex in previous commit
2007-01-06 21:22:02 +00:00
skodak
217d03a14c
MDL-7861 xhtml strict fixes - do not add label for static element in formslib
2007-01-06 20:45:17 +00:00
skodak
72f46d119b
MDL-8039 formslib Form id collission with body id when editing course, user details, etc.
2007-01-06 20:31:06 +00:00
tjhunt
9e93222df2
questioncategory formslib.php form control.
2007-01-05 16:46:28 +00:00
jamiesensei
b07b6c8134
added 'required' class to outermost div of form elements
2007-01-05 06:47:35 +00:00
moodler
f4ba7e1a54
Bend over for XHTML 1.0 Strict ... MDL-8049
...
Removed Javascript language attribute tags and added CDATA
2007-01-03 14:44:17 +00:00
skodak
feaf5d06db
MDL-8015 improved file uploading
...
- changed file upload api in formslib
- fixed blog attachments and related code in file.php
- fixed glossary attachments
- fixed embedded images in forum posts and blogs - only gif, png and jpeg; the problme was that svg were embedded using img tag which was wrong, the same applied to other picture formats unsupported by browsers (please note that student submitted svg should be never embedded in moodle page for security reasons)
- other minor fixes
2006-12-28 21:21:44 +00:00
jamiesensei
1d284fbd85
fixing all the form names as per new class naming convention (PHP class names are also used for html id for styling)
2006-12-28 15:43:47 +00:00
jamiesensei
f07b9627b6
changes to how we generate the id attribute of forms and the naming convention of forms
...
migrate blog edit to formslib
2006-12-28 09:32:45 +00:00
moodler
5e87b920e3
Added CDATA to Javascript
2006-12-22 04:52:13 +00:00
jamiesensei
da43c002ff
fix for MDL-7937 'Fatal error: Call to a member function on a non-object in /var/www/dev/lib/pear/HTML/QuickForm.php on line 602 error'
2006-12-19 11:18:06 +00:00
jamiesensei
a23f0aaf95
* Added setAdvanced functionality see http://docs.moodle.org/en/Development:lib/formslib.php_setAdvanced
...
* Added MoodleQuickForm method closeHeaderBefore($elementName); http://docs.moodle.org/en/Development:lib/formslib.php_Form_Definition#Use_Fieldsets_to_group_Form_Elements
* Added moodleform method add_action_buttons(); see http://docs.moodle.org/en/Development:lib/formslib.php_Form_Definition#add_action_buttons.28.24cancel_.3D_true.2C_.24revert_.3D_true.2C_.24submitlabel.3Dnull.29.3B
* is_cancelled method added to moodleform http://docs.moodle.org/en/Development:lib/formslib.php_Usage#Basic_Usage_in_A_Normal_Page
* added hidden labels to elements within groups such as the date_selector select boxes and other elements in 'groups'
* quiz/mod.html migrated to formslib
* glossary/edit.html migrated to formslib
* extended registerNoSubmitButton() functionality to automatically add js to onclick to bypass client side js input validation.
* added no_submit_button_pressed() function that can be used in a similar way to is_cancelled() as a test in the main script to see if some button in the page has been pressed that is a submit button that is used for some dynamic functionality within the form and not to submit the data for the whole form.
* added new condition for disabledIf which allows to disable another form element if no options are selected from within a select element.
* added default 'action' for moodleform - strip_querystring(qualified_me()) http://docs.moodle.org/en/Development:lib/formslib.php_Usage#Basic_Usage_in_A_Normal_Page
2006-12-19 07:03:08 +00:00