Forum Discussion
APM Logon page Javascript
Hi,
I am trying to insert an alert("Password Expired") after the AD Auth in the logon.inc customization page. Please can you help me to add it to the F5 code? I believe that it should be displayed only if errorcode is 1402 or 1403.
Thanks in advance,
Best Regards,
M.
1 Reply
- Seth_Cooper
Employee
Hi! This is pretty easy to do in advanced customization.
This was tested on 11.6.0 HF-6 so you might have to adjust for line numbers of the customization code.
Navigate to "Customization" > "Advanced" and then expand the access profile > access policy > logon pages > logon page > logon.inc
Around line 73 find the following if statement and modify
if( $GLOBALS["set_new_password"] ){ $fields_settings[1]["caption"] = "%[new_password]"; $fields_settings[2] = array( "type" => "password", "name" => "_F5_verify_password", "varname" => "verify_password", "rw" => "1", "caption" => "%[verify_password]" ); }to add the alert_pw php variable.
if( $GLOBALS["set_new_password"] ){ $fields_settings[1]["caption"] = "%[new_password]"; $fields_settings[2] = array( "type" => "password", "name" => "_F5_verify_password", "varname" => "verify_password", "rw" => "1", "caption" => "%[verify_password]" ); $alert_pw = 1; }Next we will go to around line 474 (right under the body tag) and add the following.
to
This will produce a JavaScript alert on the password change page.
Hope this helps, please let me know if you have any questions.
-Seth
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com