Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-85206

Static mform elements are misaligned

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.5.4
    • Forms Library
    • None
    • MOODLE_405_STABLE

      Static elements in mforms look ugly due to vertical misalignment. My wild guess would be that is because developers tried to align text editing boxes with element labels by adding top padding, but then fixed the consequences in some elements only by adding pt-0 to checkboxes and radios and forgot about static elements.

      My workaround is to modify lib/form/templates/element-template.mustache:

      <div class="col-md-3 col-form-label d-flex pb-0 pe-md-0 {{#element.staticlabel}}pt-0{{/element.staticlabel}}">

      The other option would be to add padding above the static text.

      .mform .fitem .felement[data-fieldtype=static] {
          padding-top: 0.5rem;
      }

      Not sure what is the correct way to fix this because I do not understand the current logic behind mforms templates...

            Unassigned Unassigned
            skodak Petr Skoda
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.