2 * Moodle forms HTML isn't changeable via renderers (yet?) so this
3 * .less file imports styles from the bootstrap @variables file and
4 * adds them to the existing Moodle form CSS ids and classes.
11 .mform fieldset .advancedbutton {
14 .jsenabled .mform .containsadvancedelements .advanced {
17 .mform .containsadvancedelements .advanced.show {
20 .mform fieldset.group {
23 .mform fieldset.error {
24 border: 1px solid @errorText;
27 #adminsettings span.error {
28 display: inline-block;
29 border: 1px solid @errorBorder;
31 background-color: @errorBackground;
35 .mform fieldset.collapsible legend a.fheader {
36 padding: 0 5px 0 20px;
38 background: url([[pix:t/expanded]]) 2px center no-repeat;
40 .dir-rtl .mform fieldset.collapsible legend a.fheader {
41 padding: 0 20px 0 5px;
44 background-position: right center;
46 .mform fieldset.collapsed legend a.fheader {
47 background-image: url([[pix:t/collapsed]]);
49 .dir-rtl .mform fieldset.collapsed legend a.fheader {
50 background-image: url([[pix:t/collapsed_rtl]]);
52 .jsenabled .mform .collapsed .fcontainer {
56 .mform .fitem .fitemtitle div {
59 #adminsettings .error,
64 .mform .fdescription.required {
65 margin-left: @horizontalComponentOffset;
67 .mform .fpassword .unmask {
68 display: inline-block;
74 display: inline-block;
78 display: inline-block;
84 .dir-rtl .mform .iconhelp {
87 .mform .ftextarea #id_alltext {
99 .mform .fcheckbox input {
102 .mform .fcheckbox > span,
103 .mform .fradio > span,
104 .mform .fgroup > span {
105 display: inline-block;
108 .mform .fitem fieldset.fgroup label,
109 .mform fieldset.fdate_selector label {
114 .mform .ftags label.accesshide {
118 .mform .ftags select {
119 margin-bottom: 0.7em;
122 .mform .helplink img {
126 .mform legend .helplink img {
129 .singleselect label {
132 .dir-rtl .singleselect label {
136 input#id_externalurl {
139 #portfolio-add-button {
143 // Copying in Bootstrap styles.
146 .form-horizontal .control-group;
148 // Theres's a mysterious extra 10px inside this item,
149 // so reduce margin by 10px from 20px standard to compensate.
151 .form-item .form-label,
152 .mform .fitem div.fitemtitle {
153 .form-horizontal .control-label
156 .form-item .form-label,
157 .mform .fitem div.fitemtitle {
163 .form-label .form-shortname {
166 .form-label .form-shortname {
167 font-size: @fontSizeMini;
170 .dir-rtl .form-label .form-shortname {
173 .form-item .form-setting,
174 .form-item .form-description,
175 .mform .fitem .felement,
176 #page-mod-forum-search .c1 {
177 .form-horizontal .controls
181 .formsettingheading {
182 .form-horizontal .help-block
184 // Moodle doesn't differentiate between what Bootstrap calls
185 // .uneditable-inputs and form help text. Styling them both as
186 // uneditable looks ugly, styling both as form help is fairly
187 // subtle in it's impact. Going for the latter as the best option.
188 .form-item .form-description,
193 .form-item .form-description {
196 .fitem .fstaticlabel {
200 // Pale grey container for submit buttons.
201 table#form td.submit,
203 .path-admin .buttons,
204 #fitem_id_submitbutton,
205 .fp-content-center form + div,
206 div.backup-section + form,
207 #fgroup_id_buttonar {
211 .path-admin .buttons,
212 .form-buttons { // Add back the padding it would usually get from being inside a .form-horizontal.
213 padding-left: @horizontalComponentOffset;
216 table#form td.submit,
218 .path-admin .buttons,
219 #fitem_id_submitbutton,
220 .fp-content-center form + div,
221 div.backup-section + form,
222 #fgroup_id_buttonar {
226 .path-admin .buttons,
227 .form-buttons { // Add back the padding it would usually get from being inside a .form-horizontal.
228 padding-right: @horizontalComponentOffset;
231 .form-item .form-setting .form-checkbox.defaultsnext {
232 // Need to specify .defaultsnext and the .form-checkbox class
233 // is somewhat randomly re-used on various actual checkboxes
234 // throughout the admin forms, instead of on the wrapper div.
235 margin-top: 5px; // Push down checkboxes to align.
236 display: inline-block; // So above style sticks.
240 // Copied from bootstrap/forms.less tag legend.
244 margin-bottom: @baseLineHeight;
245 font-size: @baseFontSize * 1.5;
246 line-height: @baseLineHeight * 2;
249 border-bottom: 1px solid #e5e5e5;
252 .mform legend a:hover {
254 text-decoration: none;
256 .dir-rtl .mform .fitem .felement {
261 // I think this could be avoided (or at least tidied up) ifr
262 // we used HTML5 input types like url, phone, email, number etc.
263 .dir-rtl .mform .fitem .felement input[name=email],
264 .dir-rtl .mform .fitem .felement input[name=email2],
265 .dir-rtl .mform .fitem .felement input[name=url],
266 .dir-rtl .mform .fitem .felement input[name=idnumber],
267 .dir-rtl .mform .fitem .felement input[name=phone1],
268 .dir-rtl .mform .fitem .felement input[name=phone2] {
272 .dir-rtl #id_s__pathtodu,
273 .dir-rtl #id_s__aspellpath,
274 .dir-rtl #id_s__pathtodot,
275 .dir-rtl #id_s__supportemail,
276 .dir-rtl #id_s__supportpage,
277 .dir-rtl #id_s__sessioncookie,
278 .dir-rtl #id_s__sessioncookiepath,
279 .dir-rtl #id_s__sessioncookiedomain,
280 .dir-rtl #id_s__proxyhost,
281 .dir-rtl #id_s__proxyuser,
282 .dir-rtl #id_s__proxypassword,
283 .dir-rtl #id_s__proxybypass,
284 .dir-rtl #id_s__jabberhost,
285 .dir-rtl #id_s__jabberserver,
286 .dir-rtl #id_s__jabberusername,
287 .dir-rtl #id_s__jabberpassword,
288 .dir-rtl #id_s__additionalhtmlhead,
289 .dir-rtl #id_s__additionalhtmltopofbody,
290 .dir-rtl #id_s__additionalhtmlfooter,
291 .dir-rtl #id_s__docroot,
292 .dir-rtl #id_s__filter_tex_latexpreamble,
293 .dir-rtl #id_s__filter_tex_latexbackground,
294 .dir-rtl #id_s__filter_tex_pathlatex,
295 .dir-rtl #id_s__filter_tex_pathdvips,
296 .dir-rtl #id_s__filter_tex_pathconvert,
297 .dir-rtl #id_s__blockedip,
298 .dir-rtl #id_s__pathtoclam,
299 .dir-rtl #id_s__quarantinedir,
300 .dir-rtl #id_s__sitepolicy,
301 .dir-rtl #id_s__sitepolicyguest,
302 .dir-rtl #id_s__cronremotepassword,
303 .dir-rtl #id_s__allowedip,
304 .dir-rtl #id_s__blockedip,
305 .dir-rtl #id_s_enrol_meta_nosyncroleids,
306 .dir-rtl #id_s_enrol_ldap_host_url,
307 .dir-rtl #id_s_enrol_ldap_ldapencoding,
308 .dir-rtl #id_s_enrol_ldap_bind_dn,
309 .dir-rtl #id_s_enrol_ldap_bind_pw,
310 .dir-rtl #admin-emoticons .form-text,
311 .dir-rtl #admin-role_mapping input[type=text],
312 .dir-rtl #id_s_enrol_paypal_paypalbusiness,
313 .dir-rtl #id_s_enrol_flatfile_location,
314 #page-admin-setting-enrolsettingsflatfile.dir-rtl input[type=text],
315 #page-admin-setting-enrolsettingsdatabase.dir-rtl input[type=text],
316 #page-admin-auth-db.dir-rtl input[type=text] {
319 #page-admin-setting-enrolsettingsflatfile.dir-rtl .informationbox {
323 #page-admin-grade-edit-scale-edit.dir-rtl .error input#id_name {
326 #page-grade-edit-outcome-course .courseoutcomes {
331 #page-grade-edit-outcome-course .courseoutcomes td {
334 /* Install Process' text fields Forms, should always be justified to the left */
335 #installform #id_wwwroot,
336 #installform #id_dirroot,
337 #installform #id_dataroot,
338 #installform #id_dbhost,
339 #installform #id_dbname,
340 #installform #id_dbuser,
341 #installform #id_dbpass,
342 #installform #id_prefix {
347 // Workaround for repository pop-up because the : are outside the label,
348 // can/should be fixed in filemanager renderers.
349 display: inline-block;
352 // Checkbox labels. Bootstrap puts the associated checkbox inside the label.
353 // Moodle puts it beside the label, so we need to make it inline-block
354 // to keep it on the same horizontal level.
355 input[type="radio"] + label,
356 input[type="checkbox"] + label {
361 input[type="checkbox"] {
362 margin-top: -4px; // Dodgy hack, must be better way.
367 input[type="checkbox"] {
373 display: inline-block;
379 .form-item .form-label label {
382 .dir-rtl .form-item .form-label label {
385 .felement.ffilepicker {
388 div#dateselector-calendar-panel {
389 z-index: 3100; /* Set higher than the z-index of the filemanager - see MDL-39047. */
392 fieldset.coursesearchbox label {
397 * Show the labels above text editors and file managers except on wide screens.
399 #region-main .mform:not(.unresponsive) .fitem .fitemtitle label {
402 .makeFormsVertical() {
403 #region-main .mform:not(.unresponsive) {
431 display: inline-block;
436 display: inline-block;
445 display: inline-block;
453 &.dir-rtl #region-main .mform:not(.unresponsive) {
454 .femptylabel .fitemtitle {
469 .fitem_fcheckbox .felement {
476 * Make forms vertical when the screen is less than 1200px;
478 @media (max-width: 1199px) {
485 * Make forms vertical when the screen is less than 1474px AND both side-pre and side-post contain blocks.
486 * This is an extra special media rule.
487 * It causes forms to show vertically when the screen size is calculated as:
488 * 1199px + (1199px * 23%)
489 * Where 23% is the width of span3
490 * Full calculation is:
491 * @maxWidthForVerticalForms: 1199px * (unit(((@fluidGridColumnWidth1200 * 3) + (@fluidGridGutterWidth * (3 - 1)))) / 100) + 1199px;
493 @maxWidthForVerticalForms: 1474px;
494 @media (max-width: @maxWidthForVerticalForms) {
495 .used-region-side-pre.used-region-side-post {
500 /* Section and module editing forms contain special JS components for the
501 availability system (if enabled). */
502 #fitem_id_availabilityconditionsjson {
503 *[aria-hidden=true] {
514 .availability-group {
524 .availability-plugincontrols {
525 padding: 2px 0px 0px 4px;
526 background: none repeat scroll 0% 0% @wellBackground;
527 border: 1px solid @grayLighter;
529 display: inline-block;
532 /* Eye icon in front of an item and delete icon after it. */
534 .availability-delete {
537 /* Hidden eye icon still takes up space. */
538 .availability-eye[aria-hidden=true] {
542 /* Eye icons in front of child lists are aligned specially. */
543 .availability-list > .availability-eye img {
547 /* Add button lines up with child elements. */
548 .availability-button {
551 /* Nested section is grey. */
552 .availability-childlist > .availability-inner {
553 display: inline-block;
554 background: @wellBackground;
555 border: 1px solid @grayLighter;
560 /* Second (and more) levels of nested sections are white. */
561 .availability-childlist .availability-childlist > .availability-inner {
564 /* Connecting text needs to be indented. */
565 .availability-connector {
570 .dir-rtl #fitem_id_availabilityconditionsjson {
571 .availability-group {
579 .availability-plugincontrols {
586 .availability-delete {
590 .availability-button {
594 .availability-connector {
600 /* Default form styling colours all text red. With availability conditions
601 this looks excessive as we show 'Invalid' markers in specific places. */
602 .mform .error .availability-field {
606 /* This dialogue is used to add an availability condition. */
607 .availability-dialogue {
608 .moodle-dialogue .moodle-dialogue-bd {
619 list-style-type: none;
622 border-bottom: 1px solid @grayLighter;
636 .availability-buttons button {
642 .dir-rtl .availability-dialogue {
654 /* Revert to the non-fixed width where a textarea has the number of columns
655 specified, or an input has it's size specified. */