ubc-web-services / Megatron

Drupal 7 theme for the UBC CLF
http://ubc-web-services.github.com/Megatron/
9 stars 8 forks source link

Login Page button duplicated #21

Closed grandmasterv closed 10 years ago

grandmasterv commented 10 years ago

Hello James,

Here is a pic that shows you the duplicate Log In button bug I'm encountering. The button itself works but there is duplicated text next to it. Its just text with no link.

HTML

<div class="form-actions form-wrapper" id="edit-actions">
<input type="submit" id="edit-submit" name="op" value="Log in" class="btn form-submit">
Log in
</div>

CSS properties (not inherited)

background-color: rgb(245, 245, 245);
border-top-color: rgb(229, 229, 229);
border-top-style: solid;
border-top-width: 1px;
color: rgb(34, 34, 34);
display: block;
font-family: 'Open Sans', Arial, sans-serif;
font-size: 14px;
font-style: normal;
font-weight: normal;
height: 30px;
line-height: 22px;
margin-bottom: 20px;
margin-top: 20px;
padding-bottom: 20px;
padding-left: 20px;
padding-right: 20px;
padding-top: 19px;
width: 803px;

screen shot 2014-07-09 at 1 52 45 pm

occupant commented 10 years ago

Hmm, seems like the function for replacing submit input elements with button elements is broken. The button element wraps the text, which is why the text is being appended.

The markup should be:

<div class="form-actions form-wrapper" id="edit-actions"><button type="submit" id="edit-submit" name="op" value="Log in" class="btn form-submit">Log in</button> </div>

Are you using any modules to alter forms (other than webform), like logintoboggan perhaps?

The function being overridden is 'megatron_button'.

grandmasterv commented 10 years ago

The login modules we are using are Login Destination and Secure Login. I tried disabling each of them and both at the same time. It did not fix the issue. Any other ideas on how I could troubleshoot this?

Thanks!

occupant commented 10 years ago

I think I know how you could alleviate the issue, but it's not a fix to the theme, just your particular installation.

If you just want to clear this up asap, try commenting out the 'megatron_button' function in the Megatron template.php and purge the caches (the theme registry is notoriously difficult to clear).

I'll have to look at those two modules to see if there are any hook_form_alter or similar calls that are overriding the default theme implementation. I'll update the issue when I've taken a look.

grandmasterv commented 10 years ago

No rush to clear this up right now. Looking to launch the site early next year so take your time. I commented out megatron_button function and it renders a single button now.

screen shot 2014-09-05 at 11 42 21 am

Thanks for the help!

occupant commented 10 years ago

Issue fixed with commit e096f25920fadfaa875c3da702d8253028684eb3

grandmasterv commented 10 years ago

Confirmed fix! Thanks James!