From 743a9b2aaedfe6bf767764359bbd4a531622fbd0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 Jul 2011 17:38:52 +0000 Subject: [PATCH] Work on specific code to allow online subscription --- htdocs/public/members/new.php | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 3f9c8fc0b78..eb7f21783e4 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -22,7 +22,7 @@ * \file htdocs/public/members/new.php * \ingroup 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 * MEMBER_NEWFORM_AMOUNT Default amount for autosubscribe form @@ -273,7 +273,7 @@ if ($action == 'added') print $langs->trans("NewMemberbyWeb"); print ''; - llxFooterVierge('$Date: 2011/07/03 17:24:54 $ - $Revision: 1.33 $'); + llxFooterVierge('$Date: 2011/07/03 17:38:52 $ - $Revision: 1.34 $'); exit; } @@ -451,19 +451,20 @@ if (! empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER)) initturnover(); }); 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(\'\'); } }); function initturnover() { if (jQuery("#morphy").val()==\'phy\') { - jQuery("#amount").val(20); + jQuery(".amount").val(20); jQuery("#trbudget").hide(); jQuery("#trcompany").hide(); } if (jQuery("#morphy").val()==\'mor\') { + jQuery(".amount").val(\'\'); jQuery("#trbudget").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(\'\'); } } } @@ -481,15 +482,15 @@ if (! empty($conf->global->MEMBER_NEWFORM_AMOUNT) $amount=GETPOST('amount')?GETPOST('amount'):$conf->global->MEMBER_NEWFORM_AMOUNT; } // $conf->global->MEMBER_NEWFORM_PAYONLINE is 'paypal' or 'paybox' - print ''.$langs->trans("Subscription").''; + print ''.$langs->trans("Subscription").''; if (! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)) { - print ''; + print ''; } else { - print $amount; - print ''; + print ''; + print ''; } print ' '.$langs->trans("Currency".$conf->monnaie); print ''; @@ -509,5 +510,5 @@ print "
\n"; $db->close(); -llxFooterVierge('$Date: 2011/07/03 17:24:54 $ - $Revision: 1.33 $'); +llxFooterVierge('$Date: 2011/07/03 17:38:52 $ - $Revision: 1.34 $'); ?>