Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions code/plugins/authorizenet/authorizenet/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,18 @@

<script type="text/javascript">
function myValidate(f)
{
if (document.formvalidator.isValid(f))
{
f.check.value='<?php echo JSession::getFormToken(); ?>';
return true;
}
else
{
var msg = 'Some values are not acceptable. Please retry.';
alert(msg);
plg_auth_showHide();
}
{
if (!document.formvalidator.isValid(f)) {
var msg = "<?php echo JText::_('PLG_BYORDER_VALIDATION_MSG'); ?>";
alert(msg);
plg_auth_showHide();

return false;
}

return true;
}

function plg_auth_showHide()
{
// Get the DOM reference
Expand Down Expand Up @@ -251,6 +248,7 @@ function plg_auth_showHide()
<input type="hidden" name="order_id" size="10" value="<?php echo $vars->order_id; ?>" />
<input type="hidden" name="plugin_payment_method" value="onsite" />
<input type="submit" name="submit" class="btn btn-success btn-large" value="<?php echo JText::_('SUBMIT');?>" />
<?php echo JHtml::_('form.token'); ?>
</div>
</div>
</form>
Expand Down
14 changes: 7 additions & 7 deletions code/plugins/authorizenet/authorizenet/tmpl/default_bs3.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,15 @@
<script type="text/javascript">
function myValidate(f)
{
if (document.formvalidator.isValid(f)) {
f.check.value='<?php echo JSession::getFormToken(); ?>';
return true;
}
else {
var msg = 'Some values are not acceptable. Please retry.';
if (!document.formvalidator.isValid(f)) {
var msg = "<?php echo JText::_('PLG_BYORDER_VALIDATION_MSG'); ?>";
alert(msg);
plg_auth_showHide();

return false;
}
return false;

return true;
}

function plg_auth_showHide()
Expand Down Expand Up @@ -173,6 +172,7 @@ function plg_auth_showHide()
<input type="hidden" name="order_id" size="10" value="<?php echo $vars->order_id;?>" />
<input type="hidden" name="plugin_payment_method" value="onsite" />
<input type="submit" name="submit" class="btn btn-success btn-large" value="<?php echo JText::_('SUBMIT');?>" />
<?php echo JHtml::_('form.token'); ?>
</div>
</div>
</form>
Expand Down
15 changes: 6 additions & 9 deletions code/plugins/bycheck/bycheck/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,14 @@
<script type="text/javascript">
function myValidate(f)
{
if (document.formvalidator.isValid(f))
if (!document.formvalidator.isValid(f))
{
f.check.value = '<?php echo JSession::getFormToken(); ?>';

return true;
}
else
{
alert("<?php echo JText::_('PLG_PAYMENT_BYCHECK_ALERT_MSG'); ?>");
var msg = "<?php echo JText::_('PLG_BYORDER_VALIDATION_MSG'); ?>";
alert(msg);
return false;
}

return false;
return true;
}
</script>
<div class="tjcpg-wrapper">
Expand Down Expand Up @@ -82,6 +78,7 @@ function myValidate(f)
<input type="hidden" name="plugin_payment_method" value="onsite" />
<input type='submit' name='btn_check' id='btn_check' class="btn btn-success btn-large"
value="<?php echo JText::_('SUBMIT'); ?>">
<?php echo JHtml::_('form.token'); ?>
</div>
</form>
</div>
16 changes: 7 additions & 9 deletions code/plugins/bycheck/bycheck/tmpl/default_bs3.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,15 @@
<script type="text/javascript">
function myValidate(f)
{
if (document.formvalidator.isValid(f))
if (!document.formvalidator.isValid(f))
{
f.check.value = '<?php echo JSession::getFormToken(); ?>';
return true;
}
else
{
alert("<?php echo JText::_('PLG_PAYMENT_BYCHECK_ALERT_MSG'); ?>");
var msg = "<?php echo JText::_('PLG_BYORDER_VALIDATION_MSG'); ?>";
alert(msg);
return false;
}

return false;
}
return true;
}
</script>
<div class="tjcpg-wrapper">
<form action="<?php echo $vars->url; ?>" name="adminForm" id="adminForm" onSubmit="return myValidate(this);" class="form-validate form-horizontal" method="post">
Expand Down Expand Up @@ -80,6 +77,7 @@ function myValidate(f)
<input type='hidden' name='return' value="<?php echo $vars->return;?>" >
<input type="hidden" name="plugin_payment_method" value="onsite" />
<input type='submit' name='btn_check' id='btn_check' class="btn btn-success" value="<?php echo JText::_('SUBMIT'); ?>">
<?php echo JHtml::_('form.token'); ?>
</div>
</div>
</form>
Expand Down
14 changes: 5 additions & 9 deletions code/plugins/byorder/byorder/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,14 @@
<script type="text/javascript">
function myValidate(f)
{
if (document.formvalidator.isValid(f)) {
f.check.value='<?php echo JSession::getFormToken(); ?>';
return true;
}
else {
if (!document.formvalidator.isValid(f)) {
var msg = "<?php echo JText::_('PLG_BYORDER_VALIDATION_MSG'); ?>";
alert(msg);

return false;
}
return false;
return true;
}



</script>
<div class="tjcpg-wrapper">
<form action="<?php echo $vars->url; ?>" name="adminForm" id="adminForm" onSubmit="return myValidate(this);" class="form-validate form-horizontal" method="post">
Expand Down Expand Up @@ -64,6 +59,7 @@ function myValidate(f)
<input type='hidden' name='return' value="<?php echo $vars->return;?>" >
<input type="hidden" name="plugin_payment_method" value="onsite" />
<input type='submit' name='btn_check' id='btn_check' class="btn btn-success btn-large" value="<?php echo JText::_('SUBMIT'); ?>">
<?php echo JHtml::_('form.token'); ?>
</div>

</div>
Expand Down
14 changes: 5 additions & 9 deletions code/plugins/byorder/byorder/tmpl/default_bs3.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,14 @@
<script type="text/javascript">
function myValidate(f)
{
if (document.formvalidator.isValid(f)) {
f.check.value='<?php echo JSession::getFormToken(); ?>';
return true;
}
else {
if (!document.formvalidator.isValid(f)) {
var msg = "<?php echo JText::_('PLG_BYORDER_VALIDATION_MSG'); ?>";
alert(msg);

return false;
}
return false;
return true;
}



</script>
<div class="tjcpg-wrapper">
<form action="<?php echo $vars->url; ?>" name="adminForm" id="adminForm" onSubmit="return myValidate(this);" class="form-validate form-horizontal" method="post">
Expand Down Expand Up @@ -64,6 +59,7 @@ function myValidate(f)
<input type='hidden' name='return' value="<?php echo $vars->return;?>" >
<input type="hidden" name="plugin_payment_method" value="onsite" />
<input type='submit' name='btn_check' id='btn_check' class="btn btn-success btn-large" value="<?php echo JText::_('SUBMIT'); ?>">
<?php echo JHtml::_('form.token'); ?>
</div>

</div>
Expand Down