← Back to team overview

mahara-contributors team mailing list archive

[Bug 1023834] [NEW] Refactor login form elements code duplication

 

Public bug reported:

All login form elements along with extra login form elements are
declared twice, in auth_get_login_form() and auth_generate_login_form()
respectively. The differences are really minor, so I suggest to move
login form elements generation to separate function, making it less
prone to errors.

auth_get_login_form() - used when logged-off user tries to access something different from main page or session has expired. 
auth_generate_login_form()  - used in side-block on the main page

The auth_get_login_form() version of login form is missing (see attached
diff):

* 'defaultvalue' is missing in  'login_username'  - can be used, nothing major
* 'login_password' is not regarded as 'required' field here for some reason...
* Register link is not shown - I do not see a reason why it should not be displayed
* Login container is missing 'login' class - can be added, does not break styles

** Affects: mahara
     Importance: Medium
     Assignee: Ruslan Kabalin (rkabalin)
         Status: Triaged


** Tags: auth form login

** Changed in: mahara
     Assignee: (unassigned) => Ruslan Kabalin (rkabalin)

** Changed in: mahara
       Status: New => Confirmed

** Changed in: mahara
       Status: Confirmed => Triaged

** Changed in: mahara
   Importance: Undecided => Medium

** Changed in: mahara
    Milestone: None => 1.6.0

** Tags added: form login

** Tags added: auth

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/1023834

Title:
  Refactor login form elements code duplication

Status in Mahara ePortfolio:
  Triaged

Bug description:
  All login form elements along with extra login form elements are
  declared twice, in auth_get_login_form() and
  auth_generate_login_form() respectively. The differences are really
  minor, so I suggest to move login form elements generation to separate
  function, making it less prone to errors.

  auth_get_login_form() - used when logged-off user tries to access something different from main page or session has expired. 
  auth_generate_login_form()  - used in side-block on the main page

  The auth_get_login_form() version of login form is missing (see
  attached diff):

  * 'defaultvalue' is missing in  'login_username'  - can be used, nothing major
  * 'login_password' is not regarded as 'required' field here for some reason...
  * Register link is not shown - I do not see a reason why it should not be displayed
  * Login container is missing 'login' class - can be added, does not break styles

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1023834/+subscriptions


Follow ups

References