From 86b02bc17bc31faf4628f1328acca6d5dc0a0e98 Mon Sep 17 00:00:00 2001
From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com>
Date: Thu, 1 Sep 2022 18:03:34 +0200
Subject: [PATCH] Update new.php
---
htdocs/public/members/new.php | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php
index c409703862c..6b8616ab777 100644
--- a/htdocs/public/members/new.php
+++ b/htdocs/public/members/new.php
@@ -62,6 +62,8 @@ if (is_numeric($entity)) {
define("DOLENTITY", $entity);
}
+
+// Load Dolibarr environment
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
@@ -437,10 +439,11 @@ if (empty($reshook) && $action == 'add') {
// Action called after a submitted was send and member created successfully
// If MEMBER_URL_REDIRECT_SUBSCRIPTION is set to url we never go here because a redirect was done to this url.
// backtopage parameter with an url was set on member submit page, we never go here because a redirect was done to this url.
+
if (empty($reshook) && $action == 'added') {
llxHeaderVierge($langs->trans("NewMemberForm"));
- // Si on a pas ete redirige
+ // If we have not been redirected
print '
';
print '
';
print $langs->trans("NewMemberbyWeb");
@@ -556,42 +559,51 @@ if (!empty($conf->global->MEMBER_SKIP_TABLE) || !empty($conf->global->MEMBER_NEW
print '';
}
- // Company
+ // Company // TODO : optional hide
print '
'."\n";
+
// Other attributes
$tpl_context = 'public'; // define template context to public
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
+
// Comments
print '
';
print '
'.$langs->trans("Comments").'
';
@@ -733,7 +750,7 @@ if (!empty($conf->global->MEMBER_SKIP_TABLE) || !empty($conf->global->MEMBER_NEW
print dol_get_fiche_end();
- // Save
+ // Save / Submit
print '
';
print '';
if (!empty($backtopage)) {
@@ -746,6 +763,7 @@ if (!empty($conf->global->MEMBER_SKIP_TABLE) || !empty($conf->global->MEMBER_NEW
print " ";
print '
';
} else { // Show the table of membership types
+
// Get units
$measuringUnits = new CUnits($db);
$result = $measuringUnits->fetchAll('', '', 0, 0, array('t.active' => 1));