VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: keb1965 on September 04, 2013, 17:17:15 PM

Title: Changing login/logout form to anchor
Post by: keb1965 on September 04, 2013, 17:17:15 PM
Using J2.5.14 w/VM2.0.22a

In the shopping cart, the login form uses input fields to store the user data and effect a login/logout, however an input element does not adhere to CSS styling the same as an anchor. Because of this, I cannot style the login/logout buttons on the form to match every other button on the site.

I have considered creating an override for the login form that instead uses an anchor element. The following code seems to work. Are there any issues with doing it this way?


<?php echo JText::sprintf'COM_VIRTUEMART_HINAME'$user->name ); ?>
<a class="button" href="<?php echo JRoute::_('index.php'); ?>?option=<?php echo $comUserOption ?>&task=<?php if ( JVM_VERSION===) { ?>logout<?php } else { ?>user.logout<?php ?>&<?php echo JSession::getFormToken() ?>=1&return=<?php echo base64_encode($url?>"><?php echo JText::_'COM_VIRTUEMART_BUTTON_LOGOUT'); ?></a>
Title: Re: Changing login/logout form to anchor
Post by: Maxim Pishnyak on September 04, 2013, 23:18:31 PM
Quote from: keb1965 on September 04, 2013, 17:17:15 PM
... I cannot style the login/logout buttons on the form to match every other button on the site.
Url?
Title: Re: Changing login/logout form to anchor
Post by: keb1965 on September 09, 2013, 20:54:38 PM
I managed to get CSS to work without modifying the underlying component, but thanks anyway.