Moodle
  1. Moodle
  2. MDL-34984

.form-shortname shouldn't be inside the form label in adminsettings

    Details

    • Testing Instructions:
      Hide
      1. As admin, go to 'debugging' setting (site admin > developmen > debugging)
      2. use firebug to view the source for 'debug messages' and 'debug' for the selection options.

      It should be displayed as :

      <div class="form-label">
          <label for="id_s__debug">Debug messages</label>
          <span class="form-shortname">debug</span>
      </div>
      
      Show
      As admin, go to 'debugging' setting (site admin > developmen > debugging) use firebug to view the source for 'debug messages' and 'debug' for the selection options. It should be displayed as : <div class= "form-label" > <label for = "id_s__debug" >Debug messages</label> <span class= "form-shortname" >debug</span> </div>
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      43570

      Description

      In adminsettings forms the div.form-label contains both the <label> and a span.form-shortname. The span is not actually part of the label text and so should be placed outside of the label tag e.g current:

      <div class="form-item clearfix" id="admin-debug">
        <div class="form-label">
          <label for="id_s__debug">Debug messages<span class="form-shortname">debug</span></label>
        </div>
      

      should be

      <div class="form-item clearfix" id="admin-debug">
        <div class="form-label">
          <label for="id_s__debug">Debug messages</label>
          <span class="form-shortname">debug</span>
        </div>
      

      Otherwise the browser will run both bits of text together to generate a label similar to "Debug messagesdebug" or " Display debug messagesdebugdisplay".

        Activity

        Hide
        Michael de Raadt added a comment -

        Thanks for spotting that and suggesting how it can be resolved.

        Show
        Michael de Raadt added a comment - Thanks for spotting that and suggesting how it can be resolved.
        Hide
        Ankit Agarwal added a comment -

        Looks good Rosie.
        +1 for integration
        Thanks

        Show
        Ankit Agarwal added a comment - Looks good Rosie. +1 for integration Thanks
        Hide
        Rossiani Wijaya added a comment -

        Thanks Ankit.

        Submitting for integration review.

        Show
        Rossiani Wijaya added a comment - Thanks Ankit. Submitting for integration review.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

        TIA and ciao

        Show
        Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Integrated (22, 23 & master), thanks!

        Show
        Eloy Lafuente (stronk7) added a comment - Integrated (22, 23 & master), thanks!
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Hi Rossiani,

        I'm passing this as far as now the setting name is out from the label, as expected.

        But, for your consideration, I noticed that both the overriden (when something is defined @ config.php) and the errors (when one setting has an incorrect value)... continue being part of the label and, perhaps, they should not.

        So, should we also be performing this change?

        -    <label '.$labelfor.'>'.highlightfast($query, $title).$override.$warning.'</label>
        +    <label '.$labelfor.'>'.highlightfast($query, $title).'</label>'.$override.$warning.'
        

        Feel free to create a new issue for that if you think it should be applied. Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Hi Rossiani, I'm passing this as far as now the setting name is out from the label, as expected. But, for your consideration, I noticed that both the overriden (when something is defined @ config.php) and the errors (when one setting has an incorrect value)... continue being part of the label and, perhaps, they should not. So, should we also be performing this change? - <label '.$labelfor.'>'.highlightfast($query, $title).$override.$warning.'</label> + <label '.$labelfor.'>'.highlightfast($query, $title).'</label>'.$override.$warning.' Feel free to create a new issue for that if you think it should be applied. Ciao
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Gutta cavat lapidem, non vi sed saepe cadendo - Ovidio

        This issue has been integrated upstream and is now available both via git and cvs (and in some hours, via mirrors and downloads).

        Thanks!

        Show
        Eloy Lafuente (stronk7) added a comment - Gutta cavat lapidem, non vi sed saepe cadendo - Ovidio This issue has been integrated upstream and is now available both via git and cvs (and in some hours, via mirrors and downloads). Thanks!

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: