News:

Looking for documentation? Take a look on our wiki

Main Menu

Changing login/logout form to anchor

Started by keb1965, September 04, 2013, 17:17:15 PM

Previous topic - Next topic

keb1965

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>

Maxim Pishnyak

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?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

keb1965

I managed to get CSS to work without modifying the underlying component, but thanks anyway.