Moodle
  1. Moodle
  2. MDL-35581 META: tasks related to RTL theme fixes before 2.4 freeze (Week 39)
  3. MDL-35578

Left justify LTR Form input fields (email, idnumber, url, phone...), when in RTL mode

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.5, 2.3, 2.4
    • Fix Version/s: 2.3.3
    • Component/s: Themes
    • Labels:
    • Testing Instructions:
      Hide
      1. Install an Hebrew (RTL) language pack, and switch to Hebrew
      2. Navigate to "User's setting profile page" to view the issue (as described in the attached first 2 screen captures)
      3. Apply the patch
      4. Reload the page and verify the issue is solved - All above fields are left justified (as described in the attached last 2 screen captures)
      Show
      Install an Hebrew (RTL) language pack, and switch to Hebrew Navigate to "User's setting profile page" to view the issue (as described in the attached first 2 screen captures) Apply the patch Reload the page and verify the issue is solved - All above fields are left justified (as described in the attached last 2 screen captures)
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      WIP-MDL-35578
    • Rank:
      44292

      Description

      Left justify (direction:ltr) Form input fields that should always be LTR. even in RTL mode.

      1. email
      2. url
      3. idnumber
      4. phone1, phone2

        Activity

        Hide
        Eloy Lafuente (stronk7) added a comment -

        Is this really correct? ltr directions in those fields? I've been looking wikipedia and it seems forms are always rtl too, no matter if the contents are always ltr or no. Also.. what happens, for example, with the login screen? There, the username is rtl, should be also ltr?

        Note I'll follow your advice, I really don't know what's correct, it just surprised me viewing different text alignments, depending of contents. I always had imagined that, if it's rtl, it's rtl always.

        For the sake of curiosity, how do you write/align something (translate to he) like:

        Dear user, you have been registered with email:
        
        one_email@moodle.org
        
        For any problem, please contact another_email@moodle.org or, by phone call to:
        
        123-456-789
        
        Thanks!
        

        Do you alternate left and right alignments there?

        Ciao (any explanation will be welcome, to illuminate me)

        Show
        Eloy Lafuente (stronk7) added a comment - Is this really correct? ltr directions in those fields? I've been looking wikipedia and it seems forms are always rtl too, no matter if the contents are always ltr or no. Also.. what happens, for example, with the login screen? There, the username is rtl, should be also ltr? Note I'll follow your advice, I really don't know what's correct, it just surprised me viewing different text alignments, depending of contents. I always had imagined that, if it's rtl, it's rtl always. For the sake of curiosity, how do you write/align something (translate to he) like: Dear user, you have been registered with email: one_email@moodle.org For any problem, please contact another_email@moodle.org or, by phone call to: 123-456-789 Thanks! Do you alternate left and right alignments there? Ciao (any explanation will be welcome, to illuminate me)
        Hide
        Nadav Kavalerchik added a comment - - edited

        Eloy,

        When an RTL user enter a URL which is RTL aligned and justified,
        all the backslashes comes up the wrong way, because of the BIDI input implementation of most of the OSes, out there.

        When an RTL user punch in the English letters and the entire text field is justified to the right it is very hard to go back with the left and right arrow keys and correct a typo or just delete some chars on a specific location in the line of text.

        Since URLs are in English (at least for the near future) it is better (Usability wise) to have those fields left aligned and justified. ( Including EMAIL and number-only fields like IDNUMBER, PHONE1 and PHONE2 )
        Really

        The following is a mixed Hebrew, English and Numbers text area - left adjusted (Since jira does not support bidi )

        שלום רב, משתמש יקר
        נרשמת עם הדואר:
        one_email@moodle.org
        לכל בעיה, אנא התקשר עם another_email@moodle.org או בטלפון 123-456-789
        תודה רבה!
        

        And I am attaching an image with blue direction of cursor movement when an RTL users is punching in the letters on the keyboard.

        (Not an easy task. You have no idea how lucky you are)

        Show
        Nadav Kavalerchik added a comment - - edited Eloy, When an RTL user enter a URL which is RTL aligned and justified, all the backslashes comes up the wrong way, because of the BIDI input implementation of most of the OSes, out there. When an RTL user punch in the English letters and the entire text field is justified to the right it is very hard to go back with the left and right arrow keys and correct a typo or just delete some chars on a specific location in the line of text. Since URLs are in English (at least for the near future) it is better (Usability wise) to have those fields left aligned and justified. ( Including EMAIL and number-only fields like IDNUMBER, PHONE1 and PHONE2 ) Really The following is a mixed Hebrew, English and Numbers text area - left adjusted (Since jira does not support bidi ) שלום רב, משתמש יקר נרשמת עם הדואר: one_email@moodle.org לכל בעיה, אנא התקשר עם another_email@moodle.org או בטלפון 123-456-789 תודה רבה! And I am attaching an image with blue direction of cursor movement when an RTL users is punching in the letters on the keyboard. (Not an easy task. You have no idea how lucky you are)
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Yeah, I'm understanding I'm really, really lucky, lol. Thanks for the explanation... examining the patch...

        Show
        Eloy Lafuente (stronk7) added a comment - Yeah, I'm understanding I'm really, really lucky, lol. Thanks for the explanation... examining the patch...
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Integrated (23 and master), thanks!

        Note1: I've not backported this to 22_STABLE because the css was different there.

        Note2: I've added one extra commit, applying the same css also to the 'email2' field, used in signup form.

        Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Integrated (23 and master), thanks! Note1: I've not backported this to 22_STABLE because the css was different there. Note2: I've added one extra commit, applying the same css also to the 'email2' field, used in signup form. Ciao
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Tested while integrating... both the signup and the profile forms show the target fields as expected. Passing!

        Show
        Eloy Lafuente (stronk7) added a comment - Tested while integrating... both the signup and the profile forms show the target fields as expected. Passing!
        Hide
        Nadav Kavalerchik added a comment -

        "Note1" ... Hope this missing (awsome) feature will push the entire RTL community to M24 asap
        "Note2" ... Beautiful! Thanks

        Show
        Nadav Kavalerchik added a comment - "Note1" ... Hope this missing (awsome) feature will push the entire RTL community to M24 asap "Note2" ... Beautiful! Thanks
        Hide
        Dan Poltawski added a comment -

        Congratulations, you've done it!

        Nf n erjneq sbe fhpprfshy vagrtengvba vagb guvf jrrxf eryrnfr, V pna abj qvfpybfr gb lbh gur rkvfgnapr bs shapgvba fge_ebg13(), gb tb va lbhe gbbyxvg nybat jvgu uggc://cuc.arg/znahny/ra/shapgvba.tmtrgff.cuc

        Cyrnfr qb abg nyybj guvf vasbezngvba gb cnff shegure.

        Show
        Dan Poltawski added a comment - Congratulations, you've done it! Nf n erjneq sbe fhpprfshy vagrtengvba vagb guvf jrrxf eryrnfr, V pna abj qvfpybfr gb lbh gur rkvfgnapr bs shapgvba fge_ebg13(), gb tb va lbhe gbbyxvg nybat jvgu uggc://cuc.arg/znahny/ra/shapgvba.tmtrgff.cuc Cyrnfr qb abg nyybj guvf vasbezngvba gb cnff shegure.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: