Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-684

Improvements to translatable field interface



    • Type: Bug Report
    • Status: New
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.1.0
    • Fix Version/s: None
    • Component/s: Admin Interfaces
    • Labels:


      We have 2 possible layouts of forms, that have translatable fields on them:
      1. show all fields on all languages at once

      • getting very large form, when there are a lot of translatable fields on it
        + no need to refresh form to enter field value on other language

      2. only field on current language is visible
      + small form

      • need to refresh form and validate all data to enter value from other language

      We need to invent something new, that will allow to enter field values on different languages without form refresh and that doesn't make forms bigger, when new languages are added to the site.

      In 2nd approach errors from translatable field on any language are redirected back to field on primary language.

      For example:

      • you have l1_Name and l2_Name fields on form;
      • 2nd language is primary;
      • in case of error in l1_Name field it will be shown under l2_Name field.

      So here is the solution, that should fit our needs without even requiring extra space for additional controls. No new controls added only existing controls will work a bit different:

      1. each translatable field will have input controls on all languages, but only one control per field will be visible at a time;
      2. dropdown on top (with language list) will affect all translatable fields and will make controls on new selected language become visible (instead of previous current language) without form refresh;
      3. top dropdown name will be "m_lang", so it will be remembered as form language once form is submitted;
      4. translatable fields should use "inp_edit_box_ml" and "inp_edit_textarea_ml" blocks for this to work;
      5. mentioned above blocks needs to be rewritten to support such behavior.

      We have JavaScript Form class, that tries to fill empty space at form bottom by resizing textarea, so we should trick it and make it assume, that same field on different languages is actual one field, that uses space on form and not all of them will be always visible.


          Issue Links



              • Assignee:
                alex Alex
              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created: