Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-27054

Radio buttons would be easier to click if associated text was part of a <label>

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • timestamper-plugin
    • Jenkins installed from Fedora 21 package.
      Jenkins version: 1.590
      Timestamper plugin: 1.5.15

      When viewing console log of a job, the timestamper plugin adds three timestamp options:

      • System clock time
      • Elapsed time
      • None

      The text is not clickable, only the radio buttons can be used to make a choice.

      It would be nice if the text was associated with the radio button.

      The HTML comes from timestamper-plugin/src/main/resources/hudson/plugins/timestamper/annotator/TimestampAnnotatorFactory/usersettings.jelly

      <form>
      <input type="radio" name="timestamps" id="timestamper-systemTime">${%System clock time}</input>
      <br/>
      <input type="radio" name="timestamps" id="timestamper-elapsedTime">${%Elapsed time}</input>
      <br/>
      <input type="radio" name="timestamps" id="timestamper-none">${%None}</input>
      </form>

      The <input> tag does not need a </input> tag. Embedding the <input> within a <label> will allow the text be associated with the radio button.

      Suggested code:

      <form>
      <label><input type="radio" name="timestamps" id="timestamper-systemTime">${%System clock time}</label>
      <br/>
      <label><input type="radio" name="timestamps" id="timestamper-elapsedTime">${%Elapsed time}</label>
      <br/>
      <label><input type="radio" name="timestamps" id="timestamper-none">${%None}</label>
      </form>

          [JENKINS-27054] Radio buttons would be easier to click if associated text was part of a <label>

          Code changed in jenkins
          User: Steven Brown
          Path:
          src/main/resources/hudson/plugins/timestamper/annotator/TimestampAnnotatorFactory/usersettings.jelly
          http://jenkins-ci.org/commit/timestamper-plugin/20ce1113d7a2e4f8e6e4ac0b6495a8d6e018778c
          Log:
          [FIXED JENKINS-27054] Wrap radio buttons in a label element

          This allows the options to be selected by clicking on the text.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Steven Brown Path: src/main/resources/hudson/plugins/timestamper/annotator/TimestampAnnotatorFactory/usersettings.jelly http://jenkins-ci.org/commit/timestamper-plugin/20ce1113d7a2e4f8e6e4ac0b6495a8d6e018778c Log: [FIXED JENKINS-27054] Wrap radio buttons in a label element This allows the options to be selected by clicking on the text.

          Thanks Paul, I've added the label tags. Nice usability improvement.

          If I remove the closing input tags from this file, Jenkins isn't able to parse it. Although the closing tags aren't present in the final generated HTML.

          Steven G Brown added a comment - Thanks Paul, I've added the label tags. Nice usability improvement. If I remove the closing input tags from this file, Jenkins isn't able to parse it. Although the closing tags aren't present in the final generated HTML.

          Included in 1.5.16 release.

          Steven G Brown added a comment - Included in 1.5.16 release.

          Paul Fee added a comment -

          I got the 1.5.16 update via the Manage Plugins page and confirmed that the enhancement worked as expected. Thanks!

          Paul Fee added a comment - I got the 1.5.16 update via the Manage Plugins page and confirmed that the enhancement worked as expected. Thanks!

            stevengbrown Steven G Brown
            pfee Paul Fee
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: