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

Fix alignment for required field (red *) on creating new wiki page

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.5.1
    • Component/s: Wiki (2.x)
    • Labels:
      None
    • Testing Instructions:
      Hide

      This needs to be tested with mobile device or smaller screen dimension (less than 768px width)

      1. Create wiki activity
      2. On new page, make sure the required icon is display inline with the radio button
      3. Test the alignment for other pages (eg: view or edit) are not affected by the changes.
      Show
      This needs to be tested with mobile device or smaller screen dimension (less than 768px width) Create wiki activity On new page, make sure the required icon is display inline with the radio button Test the alignment for other pages (eg: view or edit) are not affected by the changes.
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Sprint:
      FRONTEND Sprint 1
    • Story Points (Obsolete):
      3
    • Sprint:
      FRONTEND Sprint 1

      Description

      On mobile device, the "required field" indication is displayed above the input options.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              phalacee Jason Fowler added a comment -

              Looks great Rossi, submitting for integration now.

              Show
              phalacee Jason Fowler added a comment - Looks great Rossi, submitting for integration now.
              Hide
              poltawski Dan Poltawski 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
              poltawski Dan Poltawski 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
              samhemelryk Sam Hemelryk added a comment -

              Thanks Rosie, this has been integrated.

              Show
              samhemelryk Sam Hemelryk added a comment - Thanks Rosie, this has been integrated.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              The asterisks perhaps would need some spacing from the radio buttons, but that's another detail. After the patch they are aligned, no matter the BS width.

              Offtopic: It take me some time to realize this was a BS/Clean issue, lol. Next time, please, specify it. I was not able to reproduce it here until I looked to the patch.

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - The asterisks perhaps would need some spacing from the radio buttons, but that's another detail. After the patch they are aligned, no matter the BS width. Offtopic: It take me some time to realize this was a BS/Clean issue, lol. Next time, please, specify it. I was not able to reproduce it here until I looked to the patch.
              Hide
              rwijaya Rossiani Wijaya added a comment -

              Thank Eloy for testing it.

              I will make sure to indicate the theme needed to test for next issue.

              Show
              rwijaya Rossiani Wijaya added a comment - Thank Eloy for testing it. I will make sure to indicate the theme needed to test for next issue.
              Hide
              bawjaws David Scotson added a comment -

              Is there a bug for the underlying issue? Currently this appears to be a hack where 3 required form items are created that just happen to all be radio buttons with the same id so that they act like one control. The real fix would have the required star after "Format" and then three radio buttons.

              Actually, I've just looked again at the screenshot. This current fix is breaking the layout of the "new page title" label, which is supposed to be on top of the text entry box. So the workaround needs to be targetted just at the radio buttons.

              Show
              bawjaws David Scotson added a comment - Is there a bug for the underlying issue? Currently this appears to be a hack where 3 required form items are created that just happen to all be radio buttons with the same id so that they act like one control. The real fix would have the required star after "Format" and then three radio buttons. Actually, I've just looked again at the screenshot. This current fix is breaking the layout of the "new page title" label, which is supposed to be on top of the text entry box. So the workaround needs to be targetted just at the radio buttons.
              Hide
              bawjaws David Scotson added a comment -

              This seems to be the correct way to do it:

              http://docs.moodle.org/dev/lib/formslib.php_Form_Definition#radio

              Also, I've just realised that if you set a default in a radio button, then you don't need to make it required. It's not actually possible to unselect an option once it's been selected.

              Show
              bawjaws David Scotson added a comment - This seems to be the correct way to do it: http://docs.moodle.org/dev/lib/formslib.php_Form_Definition#radio Also, I've just realised that if you set a default in a radio button, then you don't need to make it required. It's not actually possible to unselect an option once it's been selected.
              Hide
              bawjaws David Scotson added a comment -

              The relevant file is mod/wiki/create_form.php lines 51-61.

              I'm sure I'd seen a similar misuse of radio buttons in a Quiz form but maybe I'm getting it mixed up with this.

              A grep through the source suggests that no-one does it the right way, but mostly it's not as visually obvious because they (following the Moodle HIG: http://docs.moodle.org/dev/Radio_button) don't make the radio buttons a required field.

              Show
              bawjaws David Scotson added a comment - The relevant file is mod/wiki/create_form.php lines 51-61. I'm sure I'd seen a similar misuse of radio buttons in a Quiz form but maybe I'm getting it mixed up with this. A grep through the source suggests that no-one does it the right way, but mostly it's not as visually obvious because they (following the Moodle HIG: http://docs.moodle.org/dev/Radio_button ) don't make the radio buttons a required field.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Thanks for giving me joys and smiles
              Thanks for sharing my trouble's pile

              Thanks for wipeing the tears of my eye
              Thanks for showing me the glad view of sky

              Thanks for lending me your shoulders to lean
              Thanks for giving my words a proper mean

              Thanks for telling me the value of life
              Thanks for showing me the rules to survive

              Thanks for lending me the sympathetic ears
              Thanks for showing how much you care

              From all this what I mean in the end
              Is thanks for being my special friend.

              – Seema Chowdhury

              Sent upstream so... closing, thanks!

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Thanks for giving me joys and smiles Thanks for sharing my trouble's pile Thanks for wipeing the tears of my eye Thanks for showing me the glad view of sky Thanks for lending me your shoulders to lean Thanks for giving my words a proper mean Thanks for telling me the value of life Thanks for showing me the rules to survive Thanks for lending me the sympathetic ears Thanks for showing how much you care From all this what I mean in the end Is thanks for being my special friend. – Seema Chowdhury Sent upstream so... closing, thanks!
              Hide
              bawjaws David Scotson added a comment -

              Since I was too late to catch this before it got integrated I opened two more bugs:

              MDL-40377 to fix the underlying problem

              MDL-40378 to revert this change

              Show
              bawjaws David Scotson added a comment - Since I was too late to catch this before it got integrated I opened two more bugs: MDL-40377 to fix the underlying problem MDL-40378 to revert this change
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Oh, thanks David Scotson ! (didn't read these on time)

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Oh, thanks David Scotson ! (didn't read these on time)

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    8/Jul/13