Fix: Message for payment forms
This commit is contained in:
parent
40835a196e
commit
fb92986d65
@ -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.40 2011/07/13 10:22:54 eldy Exp $
|
* \version $Id: new.php,v 1.41 2011/07/13 11:14:43 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
|
||||||
@ -182,13 +182,18 @@ if ($action == 'add')
|
|||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$errmsg .= $langs->trans("ErrorBadDateFormat")."<br>\n";
|
$errmsg .= $langs->trans("ErrorBadDateFormat")."<br>\n";
|
||||||
}
|
}
|
||||||
if (isset($public))
|
if (! empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER))
|
||||||
{
|
{
|
||||||
$public=1;
|
if (GETPOST('budget') <= 0)
|
||||||
}else{
|
{
|
||||||
$public=0;
|
$error+=1;
|
||||||
|
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("TurnoverOrBudget"))."<br>\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($public)) $public=1;
|
||||||
|
else $public=0;
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
// email a peu pres correct et le login n'existe pas
|
// email a peu pres correct et le login n'existe pas
|
||||||
@ -232,20 +237,24 @@ if ($action == 'add')
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($backtopage) $urlback=$backtopage;
|
if ($backtopage) $urlback=$backtopage;
|
||||||
else if ($conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION) $urlback=$conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION;
|
else if ($conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION)
|
||||||
|
{
|
||||||
|
$urlback=$conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION;
|
||||||
|
// TODO Make replacement of __AMOUNT__, etc...
|
||||||
|
}
|
||||||
else $urlback=$_SERVER["PHP_SELF"]."?action=added";
|
else $urlback=$_SERVER["PHP_SELF"]."?action=added";
|
||||||
|
|
||||||
if (! empty($conf->global->MEMBER_NEWFORM_PAYONLINE))
|
if (! empty($conf->global->MEMBER_NEWFORM_PAYONLINE))
|
||||||
{
|
{
|
||||||
if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paybox')
|
if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paybox')
|
||||||
{
|
{
|
||||||
$urlback=DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?source=membersubscription&ref='.$adh->ref;
|
$urlback=DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?from=membernewform&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'));
|
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?from=membernewform&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'));
|
if (GETPOST('email')) $urlback.='&email='.urlencode(GETPOST('email'));
|
||||||
}
|
}
|
||||||
@ -280,7 +289,7 @@ if ($action == 'added')
|
|||||||
print $langs->trans("NewMemberbyWeb");
|
print $langs->trans("NewMemberbyWeb");
|
||||||
print '</center>';
|
print '</center>';
|
||||||
|
|
||||||
llxFooterVierge('$Date: 2011/07/13 10:22:54 $ - $Revision: 1.40 $');
|
llxFooterVierge('$Date: 2011/07/13 11:14:43 $ - $Revision: 1.41 $');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -450,7 +459,7 @@ print '</tr>'."\n";
|
|||||||
if (! empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER))
|
if (! empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER))
|
||||||
{
|
{
|
||||||
$arraybudget=array('50'=>'<= 100 000','100'=>'<= 200 000','200'=>'<= 500 000','400'=>'<= 1 500 000','750'=>'<= 3 000 000','1500'=>'<= 5 000 000','2000'=>'5 000 000+');
|
$arraybudget=array('50'=>'<= 100 000','100'=>'<= 200 000','200'=>'<= 500 000','400'=>'<= 1 500 000','750'=>'<= 3 000 000','1500'=>'<= 5 000 000','2000'=>'5 000 000+');
|
||||||
print '<tr id="trbudget" class="trcompany"><td>'.$langs->trans("TurnoverOrBudget").'</td><td>';
|
print '<tr id="trbudget" class="trcompany"><td>'.$langs->trans("TurnoverOrBudget").' <FONT COLOR="red">*</FONT></td><td>';
|
||||||
print $html->select_array('budget', $arraybudget, GETPOST('budget'), 1);
|
print $html->select_array('budget', $arraybudget, GETPOST('budget'), 1);
|
||||||
print ' € or $';
|
print ' € or $';
|
||||||
|
|
||||||
@ -528,5 +537,5 @@ print "<br></form>\n";
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooterVierge('$Date: 2011/07/13 10:22:54 $ - $Revision: 1.40 $');
|
llxFooterVierge('$Date: 2011/07/13 11:14:43 $ - $Revision: 1.41 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -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: newpayment.php,v 1.56 2011/07/05 08:29:53 eldy Exp $
|
* \version $Id: newpayment.php,v 1.57 2011/07/13 11:14:43 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.
|
||||||
@ -186,10 +186,17 @@ if ($urllogo)
|
|||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr><td align="center"><br>'.$langs->trans("WelcomeOnPaymentPage").'<br></td></tr>'."\n";
|
// Output introduction text
|
||||||
|
$text='';
|
||||||
print '<tr><td align="center"><br>'.$langs->trans("ThisScreenAllowsYouToPay",$creditor).'<br><br></td></tr>'."\n";
|
if (! empty($conf->global->PAYBOX_NEWMEMBER_TEXT)) $text.=$langs->trans($conf->global->PAYBOX_NEWMEMBER_TEXT)."<br>\n";
|
||||||
|
if (empty($text))
|
||||||
|
{
|
||||||
|
$text.='<tr><td align="center"><br>'.$langs->trans("WelcomeOnPaymentPage").'<br></td></tr>'."\n";
|
||||||
|
$text.='<tr><td align="center"><br>'.$langs->trans("ThisScreenAllowsYouToPay",$creditor).'<br><br></td></tr>'."\n";
|
||||||
|
}
|
||||||
|
print $text;
|
||||||
|
|
||||||
|
// Output payment summary form
|
||||||
print '<tr><td align="center">';
|
print '<tr><td align="center">';
|
||||||
print '<table with="100%">';
|
print '<table with="100%">';
|
||||||
print '<tr class="liste_total"><td align="left" colspan="2">'.$langs->trans("ThisIsInformationOnPayment").' :</td></tr>'."\n";
|
print '<tr class="liste_total"><td align="left" colspan="2">'.$langs->trans("ThisIsInformationOnPayment").' :</td></tr>'."\n";
|
||||||
@ -678,9 +685,9 @@ if (GETPOST("source") == 'membersubscription')
|
|||||||
// EMail
|
// EMail
|
||||||
$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").')';
|
|
||||||
$email=$member->client->email;
|
$email=$member->client->email;
|
||||||
$email=(GETPOST("email")?GETPOST("email"):(isValidEmail($email)?$email:''));
|
$email=(GETPOST("email")?GETPOST("email"):(isValidEmail($email)?$email:''));
|
||||||
|
if (empty($email)) print ' ('.$langs->trans("ToComplete").')';
|
||||||
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 +723,5 @@ html_print_paybox_footer($mysoc,$langs);
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooterPayBox('$Date: 2011/07/05 08:29:53 $ - $Revision: 1.56 $');
|
llxFooterPayBox('$Date: 2011/07/13 11:14:43 $ - $Revision: 1.57 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
* \ingroup paypal
|
* \ingroup paypal
|
||||||
* \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: newpayment.php,v 1.21 2011/06/26 12:34:54 eldy Exp $
|
* \version $Id: newpayment.php,v 1.22 2011/07/13 11:14:43 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.
|
||||||
@ -280,10 +280,17 @@ if ($urllogo)
|
|||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr><td align="center"><br>'.$langs->trans("WelcomeOnPaymentPage").'<br></td></tr>'."\n";
|
// Output introduction text
|
||||||
|
$text='';
|
||||||
print '<tr><td align="center"><br>'.$langs->trans("ThisScreenAllowsYouToPay",$creditor).'<br><br></td></tr>'."\n";
|
if (! empty($conf->global->PAYPAL_NEWMEMBER_TEXT)) $text.=$langs->trans($conf->global->PAYPAL_NEWMEMBER_TEXT)."<br>\n";
|
||||||
|
if (empty($text))
|
||||||
|
{
|
||||||
|
$text.='<tr><td align="center"><br>'.$langs->trans("WelcomeOnPaymentPage").'<br></td></tr>'."\n";
|
||||||
|
$text.='<tr><td align="center"><br>'.$langs->trans("ThisScreenAllowsYouToPay",$creditor).'<br><br></td></tr>'."\n";
|
||||||
|
}
|
||||||
|
print $text;
|
||||||
|
|
||||||
|
// Output payment summary form
|
||||||
print '<tr><td align="center">';
|
print '<tr><td align="center">';
|
||||||
print '<table with="100%">';
|
print '<table with="100%">';
|
||||||
print '<tr class="liste_total"><td align="left" colspan="2">'.$langs->trans("ThisIsInformationOnPayment").' :</td></tr>'."\n";
|
print '<tr class="liste_total"><td align="left" colspan="2">'.$langs->trans("ThisIsInformationOnPayment").' :</td></tr>'."\n";
|
||||||
@ -934,5 +941,5 @@ html_print_paypal_footer($mysoc,$langs);
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooterPaypal('$Date: 2011/06/26 12:34:54 $ - $Revision: 1.21 $');
|
llxFooterPaypal('$Date: 2011/07/13 11:14:43 $ - $Revision: 1.22 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user