Work on specific code to allow online subscription
This commit is contained in:
parent
b127343fca
commit
448c934596
@ -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.33 2011/07/03 17:24:54 eldy Exp $
|
* \version $Id: new.php,v 1.34 2011/07/03 17:38:52 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
|
||||||
@ -273,7 +273,7 @@ if ($action == 'added')
|
|||||||
print $langs->trans("NewMemberbyWeb");
|
print $langs->trans("NewMemberbyWeb");
|
||||||
print '</center>';
|
print '</center>';
|
||||||
|
|
||||||
llxFooterVierge('$Date: 2011/07/03 17:24:54 $ - $Revision: 1.33 $');
|
llxFooterVierge('$Date: 2011/07/03 17:38:52 $ - $Revision: 1.34 $');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -451,19 +451,20 @@ if (! empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER))
|
|||||||
initturnover();
|
initturnover();
|
||||||
});
|
});
|
||||||
jQuery("#budget").change(function() {
|
jQuery("#budget").change(function() {
|
||||||
if (jQuery("#budget").val() > 0) { jQuery("#amount").val(jQuery("#budget").val()); }
|
if (jQuery("#budget").val() > 0) { jQuery(".amount").val(jQuery("#budget").val()); }
|
||||||
else { jQuery("#budget").val(\'\'); }
|
else { jQuery("#budget").val(\'\'); }
|
||||||
});
|
});
|
||||||
function initturnover() {
|
function initturnover() {
|
||||||
if (jQuery("#morphy").val()==\'phy\') {
|
if (jQuery("#morphy").val()==\'phy\') {
|
||||||
jQuery("#amount").val(20);
|
jQuery(".amount").val(20);
|
||||||
jQuery("#trbudget").hide();
|
jQuery("#trbudget").hide();
|
||||||
jQuery("#trcompany").hide();
|
jQuery("#trcompany").hide();
|
||||||
}
|
}
|
||||||
if (jQuery("#morphy").val()==\'mor\') {
|
if (jQuery("#morphy").val()==\'mor\') {
|
||||||
|
jQuery(".amount").val(\'\');
|
||||||
jQuery("#trbudget").show();
|
jQuery("#trbudget").show();
|
||||||
jQuery("#trcompany").show();
|
jQuery("#trcompany").show();
|
||||||
if (jQuery("#budget").val() > 0) { jQuery("#amount").val(jQuery("#budget").val()); }
|
if (jQuery("#budget").val() > 0) { jQuery(".amount").val(jQuery("#budget").val()); }
|
||||||
else { jQuery("#budget").val(\'\'); }
|
else { jQuery("#budget").val(\'\'); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -481,15 +482,15 @@ if (! empty($conf->global->MEMBER_NEWFORM_AMOUNT)
|
|||||||
$amount=GETPOST('amount')?GETPOST('amount'):$conf->global->MEMBER_NEWFORM_AMOUNT;
|
$amount=GETPOST('amount')?GETPOST('amount'):$conf->global->MEMBER_NEWFORM_AMOUNT;
|
||||||
}
|
}
|
||||||
// $conf->global->MEMBER_NEWFORM_PAYONLINE is 'paypal' or 'paybox'
|
// $conf->global->MEMBER_NEWFORM_PAYONLINE is 'paypal' or 'paybox'
|
||||||
print '<tr><td>'.$langs->trans("Subscription").'</td><td>';
|
print '<tr><td>'.$langs->trans("Subscription").'</td><td nowrap="nowrap">';
|
||||||
if (! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT))
|
if (! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT))
|
||||||
{
|
{
|
||||||
print '<input type="text" name="amount" id="amount" class="flat" size="6" value="'.$amount.'">';
|
print '<input type="text" name="amount" id="amount" class="flat amount" size="6" value="'.$amount.'">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $amount;
|
print '<input type="text" name="amount" id="amounthidden" class="flat amount" disabled="disabled" size="6" value="'.$amount.'">';
|
||||||
print '<input type="hidden" name="amount" id="amount" class="flat" size="6" value="'.$amount.'">';
|
print '<input type="hidden" name="amount" id="amount" class="flat amount" size="6" value="'.$amount.'">';
|
||||||
}
|
}
|
||||||
print ' '.$langs->trans("Currency".$conf->monnaie);
|
print ' '.$langs->trans("Currency".$conf->monnaie);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -509,5 +510,5 @@ print "<br></form>\n";
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooterVierge('$Date: 2011/07/03 17:24:54 $ - $Revision: 1.33 $');
|
llxFooterVierge('$Date: 2011/07/03 17:38:52 $ - $Revision: 1.34 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user