Debug v20: Encapsulate the feature using leaflet/geophp into a constant

MAIN_USE_GEOPHP. Fix webportal module.
This commit is contained in:
Laurent Destailleur 2024-05-03 02:39:35 +02:00
parent 8578137703
commit 0b9bd5408b
90 changed files with 150 additions and 386 deletions

View File

@ -36,11 +36,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -39,11 +39,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -43,11 +43,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -40,11 +40,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array();
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -45,11 +45,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -46,11 +46,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -46,11 +46,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -46,11 +46,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -33,11 +33,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -36,11 +36,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -45,11 +45,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -46,11 +46,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -42,11 +42,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -42,11 +42,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -39,11 +39,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -43,11 +43,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -44,11 +44,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -48,11 +48,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->trans($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -48,11 +48,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->trans($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -42,11 +42,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -43,11 +43,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -44,11 +44,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -45,11 +45,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -46,11 +46,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -43,11 +43,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -44,11 +44,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -34,11 +34,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->trans($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -39,11 +39,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -39,11 +39,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -39,11 +39,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -40,11 +40,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -36,11 +36,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -36,11 +36,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -39,11 +39,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -37,11 +37,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -39,11 +39,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -39,11 +39,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -2564,6 +2564,31 @@ class ExtraFields
return 0;
}
/**
* Return array with all possible types and label of extrafields
*
* @return string[]
*/
public static function getListofTypesLabels()
{
global $langs;
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
if (!getDolGlobalString('MAIN_USE_GEOPHP')) {
unset($type2label['point']);
unset($type2label['multipts']);
unset($type2label['linestrg']);
unset($type2label['polygon']);
}
return $type2label;
}
/**
* Return if a value is "empty" for a mandatory vision.
*

View File

@ -34,11 +34,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
// Get Parameters
$action = GETPOST('action', 'aZ09');

View File

@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
// Get Parameters
$action = GETPOST('action', 'aZ09');

View File

@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -1171,7 +1171,7 @@ OutOfDate=Out-of-date
EventReminder=Event Reminder
UpdateForAllLines=Update for all lines
OnHold=On hold
Civility=Civility
Civility=Title of courtesy
AffectTag=Assign a Tag
AffectUser=Assign a User
SetSupervisor=Set the supervisor

View File

@ -200,8 +200,8 @@ MembersStatisticsDesc=Choose statistics you want to read...
MenuMembersStats=Statistics
LastMemberDate=Latest membership date
LatestSubscriptionDate=Latest contribution date
MemberNature=Nature of the member
MembersNature=Nature of the members
MemberNature=Nature member
MembersNature=Nature of members
Public=%s can publish my membership in <a target="_blank" href="%s">the public register</a>
MembershipPublic=Public membership
NewMemberbyWeb=New member added. Awaiting approval
@ -246,4 +246,4 @@ XSubsriptionCreated=%s subscription(s) created
XSubsriptionErrors=%s subscription(s) where in error
CreateSubscription=Create subscription
WarningNoComplementaryActionDone=No Complementary action on recording will be executed with this massaction
NewMembership=New membership
NewMembership=New membership

View File

@ -188,20 +188,20 @@ WebPortalUserLoggedHelp=This user is used to update cards
WebPortalHomeTitle=Welcome
WebPortalHomeDesc=Welcome to the public interface
WebPortalPropalListMenu=Proposals
WebPortalPropalListTitle=List of proposals
WebPortalPropalListDesc=List of proposals
WebPortalPropalListTitle=Proposals
WebPortalPropalListDesc=You will find here all your proposals
WebPortalPropalListNothing=Proposals not found
WebPortalOrderListMenu=Orders
WebPortalOrderListTitle=List of orders
WebPortalOrderListDesc=List of orders
WebPortalOrderListMenu=Sales Orders
WebPortalOrderListTitle=Sales orders
WebPortalOrderListDesc=You will find here all your sales orders
WebPortalOrderListNothing=Orders not found
WebPortalInvoiceListMenu=Invoices
WebPortalInvoiceListTitle=List of invoices
WebPortalInvoiceListDesc=List of invoices
WebPortalInvoiceListTitle=Invoices
WebPortalInvoiceListDesc=You will find here all your invoices
WebPortalInvoiceListNothing=Invoices not found
WebPortalMemberCardMenu=Member
WebPortalMemberCardTitle=Member card
WebPortalMemberCardDesc=Member card
WebPortalMemberCardDesc=This is information related to your membership
WebPortalPartnershipCardMenu=Partnership
WebPortalPartnershipCardTitle=Partnership card
WebPortalPartnershipCardDesc=Partnership card

View File

@ -1936,8 +1936,10 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
}
// LEAFLET AND GEOMAN
print '<link rel="stylesheet" href="'.DOL_URL_ROOT.'/includes/leaflet/leaflet.css'.($ext ? '?'.$ext : '')."\">\n";
print '<link rel="stylesheet" href="'.DOL_URL_ROOT.'/includes/leaflet/leaflet-geoman.css'.($ext ? '?'.$ext : '')."\">\n";
if (!getDolGlobalString('MAIN_ALLOW_GEOPHP')) {
print '<link rel="stylesheet" href="'.DOL_URL_ROOT.'/includes/leaflet/leaflet.css'.($ext ? '?'.$ext : '')."\">\n";
print '<link rel="stylesheet" href="'.DOL_URL_ROOT.'/includes/leaflet/leaflet-geoman.css'.($ext ? '?'.$ext : '')."\">\n";
}
// CSS forced by modules (relative url starting with /)
if (!empty($conf->modules_parts['css'])) {
@ -2094,8 +2096,10 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
print '<script nonce="'.getNonce().'" src="'.DOL_URL_ROOT.'/core/js/lib_head.js.php?lang='.$langs->defaultlang.($ext ? '&amp;'.$ext : '').'"></script>'."\n";
// Leaflet TODO use dolibarr files
print '<script nonce="'.getNonce().'" src="'.DOL_URL_ROOT.'/includes/leaflet/leaflet.js'.($ext ? '?'.$ext : '').'"></script>'."\n";
print '<script nonce="'.getNonce().'" src="'.DOL_URL_ROOT.'/includes/leaflet/leaflet-geoman.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n";
if (!getDolGlobalString('MAIN_ALLOW_GEOPHP')) {
print '<script nonce="'.getNonce().'" src="'.DOL_URL_ROOT.'/includes/leaflet/leaflet.js'.($ext ? '?'.$ext : '').'"></script>'."\n";
print '<script nonce="'.getNonce().'" src="'.DOL_URL_ROOT.'/includes/leaflet/leaflet-geoman.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n";
}
// JS forced by modules (relative url starting with /)
if (!empty($conf->modules_parts['js'])) { // $conf->modules_parts['js'] is array('module'=>array('file1','file2'))

View File

@ -65,11 +65,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -41,11 +41,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -37,11 +37,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -37,11 +37,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -36,11 +36,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -37,11 +37,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -32,9 +32,9 @@ include 'webportal.main.inc.php';
* Action
*/
$context->controllerInstance->action();
/*
* View
*/

View File

@ -1,3 +1,4 @@
<!-- file 404.tpl.php -->
<?php
// Protection to avoid direct call of template
if (empty($context) || !is_object($context)) {

View File

@ -1,3 +1,4 @@
<!-- file errors.tpl.php -->
<?php
// Protection to avoid direct call of template
if (empty($context) || !is_object($context)) {

View File

@ -1,3 +1,4 @@
<!-- file footer.tpl.php -->
<?php
// Protection to avoid direct call of template
if (empty($context) || !is_object($context)) {

View File

@ -1,3 +1,4 @@
<!-- file header.tpl.php -->
<?php
// Protection to avoid direct call of template
if (empty($context) || !is_object($context)) {

View File

@ -1,3 +1,4 @@
<!-- file header_login.tpl.php -->
<?php
// Protection to avoid direct call of template
if (empty($context) || !is_object($context)) {

View File

@ -1,6 +1,7 @@
<!-- file hero-header-banner.tpl.php -->
<section class="hero-header" <?php print !empty($context->theme->bannerUseDarkTheme) ? ' data-theme="dark" ': '' ?> >
<div class="container">
<h1 class="hero-header__title"><?php print $context->title; ?></h1>
<div class="hero-header__desc"><?php print $context->desc; ?></div>
</div>
</section>
</section>

View File

@ -1,3 +1,4 @@
<!-- file home.tpl.php -->
<?php
// Protection to avoid direct call of template
if (empty($context) || !is_object($context)) {

View File

@ -1,3 +1,4 @@
<!-- file login.tpl.php -->
<?php
// Protection to avoid direct call of template
if (empty($context) || !is_object($context)) {

View File

@ -1,3 +1,4 @@
<!-- file menu.tpl.php -->
<?php
// Protection to avoid direct call of template
if (empty($context) || !is_object($context)) {

View File

@ -33,11 +33,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -33,11 +33,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -35,11 +35,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -35,11 +35,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -35,11 +35,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -30,11 +30,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -37,11 +37,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -36,11 +36,7 @@ $extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$type2label = ExtraFields::getListOfTypesLabels();
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');

View File

@ -210,7 +210,7 @@ class Context
*/
public function initController()
{
global $db, $conf, $langs;
global $db;
$defaultControllersPath = __DIR__ . '/../controllers/';

View File

@ -466,7 +466,7 @@ class FormCardWebPortal
// main information - begin
$html .= '<div class="header-card-main-information">';
// ref
$html .= '<div><strong>' . $object->ref . '</strong></div>';
$html .= '<div><strong>' . $langs->trans("Ref").' : '.dol_escape_htmltag($object->ref) . '</strong></div>';
// full name
$fullname = '';
if (method_exists($object, 'getFullName')) {
@ -737,7 +737,7 @@ class FormCardWebPortal
{
global $hookmanager, $langs;
$html = '';
$html = '<!-- elementCard -->';
// initialize
$action = $this->action;

View File

@ -286,6 +286,8 @@ class FormListWebPortal
$sortorder = 'DESC';
}
$socid = (int) $context->logged_thirdparty->id;
// Build and execute select
// --------------------------------------------------------------------
$sql = "SELECT ";
@ -310,7 +312,8 @@ class FormListWebPortal
$sql .= " WHERE 1 = 1";
}
// filter on logged third-party
$sql .= " AND t.fk_soc = " . (int) $context->logged_thirdparty->id;
$sql .= " AND t.fk_soc = " . $socid;
foreach ($search as $key => $val) {
if (array_key_exists($key, $object->fields)) {
if (($key == 'status' || $key == 'fk_statut') && $search[$key] == $emptyValueKey) {
@ -562,6 +565,16 @@ class FormListWebPortal
$html .= '</thead>';
$html .= '<tbody>';
// Store company
$idCompany = (int) $socid;
if (!isset($this->companyStaticList[$socid])) {
$companyStatic = new Societe($this->db);
$companyStatic->fetch($idCompany);
$this->companyStaticList[$idCompany] = $companyStatic;
}
$companyStatic = $this->companyStaticList[$socid];
// Loop on record
// --------------------------------------------------------------------
$i = 0;
@ -580,15 +593,6 @@ class FormListWebPortal
// specific to get invoice status (depends on payment)
$payment = -1;
if ($elementEn == 'invoice') {
// store company
$idCompany = (int) $obj->fk_soc;
if (!isset($this->companyStaticList[$obj->fk_soc])) {
$companyStatic = new Societe($this->db);
$companyStatic->fetch($idCompany);
$this->companyStaticList[$idCompany] = $companyStatic;
}
$companyStatic = $this->companyStaticList[$obj->fk_soc];
// paid sum
$payment = $object->getSommePaiement();
$totalcreditnotes = $object->getSumCreditNotesUsed();

View File

@ -961,13 +961,14 @@ class FormWebPortal extends Form
$label = empty($val['label']) ? '' : $val['label'];
$type = empty($val['type']) ? '' : $val['type'];
$size = empty($val['css']) ? '' : $val['css'];
$css = empty($val['css']) ? '' : $val['css'];
$picto = empty($val['picto']) ? '' : $val['picto'];
$reg = array();
// Convert var to be able to share same code than showOutputField of extrafields
if (preg_match('/varchar\((\d+)\)/', $type, $reg)) {
$type = 'varchar'; // convert varchar(xx) int varchar
$size = $reg[1];
$css = $reg[1];
} elseif (preg_match('/varchar/', $type)) {
$type = 'varchar'; // convert varchar(xx) int varchar
}

View File

@ -132,17 +132,18 @@ class WebPortalMember extends Adherent
'phone' => array('type' => 'varchar(30)', 'label' => 'Phone', 'enabled' => 1, 'visible' => 4, 'position' => 115, 'showonheader' => 1,),
'phone_perso' => array('type' => 'varchar(30)', 'label' => 'Phone perso', 'enabled' => 1, 'visible' => 4, 'position' => 120, 'showonheader' => 1,),
'phone_mobile' => array('type' => 'varchar(30)', 'label' => 'Phone mobile', 'enabled' => 1, 'visible' => 4, 'position' => 125, 'showonheader' => 1,),
'email' => array('type' => 'varchar(255)', 'label' => 'Email', 'enabled' => 1, 'visible' => 4, 'position' => 200, 'showonheader' => 1,),
'email' => array('type' => 'varchar(255)', 'label' => 'Email', 'enabled' => 1, 'visible' => 4, 'position' => 200, 'showonheader' => 1, 'picto' => 'email'),
'url' => array('type' => 'varchar(255)', 'label' => 'Url', 'enabled' => 1, 'visible' => 4, 'position' => 210, 'showonheader' => 1,),
'login' => array('type' => 'varchar(50)', 'label' => 'Login', 'enabled' => 1, 'visible' => 4, 'position' => 240,),
'typeid' => array('type' => 'integer:AdherentType:adherents/class/adherent_type.class.php', 'label' => 'Type', 'enabled' => 1, 'visible' => 4, 'notnull' => 1, 'position' => 255),
'typeid' => array('type' => 'integer:AdherentType:adherents/class/adherent_type.class.php', 'label' => 'MemberType', 'enabled' => 1, 'visible' => 4, 'notnull' => 1, 'position' => 255),
'morphy' => array('type' => 'varchar(3)', 'label' => 'MemberNature', 'enabled' => 1, 'visible' => 4, 'notnull' => 1, 'position' => 260, 'arrayofkeyval' => self::MORPHY_LIST,),
'civility_id' => array('type' => 'sellist:c_civility:label:rowid::active=1', 'label' => 'Civility', 'enabled' => 1, 'visible' => 4, 'position' => 270,),
'datefin' => array('type' => 'date', 'label' => 'SubscriptionEndDate', 'enabled' => 1, 'visible' => 5, 'position' => 280,),
'birth' => array('type' => 'date', 'label' => 'DateOfBirth', 'enabled' => 1, 'visible' => 4, 'position' => 290,),
'fk_soc' => array('type' => 'integer:Societe:societe/class/societe.class.php', 'label' => 'ThirdParty', 'enabled' => 1, 'visible' => 5, 'position' => 300,),
'datefin' => array('type' => 'date', 'label' => 'SubscriptionEndDate', 'enabled' => 1, 'visible' => 5, 'position' => 400,),
'status' => array('type' => 'smallint(6)', 'label' => 'Status', 'enabled' => 1, 'visible' => 5, 'notnull' => 1, 'position' => 500, 'arrayofkeyval' => self::STATUS_SHORT_LIST, 'showonheader' => 1,),
);
public $rowid;