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

Add group name to rendered elements for better CSS control

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 1.8, 1.9
    • Forms Library
    • None
    • MOODLE_18_STABLE, MOODLE_19_STABLE

      If we add the group name to the rendered tags of the groups elements (<div> & <fieldset>), developers can have more control over the display through CSS.

      My suggestion is to change line 1399 in formslib.php as follows:

      'fieldset'=>"\n\t\t".'<div id="

      {name}div" class="fitem {advanced}<!-- BEGIN required -> required<!- END required ->"><div class="fitemtitle"><div class="fgrouplabel">{label}<!- BEGIN required ->{req} <!- END required -->{advancedimg}</div>{help}</div><fieldset id="{name}

      fs" class="felement

      {type}

      <!-- BEGIN error -> error<!- END error ->"><!- BEGIN error --><span class="error">

      {error}

      </span><br /><!-- END error -->

      {element}

      </fieldset></div>',

      This adds the "id" attribute to the containing div and fieldset tags, using the name of the group. Alternatively, the name could be used in the class list if the "id" in not desired.

            timhunt Tim Hunt
            mchurch Mike Churchward
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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