Commit Graph

390 Commits

Author SHA1 Message Date
Dan Poltawski
5d84a61419 Merge branch 'MDL-54633-master-tinymce' of git://github.com/mudrd8mz/moodle 2016-05-19 13:00:34 +01:00
David Mudrák
929727e3ef MDL-54633 tinymce: Sync editors' iframe to textarea on form submit
The previous commit "Automatically sync editor with its textarea" was
found a not good solution as the onchange event is triggered way less
often than needed for our needs. So this reverts commit 34321d49.

Instead, we add a hack to the formslib so that when there are some
TinyMCE editors used at the page, we explicitly save them before
triggering the form validation. This simply calls save() on all editors
on the page - see the API reference:
http://archive.tinymce.com/wiki.php/API3:method.tinymce.triggerSave

Having TinyMCE hardcoded like this on this core level does not make me
happy. But it seems to be most effective solution for now (and
definitely more efficient than the previous solution). Plus there is a
precedence - we already use window.tinyMCE in formchangechecker.js YUI
module, for example.
2016-05-19 13:44:41 +02:00
Mark Nelson
40d5651302 MDL-53883 core_form: updated the group elements ID 2016-05-17 17:53:17 +08:00
Rajesh Taneja
45fb8b5983 MDL-53701 core_lib: use date_format_string for utf8
So when language is different say Hebrew then
it would pic codepage-1255. As  is json_encoded
we need to ensure we get utf8 string. so use
date_format_string instead
2016-05-05 16:34:41 +08:00
Marina Glancy
cf28c515f3 MDL-53638 forms: allow all elements to have css class 2016-04-27 13:27:12 +08:00
Damyon Wiese
6853cd5ed4 MDL-52954 assign: Fix the reasonable cibot warnings. 2016-03-30 14:07:28 +08:00
Damyon Wiese
bb690849c9 MDL-52954 assign: Rebuild the assignment single grade page. 2016-03-30 13:47:21 +08:00
Damyon Wiese
84a32f156e MDL-52954 forms: Allow form submission via ajax (ignoring GET and POST) 2016-03-30 11:48:40 +08:00
Eloy Lafuente (stronk7)
197f99a808 Merge branch 'MDL-52978_master' of git://github.com/markn86/moodle 2016-03-21 23:07:16 +01:00
Grigory Baleevskiy
53754839d2 MDL-52978 core_lib: fixed wrong days showing for dates in datepicker 2016-03-18 12:29:58 +08:00
John Okely
67cdf4efae MDL-52952 forms: Fix chrome autofilling passwords again
In MDL-45772 a hack was introduced to some forms to stop browsers from
putting the user's password into password fields in forms unrelated to
logging in.

Chrome now no longer fills the user's password in the first password
field in the page. There now needs to be a plain text input above it
for the username too.
2016-03-11 10:26:50 +08:00
Damyon Wiese
235ef57a3d MDL-51324 forms: Add a new course selector
This is a squashed commit containing a number of changes:

This is an ajax driven course selector that has searching etc. It can select single, or multiple courses.
Make course selector accept a list of courses to exclude
courseselector - lookup coursename on setValue
Use the get_course_display_name_in_list function to generate the course names
Add a throttle to auto-complete to reduce spamming the server
Do a single query to fetch all the courses in the mform element when validation fails
Fix core course search function to return results when there are less than 2 chars in the query.
Handle setData with an empty array in new course selector
2016-03-09 13:30:18 +08:00
Rajesh Taneja
2aacd415e1 MDL-50484 mod_lesson: Use group to add multiple radio inputs
https://docs.moodle.org/dev/lib/formslib.php_Form_Definition#radio
Radio input should be added in group and not individual, so
that each element created has unique id and template
2016-02-19 14:00:03 +08:00
David Monllao
3e51b0ad7e MDL-52826 forms: Using id attr
Switch from custom id references to the element's id attribute.

Extra fix to get rid of an unnecessary call to getValidationScript().
2016-01-29 10:15:25 +08:00
David Monllao
2edb12ec30 MDL-52826 forms: Move global functions to self-contained 2016-01-22 15:43:08 +08:00
Dan Poltawski
99436d38ff Merge branch 'MDL-52451-master' of git://github.com/marinaglancy/moodle 2015-12-14 10:46:29 +00:00
Marina Glancy
e6ee56a0e4 MDL-52451 forms: replace deprecated function 2015-12-14 12:43:03 +08:00
Marina Glancy
32fada5cb2 MDL-52081 forms: indicate usage of grandparent constructor 2015-12-10 13:38:04 +08:00
Marina Glancy
1a0df5535e MDL-52081 forms: Use __construct() for constructors 2015-12-10 13:38:01 +08:00
Andrew Nicols
690e23e69d Merge branch 'MDL-51651-master' of git://github.com/danpoltawski/moodle 2015-10-16 09:21:45 +08:00
Dan Poltawski
f655414669 MDL-51651 lang: add consitency for application of firstdayofweek
1) Set the site-wide default based on language pack
2) Use the site/user preference for js popups, like we do in /calendar/
2015-10-15 10:15:05 +01:00
Damyon Wiese
60a1ea56d9 MDL-51247 forms: All new aria-pimped autocomplete mform element.
Supports static list of options - or options fetched via ajax.
Has options for single,multi and tags support.
2015-10-14 16:22:44 +01:00
Jun Pataleta
36e0030ffe MDL-50852 formslib: Fixed client-side form validation problem.
This patch fixes the problem of client validation being broken when
shortforms is not enabled. This issue is caused by moodle-core-event
module not being loaded and the broadcast parameter in the
Y.Global.publish set to 2 instead of true.
2015-09-09 15:35:01 +08:00
Marina Glancy
a3c9174b3d MDL-50791 forms: make server validation errors accessible 2015-08-12 13:23:08 +08:00
John Okely
380001929a MDL-45772 admin: Stop browsers from autofilling passwords incorrectly 2015-08-04 09:54:34 +08:00
Martin Mastny
9cf1b21127 MDL-50186 forms: Removed special characters from id attribute 2015-05-28 11:41:51 +08:00
Martin Mastny
eaec9cfec7 MDL-49783 forms: Collapsed form section is opened on error 2015-05-07 08:57:30 +08:00
Tim Hunt
b3d388c234 MDL-49284 formslib: fix strict validation of HTML. 2015-02-25 17:39:36 +00:00
Brian Barnes
bbb0733297 MDL-45955 forms: replaced labels in static text elements 2014-12-10 17:28:09 +13:00
Paul Holden
68ef378b1b MDL-44657 forms: Form identifiers should only contain basic characters 2014-11-13 16:20:28 +08:00
Marina Glancy
bf8542ce3a MDL-30358 forms: strict validation is too strict 2014-10-15 11:57:01 +08:00
Damyon Wiese
63e604f8b1 Merge branch 'w08_MDL-42889_m27_vir' of https://github.com/skodak/moodle 2014-02-25 10:32:44 +08:00
Petr Škoda
114e3209b1 MDL-42889 cleanup obsolete clam relatd code
Since 2.0 all uploaded files need to go through the file picker which does the scanning,
the idea is that it is more important to warn users that their computer is crawling
with viruses. All teachers are supposed to have local up-to-date antivirus software!

Since 2.0 we are not scanning existing files on server, in future we might use the
status flag in files table to indicate the file is problematic, but still we should
never detele anthing from the filedir...
2014-02-18 09:22:30 +08:00
Andrew Nicols
d4e438718e MDL-43969 Forms: Adjust ARIA attributes for short forms
The aria-live="polite" attribute is incorrectly added to the fieldset,
causing the entire fieldset to be read out on change in some browsers. This
is unnecessary.
It also does not announce the current state of the fieldset (collaped or
open) and should.
2014-02-07 16:17:13 +08:00
Sam Hemelryk
12f46583f0 Merge branch 'MDL-43093' of git://github.com/timhunt/moodle 2013-12-04 10:12:12 +13:00
Sam Hemelryk
db9c8f4c7d Merge branch 'MDL-42919-master' of git://github.com/damyon/moodle 2013-12-04 09:43:43 +13:00
Tim Hunt
b2f1717143 MDL-43093 update repeat_elements PHPdoc. 2013-12-02 17:48:44 +00:00
Petr Škoda
a377754770 MDL-41819 try to work around max_input_vars restriction 2013-12-02 08:29:08 +08:00
Damyon Wiese
e6b1d132cb MDL-41919 Forms: Add a class to form elements with an empty label
This means they can be styled properly when the form is folded with
the labels above the form fields.
2013-11-26 13:28:51 +08:00
Davo Smith
d79d07175e MDL-35402 forms - prevent crash when multiple rules defined on an editor element 2013-10-15 14:30:33 +01:00
Paul Nicholls
59de735095 MDL-41451 - formslib: use create_function instead of inline function
As per MDL-39432, closure-style inline functions can result in fatal
errors when using eAccelerator and thus should be avoided.
2013-09-09 11:21:33 +12:00
Paul Nicholls
85b82a9c2f MDL-41451 - Large forms are truncated by max_input_vars
By parsing php://input in chunks, we can bypass max_input_vars for
forms which do not use the "multipart/form-data" enctype.  This can
be (and is) safely skipped if there are fewer than max_input_vars
fields submitted as part of $_POST.
2013-09-06 14:16:20 +12:00
Dan Poltawski
52ef7502d6 Merge branch 'MDL-30839-master' of git://github.com/phalacee/moodle 2013-08-22 11:17:49 +08:00
Jason Fowler
72d08bd153 MDL-30839 Accessibility - Focusing on error on submit 2013-08-22 10:54:19 +08:00
Dan Poltawski
695969987a Merge branch 'MDL-30839-master' of git://github.com/phalacee/moodle 2013-08-22 10:14:21 +08:00
Jason Fowler
5df7412899 MDL-30839 Fixing extra line breaks in error msg 2013-08-22 09:04:30 +08:00
Dan Poltawski
046514b7a2 Merge branch 'MDL-30839-master' of git://github.com/phalacee/moodle 2013-08-21 15:17:44 +08:00
Jason Fowler
f8a4f2c10e MDL-30839 Fixing extra line breaks in error msg 2013-08-21 14:58:50 +08:00
Dan Poltawski
6f44a73369 Merge branch 'w33_MDL-39474_m26_debugdeveloper' of https://github.com/skodak/moodle
Conflicts:
	lib/upgrade.txt
2013-08-20 11:42:03 +08:00
Jason Fowler
0c99005a9a MDL-30839 Accessibility, Forms - Improve accessibility or error messages 2013-08-19 09:54:41 +08:00