How to enter a new URL link on a UI Page

Joe Taylor
Giga Guru

I would like to modify the OOB login_locate_sso UI page slightly.

I'm trying to change bottom of this to go to a password reset URL instead of the local login URL.

I can't get the URL to work when I click on it.

Look at the AFTER code.  This isn't working.

 

BEFORE

</div>
   <div class="login-card-footer text-center">
      <a class="btn btn-link" href="#" onclick="window.location.href = '${jvar_local_login_url}'; return false;">
         ${gs.getMessage('Login with username and password')}
      </a>
   </div>
</div>

 

 

AFTER

</div>
   <div class="login-card-footer text-center">
      <a class="btn btn-link" href="#" onclick="window.location.href = 'https://passwordreset.microsoftonline.com'; return false;">
         ${gs.getMessage('Forgot your password?')}
      </a>
   </div>
</div>

1 ACCEPTED SOLUTION

Sorry,

 

I created that, I just added it to the code around line 35 to create the jelly variable then called the variable in the later code to link to the MS site.

View solution in original post

6 REPLIES 6

Joe S1
Kilo Sage

Hi @Joe Taylor 

 

It looks like it's an embedding problem, the microsoft site is not allowing connections within an iFrame.

Chrome is generating this error: 

Refused to display 'https://passwordreset.microsoftonline.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Which led me to this MS community article:
https://learn.microsoft.com/en-us/answers/questions/957121/login-microsoftonline-com-refused-to-conn...

 

I've tried to open the page in a new window instead of in the frame but haven't been able to get that to work yet. Here's the code I'm currently working with.

<g:evaluate var="jvar_password_reset_url" jelly="true">
	var reset_url = 'https://passwordreset.microsoftonline.com/';
	reset_url;
</g:evaluate>
<div class="login-card-footer text-center">
     <a class="btn btn-link" href="#" onclick="window.location.href = '${jvar_password_reset_url}'; return false;" target="_blank">
     ${gs.getMessage('Forgot your password?')}
     </a>
</div>

 

@Joe Taylor 

 

This code below is working, it forces the login page to a full screen and from there when you click "Forgot your password?" it takes you to the MS site.

<div class="login-card-footer text-center">
     <a class="btn btn-link" href="#" target="_blank" onclick="window.location.href = '${jvar_password_reset_url}';">
     ${gs.getMessage('Forgot your password?')}
     </a>
</div>

JoeS1_0-1686323410291.png

JoeS1_1-1686323440453.png

 

Joe Taylor
Giga Guru

Where do I find the jvar_password_reset_url?

 

How do I edit it?

Joe Taylor
Giga Guru

Hey Joe.

Any thoughts on my last question?