Re: Login Customizations

61 views
Skip to first unread message

Henri Koivuneva

unread,
May 22, 2013, 2:10:59 PM5/22/13
to mezzani...@googlegroups.com
What do you mean by removing the panel? The right-side login buttons or that one on the login page?
Here's what you can do to remove the background from http://wham.fi/accounts/login/?next=/

1. Open static/css/mezzanine.css
2. For example at the start of the file, add this:
.form-actions {
    background: none !important;
    border: none !important;
}

This makes sure that the part of the form where the buttons are won't have any background or border. The use of !important is not considered wise around the web, but in this case it's the easiest option as it overrides everything else for that part of the form in the CSS files - styles for it are present in mezzanine.css and bootstrap.css at least.

What would the dropdown be like or have?

On Tuesday, May 21, 2013 9:10:21 PM UTC+3, Tom Russell wrote:
I am trying to customize the login form a bit and have catered it to my needs for the most part, however I have 2 items I cannot seem to overcome and was wondering if someone could give me some guidance on the best approach.

First item, I have tried removing the little panel with the signup and login buttons but cannot do so within the template without removing the fields for the username/password as well. Is there a way to remove them in code or something?

Second Item, I need to add another field to the login part such as a dropdown. What is the best way to handle this part?

Thanks,

Tom

Tom Russell

unread,
May 22, 2013, 2:27:47 PM5/22/13
to mezzani...@googlegroups.com
Thanks for the tips. Yes I mean the small panel with the login and signup buttons but not the login part in the middle.

Henri Koivuneva

unread,
May 22, 2013, 2:45:31 PM5/22/13
to mezzani...@googlegroups.com
Oh okay - just to be sure - that one in the right-hand panel?

To remove backgrounds and borders from both the login page on the site and from the side panel ONLY, add this to mezzanine.css. If you want to add only one of them, remove the other from the CSS.
.form-actions, .panel-account {
    background: none !important;
    border: none !important;
}

For the right-hand panel CSS to work you need to do yet this one thing:
1. Open templates/includes/user_panel.html
2. Add panel-account to class="panel" so that it looks like class="panel panel-account"
3. SAve and then add aforementioned CSS and you're done! Refrest site to see if it works

Tom Russell

unread,
May 22, 2013, 2:53:48 PM5/22/13
to mezzani...@googlegroups.com
This will get rid of the two buttons themselves? Im not looking to just remove the panel but the buttons as well and looking at what you posted I am not sure thats what I will get?

Thanks,

Tom

Henri Koivuneva

unread,
May 22, 2013, 4:18:38 PM5/22/13
to mezzani...@googlegroups.com
Oh, okay! I thought you wanted to get rid of the background only!

Hide the login side panel:
1. Open templates/base.html
2. Find {% include "includes/user_panel.html" %}
3. Remove that line and the ones before and after that, so 3 lines total will be removed:
{% nevercache %}
{% include "includes/user_panel.html" %}
{% endnevercache %}

After removing or commenting out ( add <!-- before the first line and --> after the last ) the lines, save and refresh page. It's disappeader :)

Tom Russell

unread,
May 22, 2013, 4:42:13 PM5/22/13
to mezzani...@googlegroups.com
Thanks, that worked like a charm. Now if I can get the extra field in there for the login I will be good to go.


--
You received this message because you are subscribed to the Google Groups "Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Henri Koivuneva

unread,
May 24, 2013, 11:25:20 AM5/24/13
to mezzani...@googlegroups.com
What do you mean? Having the login form there? :)
Reply all
Reply to author
Forward
0 new messages