We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to Change Forgot Password screen [Solution available] | Forum

Kevin
Kevin Nov 19 '16
Currently after a user selects "Forgot Password" a complete white screen is displayed (see attached pics). Pretty ugly and doesn't even show what site they are on.


I have seen posts on the internet, but only suggestion was including code with references to ads- no thanks.


Looking to modify code to overlay the existing Sign In form with a Forgot Password form of a similar size.  Or it might be easier/better looking to put a fullscreen image in the background/


Note: Also applies to the Reset Password Screen after user follows link in email


=== Current Forgot Password HTML ====

/public_html/ow_system_plugins/base/views/controllers/user_forgot_password.html


{style}

{literal}

.ow_forgot_password{

    margin:0 auto;

    padding:100px;

    width:350px;

}

{/literal}

{/style}

<div class="ow_forgot_password">

    {block_decorator name='box' style='text-align:center;' langLabel='base+forgot_password_cap_label'}

        <div style="padding: 0 5px 5px;">{text key='base+forgot_password_form_text'}</div>

        {form name='forgot-password'}

            {input name='email' class='ow_smallmargin'}

            <div class="clearfix"><div class="ow_right">{submit name='submit' class='ow_positive'}</div></div>

        {/form}

    {/block_decorator}

</div>

============= 

Thanks

The Forum post is edited by Aliya Nov 25 '16
Attachments:
  ForgotPassword.jpg (276Kb)
  Enter_Email.jpg (69Kb)
Darryl B Leader
Darryl B Nov 19 '16
I found the #fff background color set in the blank html file. I changed it to #transparent. Those pages then took on the color of the body background color.
Kevin
Kevin Nov 20 '16
Thanks- that works!

That is a step in the right direction.

Oxwall Tips
Oxwall Tips Nov 21 '16
Some background info.
Each Ox theme has master pages. In my example I will take https://developers.oxwall.com/store/item/1157 this theme

Folder: ow_themes/simplicity/master_pages .
We have:
-admin
- blank
-dndindex
- general
- html_document.html

Each of those has a specific layout which CAN BE ASSIGNED TO ANY feature including Forgot Password page.

Forgot password page uses  BLANK.HTML layout by default. BLANK is the most simple layout. Name stands for itself - blank =)  Thus you see a rather empty design on this page.

Here is a file where this magic happens:
ow_system_plugins/base/controllers/user.php
Function name:   public function forgotPassword()
Code: OW::getDocument()->getMasterPage()->setTemplate(OW::getThemeManager()->getMasterPageTemplate(OW_MasterPage::TEMPLATE_BLANK));

BY ASSIGNING A DIFFERENT MASTER PAGE YOU CAN GET A DIFFERENT DESIGN FOR FORGOT PASSWORD PAGE.

Customized code:  OW::getDocument()->getMasterPage()->setTemplate(OW::getThemeManager()->getMasterPageTemplate(OW_MasterPage::TEMPLATE_GENERAL));

general.html master page gives a layout for all inner pages. So if you use it for Forgot password page you will get a header image with default menu and footer.

Here is a sample of Fogrot password page with General master page instead of Blank.



Try playing around with master pages and see whether this will work for you.

The Forum post is edited by Oxwall Tips Nov 21 '16
Kevin
Kevin Nov 21 '16
Thanks for the detailed info!  Worked great for reset password also.


 /* OW::getDocument()->getMasterPage()->setTemplate(OW::getThemeManager()->getMasterPageTemplate(OW_MasterPage::TEMPLATE_BLANK)); */


OW::getDocument()->getMasterPage()->setTemplate(OW::getThemeManager()->getMasterPageTemplate(OW_MasterPage::TEMPLATE_GENERAL)); 

The Forum post is edited by Kevin Nov 21 '16
Darryl B Leader
Darryl B Dec 31 '16
I found a solution, after a few weeks of searching, and playing around with different java script. I finally put the combination js, and css together to be able to add a background image just for the forgot password page. I have attached the info on how I did it; as well as an image showing the result.

The good thing is that with this method, there are no files to modify, and it won't be overwritten on updates.
The Forum post is edited by Darryl B Dec 31 '16
Attachments:
  fg page.jpg (165Kb)
  forgot_password bgimage.txt (1Kb)
Kevin
Kevin Dec 31 '16
Cool - I will give it a try. Happy New Year!
Darryl B Leader
Darryl B Dec 31 '16
You to.
MatthewMorgan
MatthewMorgan Jun 10 '23

If you find yourself on the "Forgot Password" screen, fret not! Changing your forgotten password is a simple process. Visit the login page and click on the "Forgot Password" link. For more tips and tricks, check out https://magicalkatrina.com/magiciansblog/why-you-should-have-a-strolling-magician-at-your-halloween-event. You will be redirected to a secure page where you can enter your email or username. Follow the instructions sent to your email to reset your password.