-
Improvement
-
Resolution: Won't Do
-
Minor
-
None
-
2.1
-
MOODLE_21_STABLE
Moodle mform can display about 7 kind of items.
They are:
1. radio buttons
2. edit fields
3. checkboxes
4. select
5. fileupload
6. multiselect
7. textarea
For almost all of them it is possible to provide a custom style passing it as last parameter to the corresponding mform method.
There are only 2 exceptions and half.
I do not know how to give a style to a multiselect and textarea
and furthermore
for 'date_selector' once it is written
$mform->addElement('date_selector', $fieldname, $label, $options, $class);
the css class style is applied, correctly, to all three elements of the
'date_selector' so if the style is just a margin-left: 1em; the 'date_selector' is correctly moved on the right BUT 'date_selector' elements are ALSO separated by 1em.
As fas as I can see the class mform should be modified in order to allow the developer to apply a style to each single element or to the whole 'date_selector'.
I am thinking to the last parameters of the addElement() as an associative array like array('[day]'=>'padding-left:1em;', '[month]'=>'color:red;', '[year]'=>'text-decoration:underline;')
To provide a style to a whole group of elements it should be found a way to apply it to the outer <fieldset class="felement fgroup">