Generalize autoFill Template Function #32

Open
opened 2015-09-25 04:49:31 +00:00 by deon · 1 comment
deon commented 2015-09-25 04:49:31 +00:00 (Migrated from gitlab.dege.au)

I see in PLA 1.2.3 that "autoFill" in lib/Template.php has support for the "k" and "K" flags so that...

If displayName contains a colon delimited value, return the first field with: =autoFill(uid;%displayName|0/k%)

If displayName contains a space delimited value, return the first field with: =autoFill(uid;%displayName|0/K%)

However, autoFill's "k" flag would be more useful if it was generalized to support any delimiter so that...

When the mail attribute is entered, an onchange of "=autoFill(uid;%mail|0/k/@%)" could be used to split the mail attribute using a delimiter of "@" and pre-populate uid with the local part of the e-mail address (i.e. the first field).

If autoFill was generalized, the "K" flag could be deprecated in favor of the "k" flag and the "k" flag could default to using a colon as the delimiter if the code detects that the extended format is not used.

Also, the documentation on the autoFill function makes no mention of "k" and "K" flags.

I see in PLA 1.2.3 that "autoFill" in lib/Template.php has support for the "k" and "K" flags so that... If displayName contains a colon delimited value, return the first field with: =autoFill(uid;%displayName|0/k%) If displayName contains a space delimited value, return the first field with: =autoFill(uid;%displayName|0/K%) However, autoFill's "k" flag would be more useful if it was generalized to support any delimiter so that... When the mail attribute is entered, an onchange of "=autoFill(uid;%mail|0/k/@%)" could be used to split the mail attribute using a delimiter of "@" and pre-populate uid with the local part of the e-mail address (i.e. the first field). If autoFill was generalized, the "K" flag could be deprecated in favor of the "k" flag and the "k" flag could default to using a colon as the delimiter if the code detects that the extended format is not used. Also, the documentation on the [autoFill function](http://phpldapadmin.sourceforge.net/wiki/index.php/TemplateOnChangeFunction:autoFill ) makes no mention of "k" and "K" flags.
deon commented 2020-08-23 02:36:09 +00:00 (Migrated from gitlab.dege.au)

mentioned in commit fa88250f0e

mentioned in commit fa88250f0e83f43e05fa09228efa5aa9c262326f
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: deon/phpldapadmin#32
No description provided.