hello, after checking this problem on another site using Flatastic template we suggest the following solution:
within both onepage.unlogged + logged + registration (if available) .tpl.php
update from (this is band_box_german) but it's similar on all opc themes:
- Code: Select all
<!-- show TOS and checkbox before button -->
<?php
if ($tos_required)
{
?>
<div id="comment_box" <?php if (!$show_full_tos) echo ' style="width: 100%;" '; ?> >
<div id="comment_head" class="bandBoxStyle"><?php
echo OPCLang::_('COM_VIRTUEMART_I_AGREE_TO_TOS');
?></div>
<div id="comment_container">
<div id="agreed_div" class="formLabel " >
<input value="1" type="checkbox" id="agreed_field" name="tosAccepted" <?php if (!empty($agree_checked)) echo ' checked="checked" '; ?> class="terms-of-service" required="required" autocomplete="off" />
<label for="agreed_field"><?php echo OPCLang::_('COM_VIRTUEMART_I_AGREE_TO_TOS');
if (!empty($tos_link))
{
JHTMLOPC::_('behavior.modal', 'a.opcmodal');
?><br /><a target="_blank" rel="{handler: 'iframe', size: {x: 500, y: 400}}" class="opcmodal" href="<?php echo $tos_link; ?>" onclick="javascript: return op_openlink(this); " >(<?php echo OPCLang::_('COM_VIRTUEMART_CART_TOS').' *'; ?>)</a><?php } ?></label>
<?php
echo $italian_checkbox;
?>
</div>
</div>
</div>
<?php
}
?>
<!-- end show TOS and checkbox before button -->
to this code (note that the only difference is that the checkbox is now inside the label element:
- Code: Select all
<!-- show TOS and checkbox before button -->
<?php
if ($tos_required)
{
?>
<div id="comment_box" <?php if (!$show_full_tos) echo ' style="width: 100%;" '; ?> >
<div id="comment_head" class="bandBoxStyle"><?php
echo OPCLang::_('COM_VIRTUEMART_I_AGREE_TO_TOS');
?></div>
<div id="comment_container">
<div id="agreed_div" class="formLabel " >
<label for="agreed_field">
<input value="1" type="checkbox" id="agreed_field" name="tosAccepted" <?php if (!empty($agree_checked)) echo ' checked="checked" '; ?> class="terms-of-service" required="required" autocomplete="off" />
<?php echo OPCLang::_('COM_VIRTUEMART_I_AGREE_TO_TOS');
if (!empty($tos_link))
{
JHTMLOPC::_('behavior.modal', 'a.opcmodal');
?><br /><a target="_blank" rel="{handler: 'iframe', size: {x: 500, y: 400}}" class="opcmodal" href="<?php echo $tos_link; ?>" onclick="javascript: return op_openlink(this); " >(<?php echo OPCLang::_('COM_VIRTUEMART_CART_TOS').' *'; ?>)</a><?php } ?></label>
<?php
echo $italian_checkbox;
?>
</div>
</div>
</div>
<?php
}
?>
<!-- end show TOS and checkbox before button -->
update for italian_checkbox (privacy checkbox) + acymailing_checkbox (subscription checkbox)
subscription checkbox in:
\components\com_onepage\themes\band_box_german\overrides\acymailing_checkbox.php
- Code: Select all
<div class="acy_wrapper" >
<div class="acy_checkbox_wrapper" style="">
<input type="hidden" value="<?php echo $opc_acy_id; ?>" name="acylistsdisplayed_dispall" />
<input type="hidden" name="allVisibleLists" value="<?php echo $opc_acy_id; ?>" />
</div>
<div class="acy_label_wrapper" style=""><label for="acy_list_<?php echo $opc_acy_id; ?>" style="float: none; white-space: normal;">
<input type="checkbox" id="acy_list_<?php echo $opc_acy_id; ?>" class="acymailing_checkbox" name="acysub[]" value="<?php echo $opc_acy_id; ?>"/>
<span style="font-weight:bold;"><?php echo OPCLang::_('COM_VIRTUEMART_FIELDS_NEWSLETTER'); ?></span><br />
<?php
echo OPCLang::_('COM_ONEPAGE_NEWSLETTER_SUBSCRIPTION_DESC');
?>
</label></div>
</div>
privacy checkbox in:
\components\com_onepage\themes\band_box_german\overrides\italian_checkbox.php
- Code: Select all
<!-- italian privacy checkbox -->
<div style="width: 100%; clear: both;">
<div >
<script type="text/javascript">
op_userfields.push('italianagreed');
custom_rendering_fields.push('italianagreed');
var italagreeerr = "<?php echo OPCloader::slash(JText::_('COM_ONEPAGE_ITALIAN_AGREE_ERROR')); ?>";
function validateItalian()
{
d = document.getElementById('italianagreed_field');
if (d != null)
if (!d.checked)
{
alert(italagreeerr);
return false;
}
return true;
}
addOpcTriggerer('callSubmitFunct', 'validateItalian');
</script>
</div>
<div ><label for="italianagreed_field" style="float: none; white-space: normal;max-width: 90%;">
<input value="1" type="checkbox" id="italianagreed_field" name="italianagreed" <?php if (!empty($agree_checked)) echo ' checked="checked" '; ?> class="terms-of-service required" required="required" autocomplete="off" />
<span style="font-weight:bold;"><?php echo OPCLang::_('COM_ONEPAGE_ITALIAN_AGREE_LABEL').'</span><br />';
echo OPCLang::_('COM_ONEPAGE_ITALIAN_AGREE_DESC');
?>
</label></div>
</div>
<!-- END italian privacy checkbox -->
this should be also fixed by the theme creator (Flatastic) since it should either render the checkboxes properly, or not alter the display of them.
best regards, stan