• Type: Bug Bug
    • Status: New New
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Current Version
    • Fix Version/s: None
    • Component/s: OIOIOI
    • Labels:


      Following changes added `PreferenceFactory` class that is used to generate preference forms, currently used to generate edit profile view form:

      Currently only place where `add_field` method is used is inside:
      1. base/ > _maybe_add_field
      2. base/ > adjust_preferences_factory_fields
      3. tests

      Two improvements have to be made:
      1. `_maybe_add_field` function takes label strings from settings, where they are translated. Functionality should be added to automatically translate labels in `PreferenceFactory` and move translation logic out of settings. It should be considered if label names shouldn't be moved from settings entirely.
      Alternatively field labes can be made into positional parameter, and translation will occur in caller.

      2. With addition of `UserPreferences` model `PreferenceFactory` needs functionality to automatically add fields from `UserPreferences`, similarly to how forms can be automatically generated from models.
      It is currently made manually inside `adjust_preferences_factory_fields` which can badly impact future refactor/updates.


        There are no comments yet on this issue.


          • Assignee:
            Joanna Wojciechowska
            Andrzej RadzimiƄski
          • Votes:
            0 Vote for this issue
            1 Start watching this issue


            • Created: