Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Help:
Customize forms [Edited]
Purified-Dinking-Wat



Joined: 03 Jul 2013
Posts: 25
Location: Matrix

Posted: 07/10/13 15:08 
I'm looking for a way to style the login form. For other pages such as the dashboard and admin menu, I've been able to override the templates. But I've come unstuck when trying to find the login template.

Apologies for this question, I'm sure a fresh look at it will reveal the answer without much hassle.

Thanks,
Pete

[Edit] - New question, I wish to customize all the forms, to work nicely with a custom skin, based on bootstrap.



Last edited by Purified-Dinking-Wat on 07/17/13 14:57; edited 1 time in total
Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 07/10/13 18:13 
Did you try with:
/skin/(your skin)/jrCore_form_submit.tpl
/skin/(your skin)/jrCore_form_field_elements.tpl
......

that correspond to:
/modules/jrCore/templates/form_submit.tpl
/modules/jrCore/templates/form_*.tpl


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 07/13/13 07:54 
I wouldn't change the core templates - those will affect the entire site. I think the easiest way to do this is:

1) Create a new template - skins/Skin_Name/user_login.tpl
2). Re-create the login form (from user/login) and customize it - note you will want to change out the value of the jr_html_form_token hidden form field and use {jrCore_form_token} in place of the value (this is so a unique CSRF token is created on each view).
3) point the "action" of the form to user/login_save

Then update your site's login URL to point to site.com/user_login

Let me know if that helps.

Thanks!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
Purified-Dinking-Wat



Joined: 03 Jul 2013
Posts: 25
Location: Matrix

Posted: 07/17/13 14:55 
Thank you for the replies, sorry for the very late reply.

I like Michael's way of styling all the of the forms, as I'm skinning the entire site so it kills two birds with one stone.

Though I'm a bit stuck on finding where the following block of code is generated from:


Code

<div class="container" style="width: auto"><form id="jrUser_login" name="jrUser_login" action="http://localhost/jamroom5/user/login_save" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<input type="hidden" id="jr_html_form_token" name="jr_html_form_token" value="{CSRF}">
<input type="hidden" name="user_remember" value="off">
<table class="page_content">


I'd like to remove the opening div, apply a custom class to the form, and remove the beginning table.

The solution provided by Brian, works really well, if I stuck to the original question, but now I'm looking to style all the forms. Smile (I should rename the topic).

Also it would be simpler if I could remove the AJAX/JS form submit. Is this possible or am I just missing an important part of the system. I mean my skin is not making use of it, and there are "working..." divs around the place. I'm sure I'm doing something wrong.

Thanks,
Pete

Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 07/17/13 16:18 
The login page is not one specific page, but rather made up of sections.

Which sections get used are defined from the modules view. In this case for site.com/user/login you can see the function that creates that page at line 777 ish of /modules/jrUser/index.php, it looks like this:

Code

function view_jrUser_login($_post,$_user,$_conf){.....


In that module view, there are a few functions called
jrCore_set_form_notice()
jrCore_page_banner()
jrCore_form_create()
jrCore_form_field_create() //one for each of the page elements.
jrCore_page_display();

That last one, core-page-display forms all of those elements into the page you see by taking what has been asked for and applying it to the templates that cover form creation.

So in this particular page the page.php jrCore_page_display() function assembles the page using these templates:
header.tpl
page_begin.tpl
page_banner.tpl
form_begin.tpl
form_field_elements.tpl //one for each of the page elements.
form_submit.tpl
page_end.tpl
footer.tpl

I would look for that container class in the header.tpl file first, could be there.


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
Purified-Dinking-Wat



Joined: 03 Jul 2013
Posts: 25
Location: Matrix

Posted: 07/17/13 16:30 
hah, I was so concerned with the JrCore templates, I forgot to check my header.tpl, it was in there.
I've been wondering around following function calls, and had the majority of them down, but was missing a call or two.

Your reply is exactly what I was looking for got that niggling bug knocked out.

Thank's Michael ^_^

Back to top
adanhash



Joined: 08 Apr 2007
Posts: 224

Posted: 08/15/13 04:37 
Hi Guys,

I have done what you have said in regards to changing the token code and action but i receive the following

Invalid Form Validation received - please refresh and try again. - See more at:

Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 08/15/13 08:18 

adanhash:
Hi Guys,

I have done what you have said in regards to changing the token code and action but i receive the following

Invalid Form Validation received - please refresh and try again. - See more at:


Then you're not actually including the jr_html_form_token - double check that there is a value for that hidden field, and that it is submitted with the form (if you are submitting via an AJAX call).

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Jamroom Help

 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.