Translate submit form
This commit is contained in:
parent
f439b8263e
commit
6582b4df4a
@ -22,7 +22,7 @@
|
|||||||
* \file htdocs/public/members/new.php
|
* \file htdocs/public/members/new.php
|
||||||
* \ingroup member
|
* \ingroup member
|
||||||
* \brief Example of form to add a new member
|
* \brief Example of form to add a new member
|
||||||
* \version $Id: new.php,v 1.37 2011/07/03 18:30:48 eldy Exp $
|
* \version $Id: new.php,v 1.38 2011/07/05 08:29:53 eldy Exp $
|
||||||
*
|
*
|
||||||
* Note that you can add following constant to change behaviour of page
|
* Note that you can add following constant to change behaviour of page
|
||||||
* MEMBER_NEWFORM_AMOUNT Default amount for autosubscribe form
|
* MEMBER_NEWFORM_AMOUNT Default amount for autosubscribe form
|
||||||
@ -64,7 +64,7 @@ if (empty($conf->adherent->enabled)) accessforbidden('',1,1,1);
|
|||||||
|
|
||||||
if (empty($conf->global->MEMBER_ENABLE_PUBLIC))
|
if (empty($conf->global->MEMBER_ENABLE_PUBLIC))
|
||||||
{
|
{
|
||||||
print $langs->trans("Auto subscription form for public visitors has no be enabled");
|
print $langs->trans("Auto subscription form for public visitors has no been enabled");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,11 +236,13 @@ if ($action == 'add')
|
|||||||
{
|
{
|
||||||
$urlback=DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?source=membersubscription&ref='.$adh->ref;
|
$urlback=DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?source=membersubscription&ref='.$adh->ref;
|
||||||
if (price2num(GETPOST('amount'))) $urlback.='&amount='.price2num(GETPOST('amount'));
|
if (price2num(GETPOST('amount'))) $urlback.='&amount='.price2num(GETPOST('amount'));
|
||||||
|
if (GETPOST('email')) $urlback.='&email='.urlencode(GETPOST('email'));
|
||||||
}
|
}
|
||||||
else if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paypal')
|
else if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paypal')
|
||||||
{
|
{
|
||||||
$urlback=DOL_MAIN_URL_ROOT.'/public/paypal/newpayment.php?source=membersubscription&ref='.$adh->ref;
|
$urlback=DOL_MAIN_URL_ROOT.'/public/paypal/newpayment.php?source=membersubscription&ref='.$adh->ref;
|
||||||
if (price2num(GETPOST('amount'))) $urlback.='&amount='.price2num(GETPOST('amount'));
|
if (price2num(GETPOST('amount'))) $urlback.='&amount='.price2num(GETPOST('amount'));
|
||||||
|
if (GETPOST('email')) $urlback.='&email='.urlencode(GETPOST('email'));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -273,7 +275,7 @@ if ($action == 'added')
|
|||||||
print $langs->trans("NewMemberbyWeb");
|
print $langs->trans("NewMemberbyWeb");
|
||||||
print '</center>';
|
print '</center>';
|
||||||
|
|
||||||
llxFooterVierge('$Date: 2011/07/03 18:30:48 $ - $Revision: 1.37 $');
|
llxFooterVierge('$Date: 2011/07/05 08:29:53 $ - $Revision: 1.38 $');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -356,7 +358,7 @@ $morphys["phy"] = $langs->trans("Physical");
|
|||||||
$morphys["mor"] = $langs->trans("Moral");
|
$morphys["mor"] = $langs->trans("Moral");
|
||||||
if (empty($conf->global->MEMBER_NEWFORM_FORCEMORPHY))
|
if (empty($conf->global->MEMBER_NEWFORM_FORCEMORPHY))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("MorPhy").' <FONT COLOR="red">*</FONT></td><td>'."\n";
|
print '<tr class="morphy"><td>'.$langs->trans("MorPhy").' <FONT COLOR="red">*</FONT></td><td>'."\n";
|
||||||
print $html->selectarray("morphy", $morphys, GETPOST('morphy'), 1);
|
print $html->selectarray("morphy", $morphys, GETPOST('morphy'), 1);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
@ -450,6 +452,7 @@ if (! empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER))
|
|||||||
print '<script type="text/javascript">
|
print '<script type="text/javascript">
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
initturnover();
|
initturnover();
|
||||||
|
jQuery(".morphy").hide();
|
||||||
jQuery("#morphy").click(function() {
|
jQuery("#morphy").click(function() {
|
||||||
initturnover();
|
initturnover();
|
||||||
});
|
});
|
||||||
@ -520,5 +523,5 @@ print "<br></form>\n";
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooterVierge('$Date: 2011/07/03 18:30:48 $ - $Revision: 1.37 $');
|
llxFooterVierge('$Date: 2011/07/05 08:29:53 $ - $Revision: 1.38 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -23,7 +23,7 @@
|
|||||||
* \ingroup paybox
|
* \ingroup paybox
|
||||||
* \brief File to offer a way to make a payment for a particular Dolibarr entity
|
* \brief File to offer a way to make a payment for a particular Dolibarr entity
|
||||||
* \author Laurent Destailleur
|
* \author Laurent Destailleur
|
||||||
* \version $Id$
|
* \version $Id: newpayment.php,v 1.56 2011/07/05 08:29:53 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define("NOLOGIN",1); // This means this output page does not require to be logged.
|
define("NOLOGIN",1); // This means this output page does not require to be logged.
|
||||||
@ -105,19 +105,19 @@ $urlko=preg_replace('/&$/','',$urlko); // Remove last &
|
|||||||
if (GETPOST("action") == 'dopayment')
|
if (GETPOST("action") == 'dopayment')
|
||||||
{
|
{
|
||||||
$PRICE=price2num(GETPOST("newamount"),'MT');
|
$PRICE=price2num(GETPOST("newamount"),'MT');
|
||||||
$EMAIL=GETPOST("EMAIL");
|
$email=GETPOST("email");
|
||||||
|
|
||||||
$mesg='';
|
$mesg='';
|
||||||
if (empty($PRICE) || ! is_numeric($PRICE)) $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Amount"));
|
if (empty($PRICE) || ! is_numeric($PRICE)) $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Amount"));
|
||||||
elseif (empty($EMAIL)) $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("YourEMail"));
|
elseif (empty($email)) $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("YourEMail"));
|
||||||
elseif (! isValidEMail($EMAIL)) $mesg=$langs->trans("ErrorBadEMail",$EMAIL);
|
elseif (! isValidEMail($email)) $mesg=$langs->trans("ErrorBadEMail",$email);
|
||||||
elseif (empty($FULLTAG)) $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("PaymentCode"));
|
elseif (empty($FULLTAG)) $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("PaymentCode"));
|
||||||
|
|
||||||
if (empty($mesg))
|
if (empty($mesg))
|
||||||
{
|
{
|
||||||
dol_syslog("newpayment.php call paybox api and do redirect", LOG_DEBUG);
|
dol_syslog("newpayment.php call paybox api and do redirect", LOG_DEBUG);
|
||||||
|
|
||||||
print_paybox_redirect($PRICE, $conf->monnaie, $EMAIL, $urlok, $urlko, $FULLTAG);
|
print_paybox_redirect($PRICE, $conf->monnaie, $email, $urlok, $urlko, $FULLTAG);
|
||||||
|
|
||||||
session_destroy();
|
session_destroy();
|
||||||
exit;
|
exit;
|
||||||
@ -243,7 +243,7 @@ if (! GETPOST("source"))
|
|||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr><td class="CTableRow'.($var?'1':'2').'">'.$langs->trans("YourEMail");
|
print '<tr><td class="CTableRow'.($var?'1':'2').'">'.$langs->trans("YourEMail");
|
||||||
print ' ('.$langs->trans("ToComplete").')';
|
print ' ('.$langs->trans("ToComplete").')';
|
||||||
print '</td><td class="CTableRow'.($var?'1':'2').'"><input class="flat" type="text" name="EMAIL" size="48" value="'.GETPOST("EMAIL").'"></td></tr>'."\n";
|
print '</td><td class="CTableRow'.($var?'1':'2').'"><input class="flat" type="text" name="email" size="48" value="'.GETPOST("email").'"></td></tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -325,8 +325,8 @@ if (GETPOST("source") == 'order')
|
|||||||
print '<tr><td class="CTableRow'.($var?'1':'2').'">'.$langs->trans("YourEMail");
|
print '<tr><td class="CTableRow'.($var?'1':'2').'">'.$langs->trans("YourEMail");
|
||||||
print ' ('.$langs->trans("ToComplete").')';
|
print ' ('.$langs->trans("ToComplete").')';
|
||||||
$email=$order->client->email;
|
$email=$order->client->email;
|
||||||
$email=(GETPOST("EMAIL")?GETPOST("EMAIL"):(isValidEmail($email)?$email:''));
|
$email=(GETPOST("email")?GETPOST("email"):(isValidEmail($email)?$email:''));
|
||||||
print '</td><td class="CTableRow'.($var?'1':'2').'"><input class="flat" type="text" name="EMAIL" size="48" value="'.$email.'"></td></tr>'."\n";
|
print '</td><td class="CTableRow'.($var?'1':'2').'"><input class="flat" type="text" name="email" size="48" value="'.$email.'"></td></tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -408,8 +408,8 @@ if (GETPOST("source") == 'invoice')
|
|||||||
print '<tr><td class="CTableRow'.($var?'1':'2').'">'.$langs->trans("YourEMail");
|
print '<tr><td class="CTableRow'.($var?'1':'2').'">'.$langs->trans("YourEMail");
|
||||||
print ' ('.$langs->trans("ToComplete").')';
|
print ' ('.$langs->trans("ToComplete").')';
|
||||||
$email=$invoice->client->email;
|
$email=$invoice->client->email;
|
||||||
$email=(GETPOST("EMAIL")?GETPOST("EMAIL"):(isValidEmail($email)?$email:''));
|
$email=(GETPOST("email")?GETPOST("email"):(isValidEmail($email)?$email:''));
|
||||||
print '</td><td class="CTableRow'.($var?'1':'2').'"><input class="flat" type="text" name="EMAIL" size="48" value="'.$email.'"></td></tr>'."\n";
|
print '</td><td class="CTableRow'.($var?'1':'2').'"><input class="flat" type="text" name="email" size="48" value="'.$email.'"></td></tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Payment on contract line
|
// Payment on contract line
|
||||||
@ -579,8 +579,8 @@ if (GETPOST("source") == 'contractline')
|
|||||||
print '<tr><td class="CTableRow'.($var?'1':'2').'">'.$langs->trans("YourEMail");
|
print '<tr><td class="CTableRow'.($var?'1':'2').'">'.$langs->trans("YourEMail");
|
||||||
print ' ('.$langs->trans("ToComplete").')';
|
print ' ('.$langs->trans("ToComplete").')';
|
||||||
$email=$contract->client->email;
|
$email=$contract->client->email;
|
||||||
$email=(GETPOST("EMAIL")?GETPOST("EMAIL"):(isValidEmail($email)?$email:''));
|
$email=(GETPOST("email")?GETPOST("email"):(isValidEmail($email)?$email:''));
|
||||||
print '</td><td class="CTableRow'.($var?'1':'2').'"><input class="flat" type="text" name="EMAIL" size="48" value="'.$email.'"></td></tr>'."\n";
|
print '</td><td class="CTableRow'.($var?'1':'2').'"><input class="flat" type="text" name="email" size="48" value="'.$email.'"></td></tr>'."\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -680,8 +680,8 @@ if (GETPOST("source") == 'membersubscription')
|
|||||||
print '<tr><td class="CTableRow'.($var?'1':'2').'">'.$langs->trans("YourEMail");
|
print '<tr><td class="CTableRow'.($var?'1':'2').'">'.$langs->trans("YourEMail");
|
||||||
print ' ('.$langs->trans("ToComplete").')';
|
print ' ('.$langs->trans("ToComplete").')';
|
||||||
$email=$member->client->email;
|
$email=$member->client->email;
|
||||||
$email=(GETPOST("EMAIL")?GETPOST("EMAIL"):(isValidEmail($email)?$email:''));
|
$email=(GETPOST("email")?GETPOST("email"):(isValidEmail($email)?$email:''));
|
||||||
print '</td><td class="CTableRow'.($var?'1':'2').'"><input class="flat" type="text" name="EMAIL" size="48" value="'.$email.'"></td></tr>'."\n";
|
print '</td><td class="CTableRow'.($var?'1':'2').'"><input class="flat" type="text" name="email" size="48" value="'.$email.'"></td></tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -716,5 +716,5 @@ html_print_paybox_footer($mysoc,$langs);
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooterPayBox('$Date$ - $Revision$');
|
llxFooterPayBox('$Date: 2011/07/05 08:29:53 $ - $Revision: 1.56 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user