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 display: inline-block;
28 border: 1px solid @errorBorder;
30 background-color: @errorBackground;
34 .mform fieldset.collapsible legend a.fheader {
35 padding: 0 5px 0 20px;
37 background: url([[pix:t/expanded]]) 2px center no-repeat;
39 .dir-rtl .mform fieldset.collapsible legend a.fheader {
40 padding: 0 20px 0 5px;
43 background-position: right center;
45 .mform fieldset.collapsed legend a.fheader {
46 background-image: url([[pix:t/collapsed]]);
48 .dir-rtl .mform fieldset.collapsed legend a.fheader {
49 background-image: url([[pix:t/collapsed_rtl]]);
51 .jsenabled .mform .collapsed .fcontainer {
55 .mform .fitem .fitemtitle div {
62 .mform .fdescription.required {
63 margin-left: @horizontalComponentOffset;
65 .mform .fpassword .unmask {
66 display: inline-block;
72 display: inline-block;
76 display: inline-block;
82 .dir-rtl .mform .iconhelp {
85 .mform .ftextarea #id_alltext {
97 .mform .fcheckbox input {
101 .mform .fitem fieldset.fgroup label,
102 .mform fieldset.fdate_selector label {
107 .mform .ftags label.accesshide {
111 .mform .ftags select {
112 margin-bottom: 0.7em;
115 .mform .helplink img {
119 .mform legend .helplink img {
122 .singleselect label {
125 .dir-rtl .singleselect label {
129 input#id_externalurl {
132 #portfolio-add-button {
136 // Copying in Bootstrap styles.
139 .form-horizontal .control-group;
141 // Theres's a mysterious extra 10px inside this item,
142 // so reduce margin by 10px from 20px standard to compensate.
144 .form-item .form-label,
145 .mform .fitem div.fitemtitle {
146 .form-horizontal .control-label
149 .form-item .form-label,
150 .mform .fitem div.fitemtitle {
156 .form-label .form-shortname {
159 .form-label .form-shortname {
160 font-size: @fontSizeMini;
163 .dir-rtl .form-label .form-shortname {
166 .form-item .form-setting,
167 .form-item .form-description,
168 .mform .fitem .felement,
169 #page-mod-forum-search .c1 {
170 .form-horizontal .controls
174 .formsettingheading {
175 .form-horizontal .help-block
177 // Moodle doesn't differentiate between what Bootstrap calls
178 // .uneditable-inputs and form help text. Styling them both as
179 // uneditable looks ugly, styling both as form help is fairly
180 // subtle in it's impact. Going for the latter as the best option.
181 .form-item .form-description,
186 .form-item .form-description {
190 // Pale grey container for submit buttons.
191 table#form td.submit,
193 .path-admin .buttons,
194 #fitem_id_submitbutton,
195 .fp-content-center form + div,
196 div.backup-section + form,
197 #fgroup_id_buttonar {
201 .path-admin .buttons,
202 .form-buttons { // Add back the padding it would usually get from being inside a .form-horizontal.
203 padding-left: @horizontalComponentOffset;
206 table#form td.submit,
208 .path-admin .buttons,
209 #fitem_id_submitbutton,
210 .fp-content-center form + div,
211 div.backup-section + form,
212 #fgroup_id_buttonar {
216 .path-admin .buttons,
217 .form-buttons { // Add back the padding it would usually get from being inside a .form-horizontal.
218 padding-right: @horizontalComponentOffset;
221 .form-item .form-setting .form-checkbox.defaultsnext {
222 // Need to specify .defaultsnext and the .form-checkbox class
223 // is somewhat randomly re-used on various actual checkboxes
224 // throughout the admin forms, instead of on the wrapper div.
225 margin-top: 5px; // Push down checkboxes to align.
226 display: inline-block; // So above style sticks.
230 // Copied from bootstrap/forms.less tag legend.
234 margin-bottom: @baseLineHeight;
235 font-size: @baseFontSize * 1.5;
236 line-height: @baseLineHeight * 2;
239 border-bottom: 1px solid #e5e5e5;
242 .mform legend a:hover {
244 text-decoration: none;
246 .dir-rtl .mform .fitem .felement {
251 // I think this could be avoided (or at least tidied up) ifr
252 // we used HTML5 input types like url, phone, email, number etc.
253 .dir-rtl .mform .fitem .felement input[name=email],
254 .dir-rtl .mform .fitem .felement input[name=email2],
255 .dir-rtl .mform .fitem .felement input[name=url],
256 .dir-rtl .mform .fitem .felement input[name=idnumber],
257 .dir-rtl .mform .fitem .felement input[name=phone1],
258 .dir-rtl .mform .fitem .felement input[name=phone2] {
262 .dir-rtl #id_s__pathtodu,
263 .dir-rtl #id_s__aspellpath,
264 .dir-rtl #id_s__pathtodot,
265 .dir-rtl #id_s__supportemail,
266 .dir-rtl #id_s__supportpage,
267 .dir-rtl #id_s__sessioncookie,
268 .dir-rtl #id_s__sessioncookiepath,
269 .dir-rtl #id_s__sessioncookiedomain,
270 .dir-rtl #id_s__proxyhost,
271 .dir-rtl #id_s__proxyuser,
272 .dir-rtl #id_s__proxypassword,
273 .dir-rtl #id_s__proxybypass,
274 .dir-rtl #id_s__jabberhost,
275 .dir-rtl #id_s__jabberserver,
276 .dir-rtl #id_s__jabberusername,
277 .dir-rtl #id_s__jabberpassword,
278 .dir-rtl #id_s__additionalhtmlhead,
279 .dir-rtl #id_s__additionalhtmltopofbody,
280 .dir-rtl #id_s__additionalhtmlfooter,
281 .dir-rtl #id_s__docroot,
282 .dir-rtl #id_s__filter_tex_latexpreamble,
283 .dir-rtl #id_s__filter_tex_latexbackground,
284 .dir-rtl #id_s__filter_tex_pathlatex,
285 .dir-rtl #id_s__filter_tex_pathdvips,
286 .dir-rtl #id_s__filter_tex_pathconvert,
287 .dir-rtl #id_s__blockedip,
288 .dir-rtl #id_s__pathtoclam,
289 .dir-rtl #id_s__quarantinedir,
290 .dir-rtl #id_s__sitepolicy,
291 .dir-rtl #id_s__sitepolicyguest,
292 .dir-rtl #id_s__cronremotepassword,
293 .dir-rtl #id_s__allowedip,
294 .dir-rtl #id_s__blockedip,
295 .dir-rtl #id_s_enrol_meta_nosyncroleids,
296 .dir-rtl #id_s_enrol_ldap_host_url,
297 .dir-rtl #id_s_enrol_ldap_ldapencoding,
298 .dir-rtl #id_s_enrol_ldap_bind_dn,
299 .dir-rtl #id_s_enrol_ldap_bind_pw,
300 .dir-rtl #admin-emoticons .form-text,
301 .dir-rtl #admin-role_mapping input[type=text],
302 .dir-rtl #id_s_enrol_paypal_paypalbusiness,
303 .dir-rtl #id_s_enrol_flatfile_location,
304 #page-admin-setting-enrolsettingsflatfile.dir-rtl input[type=text],
305 #page-admin-setting-enrolsettingsdatabase.dir-rtl input[type=text],
306 #page-admin-auth-db.dir-rtl input[type=text] {
309 #page-admin-setting-enrolsettingsflatfile.dir-rtl .informationbox {
313 #page-admin-grade-edit-scale-edit.dir-rtl .error input#id_name {
316 #page-grade-edit-outcome-course .courseoutcomes {
321 #page-grade-edit-outcome-course .courseoutcomes td {
324 /* Install Process' text fields Forms, should always be justified to the left */
325 #installform #id_wwwroot,
326 #installform #id_dirroot,
327 #installform #id_dataroot,
328 #installform #id_dbhost,
329 #installform #id_dbname,
330 #installform #id_dbuser,
331 #installform #id_dbpass,
332 #installform #id_prefix {
337 // Workaround for repository pop-up because the : are outside the label,
338 // can/should be fixed in filemanager renderers.
339 display: inline-block;
342 // Checkbox labels. Bootstrap puts the associated checkbox inside the label.
343 // Moodle puts it beside the label, so we need to make it inline-block
344 // to keep it on the same horizontal level.
345 input[type="radio"] + label,
346 input[type="checkbox"] + label {
351 input[type="checkbox"] {
352 margin-top: -4px; // Dodgy hack, must be better way.
357 input[type="checkbox"] {
363 display: inline-block;
369 .form-item .form-label label {
372 .dir-rtl .form-item .form-label label {
375 .felement.ffilepicker {
378 div#dateselector-calendar-panel {
379 z-index: 3100; /* Set higher than the z-index of the filemanager - see MDL-39047. */
382 fieldset.coursesearchbox label {
387 * Show the labels above text editors and file managers except on wide screens.
389 #region-main .mform .fitem .fitemtitle label {
392 @media (max-width: 1199px) {
393 #region-main .mform .fitem .fitemtitle {
400 .dir-rtl #region-main .mform .fitem .fitemtitle {
404 #region-main .mform .fitem .felement {
411 .dir-rtl #region-main .mform .fitem .felement {
417 #region-main .mform .fitem_fcheckbox .fitemtitle,
418 #region-main .mform .fitem_fcheckbox .felement {
419 display: inline-block;
422 .dir-rtl #region-main .mform .fitem_fcheckbox .felement {
425 #region-main .mform .fitem_fcheckbox .felement {