Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
e5fbcd66b8
34 changed files with 685 additions and 287 deletions
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2012-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -193,37 +193,37 @@ $getentity = ($conf->entity > 1 ? "&entity=".$conf->entity : "");
|
|||
// Show message
|
||||
$message = '';
|
||||
|
||||
$urlvcal = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...').'" target="_blank" rel="noopener noreferrer">';
|
||||
$urlvcal = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.$getentity.'&exportkey='.urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...')).'" target="_blank" rel="noopener noreferrer">';
|
||||
$urlvcal .= $urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : 'KEYNOTDEFINED').'</a>';
|
||||
$message .= img_picto('', 'globe').' '.str_replace('{url}', $urlvcal, '<span class="opacitymedium">'.$langs->trans("WebCalUrlForVCalExport", 'vcal', '').'</span>');
|
||||
$message .= '<div class="urllink">';
|
||||
$message .= '<input type="text" id="onlinepaymenturl1" class="quatrevingtpercent" spellcheck="false" value="'.$urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...').'">';
|
||||
$message .= '<input type="text" id="onlinepaymenturl1" class="quatrevingtpercent" spellcheck="false" value="'.$urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.$getentity.'&exportkey='.urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...')).'">';
|
||||
if (getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) {
|
||||
$message .= ' <a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...').'">'.img_picto('', 'download').'</a>';
|
||||
$message .= ' <a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.$getentity.'&exportkey='.urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...')).'">'.img_picto('', 'download').'</a>';
|
||||
}
|
||||
$message .= '</div>';
|
||||
$message .= ajax_autoselect('onlinepaymenturl1');
|
||||
$message .= '<br>';
|
||||
|
||||
$urlical = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical&type=event'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...').'" target="_blank" rel="noopener noreferrer">';
|
||||
$urlical = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical&type=event'.$getentity.'&exportkey='.urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...')).'" target="_blank" rel="noopener noreferrer">';
|
||||
$urlical .= $urlwithroot.'/public/agenda/agendaexport.php?format=ical&type=event'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : 'KEYNOTDEFINED').'</a>';
|
||||
$message .= img_picto('', 'globe').' '.str_replace('{url}', $urlical, '<span class="opacitymedium">'.$langs->trans("WebCalUrlForVCalExport", 'ical/ics', '').'</span>');
|
||||
$message .= '<div class="urllink">';
|
||||
$message .= '<input type="text" id="onlinepaymenturl2" class="quatrevingtpercent" spellcheck="false" value="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...').'">';
|
||||
$message .= '<input type="text" id="onlinepaymenturl2" class="quatrevingtpercent" spellcheck="false" value="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical'.$getentity.'&exportkey='.urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...')).'">';
|
||||
if (getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) {
|
||||
$message .= ' <a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...').'">'.img_picto('', 'download').'</a>';
|
||||
$message .= ' <a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical'.$getentity.'&exportkey='.urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...')).'">'.img_picto('', 'download').'</a>';
|
||||
}
|
||||
$message .= '</div>';
|
||||
$message .= ajax_autoselect('onlinepaymenturl2');
|
||||
$message .= '<br>';
|
||||
|
||||
$urlrss = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=rss'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...').'" target="_blank" rel="noopener noreferrer">';
|
||||
$urlrss = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=rss'.$getentity.'&exportkey='.urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...')).'" target="_blank" rel="noopener noreferrer">';
|
||||
$urlrss .= $urlwithroot.'/public/agenda/agendaexport.php?format=rss'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : 'KEYNOTDEFINED').'</a>';
|
||||
$message .= img_picto('', 'globe').' '.str_replace('{url}', $urlrss, '<span class="opacitymedium">'.$langs->trans("WebCalUrlForVCalExport", 'rss', '').'</span>');
|
||||
$message .= '<div class="urllink">';
|
||||
$message .= '<input type="text" id="onlinepaymenturl3" class="quatrevingtpercent" spellcheck="false" value="'.$urlwithroot.'/public/agenda/agendaexport.php?format=rss'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...').'">';
|
||||
$message .= '<input type="text" id="onlinepaymenturl3" class="quatrevingtpercent" spellcheck="false" value="'.$urlwithroot.'/public/agenda/agendaexport.php?format=rss'.$getentity.'&exportkey='.urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...')).'">';
|
||||
if (getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) {
|
||||
$message .= ' <a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=rss'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...').'">'.img_picto('', 'download').'</a>';
|
||||
$message .= ' <a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=rss'.$getentity.'&exportkey='.urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...')).'">'.img_picto('', 'download').'</a>';
|
||||
}
|
||||
$message .= '</div>';
|
||||
$message .= ajax_autoselect('onlinepaymenturl3');
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
|||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $dolibarr_main_url_root
|
||||
*/
|
||||
|
||||
// Load translation files required by the page
|
||||
|
|
|
|||
|
|
@ -54,6 +54,10 @@ $modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions
|
|||
$scandir = GETPOST('scan_dir', 'alpha');
|
||||
$type = 'myobject';
|
||||
|
||||
if (empty($action)) {
|
||||
$action = 'edit';
|
||||
}
|
||||
|
||||
$arrayofparameters = array(
|
||||
'EVENTORGANIZATION_TASK_LABEL' => array('type' => 'textarea','enabled' => 1, 'css' => ''),
|
||||
'EVENTORGANIZATION_CATEG_THIRDPARTY_CONF' => array('type' => 'category:'.Categorie::TYPE_CUSTOMER, 'enabled' => 1, 'css' => ''),
|
||||
|
|
@ -66,9 +70,8 @@ $arrayofparameters = array(
|
|||
'EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT' => array('type' => 'emailtemplate:conferenceorbooth', 'enabled' => 1, 'css' => ''),
|
||||
//'EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_SPEAKER'=>array('type'=>'emailtemplate:conferenceorbooth', 'enabled'=>1, 'css' => ''),
|
||||
//'EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_ATTENDES'=>array('type'=>'emailtemplate:conferenceorbooth', 'enabled'=>1, 'css' => ''),
|
||||
'SERVICE_BOOTH_LOCATION' => array('type' => 'product', 'enabled' => 1, 'css' => ''),
|
||||
'SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION' => array('type' => 'product', 'enabled' => 1, 'css' => ''),
|
||||
'EVENTORGANIZATION_SECUREKEY' => array('type' => 'securekey', 'enabled' => 1, 'css' => ''),
|
||||
'SERVICE_BOOTH_LOCATION' => array('type' => 'product', 'enabled' => 1, 'css' => 'maxwidth500'),
|
||||
'SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION' => array('type' => 'product', 'enabled' => 1, 'css' => 'maxwidth500'),
|
||||
);
|
||||
|
||||
$error = 0;
|
||||
|
|
@ -130,31 +133,7 @@ if ($action == 'updateMask') {
|
|||
}
|
||||
}
|
||||
}
|
||||
}/* elseif ($action == 'setdoc') {
|
||||
// Set or unset default model
|
||||
$tmpobjectkey = GETPOST('object', 'aZ09');
|
||||
if (!empty($tmpobjectkey)) {
|
||||
$constforval = 'EVENTORGANIZATION_'.strtoupper($tmpobjectkey).'_ADDON_PDF';
|
||||
if (dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity)) {
|
||||
// The constant that was read before the new set
|
||||
// We therefore requires a variable to have a coherent view
|
||||
$conf->global->$constforval = $value;
|
||||
}
|
||||
|
||||
// We disable/enable the document template (into llx_document_model table)
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0) {
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
}
|
||||
} elseif ($action == 'unsetdoc') {
|
||||
$tmpobjectkey = GETPOST('object', 'aZ09');
|
||||
if (!empty($tmpobjectkey)) {
|
||||
$constforval = 'EVENTORGANIZATION_'.strtoupper($tmpobjectkey).'_ADDON_PDF';
|
||||
dolibarr_del_const($db, $constforval, $conf->entity);
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -177,7 +156,8 @@ $head = eventorganizationAdminPrepareHead();
|
|||
print dol_get_fiche_head($head, 'settings', $langs->trans($page_name), -1, 'eventorganization');
|
||||
|
||||
// Setup page goes here
|
||||
echo '<span class="opacitymedium">'.$langs->trans("EventOrganizationSetupPage").'</span><br><br>';
|
||||
//print '<span class="opacitymedium">'.$langs->trans("EventOrganizationSetupPage").'</span><br>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
if ($action == 'edit') {
|
||||
|
|
@ -201,12 +181,6 @@ if ($action == 'edit') {
|
|||
print '<textarea class="flat" name="'.$constname.'" id="'.$constname.'" cols="50" rows="5" wrap="soft">' . "\n";
|
||||
print getDolGlobalString($constname);
|
||||
print "</textarea>\n";
|
||||
} elseif ($val['type'] == 'html') {
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%');
|
||||
$doleditor->Create();
|
||||
} elseif ($val['type'] == 'yesno') {
|
||||
print $form->selectyesno($constname, getDolGlobalString($constname), 1);
|
||||
} elseif (preg_match('/emailtemplate:/', $val['type'])) {
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
|
||||
$formmail = new FormMail($db);
|
||||
|
|
@ -239,15 +213,6 @@ if ($action == 'edit') {
|
|||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
$formcompany = new FormCompany($db);
|
||||
print $formcompany->selectProspectCustomerType(getDolGlobalString($constname), $constname, 'customerorprospect', 'form', '', '1');
|
||||
} elseif ($val['type'] == 'securekey') {
|
||||
print '<input type="text" class="flat" id="'.$constname.'" name="'.$constname.'" value="'.(GETPOST($constname, 'alpha') ? GETPOST($constname, 'alpha') : getDolGlobalString($constname)).'" size="40">';
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token'.$constname.'" class="linkobject"');
|
||||
}
|
||||
|
||||
// Add button to autosuggest a key
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
||||
print dolJSToSetRandomPassword($constname, 'generate_token'.$constname);
|
||||
} elseif ($val['type'] == 'product') {
|
||||
if (isModEnabled("product") || isModEnabled("service")) {
|
||||
$selected = getDolGlobalInt($constname);
|
||||
|
|
@ -262,101 +227,94 @@ if ($action == 'edit') {
|
|||
}
|
||||
print '</table>';
|
||||
|
||||
print $form->buttonsSaveCancel();
|
||||
print $form->buttonsSaveCancel('Save', '');
|
||||
|
||||
print '</form>';
|
||||
print '<br>';
|
||||
} else {
|
||||
if (!empty($arrayofparameters)) {
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td></td></tr>';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td></td></tr>';
|
||||
|
||||
foreach ($arrayofparameters as $constname => $val) {
|
||||
if ($val['enabled'] == 1) {
|
||||
$setupnotempty++;
|
||||
print '<tr class="oddeven">';
|
||||
print '<td><!-- '.$constname.' -->';
|
||||
$tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : '');
|
||||
$tooltiphelp .= (($langs->trans($constname . 'Tooltip2') && $langs->trans($constname . 'Tooltip2') != $constname . 'Tooltip2') ? '<br><br>'."\n".$langs->trans($constname . 'Tooltip2') : '');
|
||||
print $form->textwithpicto($langs->trans($constname), $tooltiphelp);
|
||||
print '</td><td>';
|
||||
foreach ($arrayofparameters as $constname => $val) {
|
||||
/*if ($val['enabled'] != 1) {
|
||||
continue;
|
||||
}*/
|
||||
$setupnotempty++;
|
||||
print '<tr class="oddeven">';
|
||||
print '<td><!-- '.$constname.' -->';
|
||||
$tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : '');
|
||||
$tooltiphelp .= (($langs->trans($constname . 'Tooltip2') && $langs->trans($constname . 'Tooltip2') != $constname . 'Tooltip2') ? '<br><br>'."\n".$langs->trans($constname . 'Tooltip2') : '');
|
||||
print $form->textwithpicto($langs->trans($constname), $tooltiphelp);
|
||||
print '</td><td>';
|
||||
|
||||
if ($val['type'] == 'textarea') {
|
||||
print dol_nl2br(getDolGlobalString($constname));
|
||||
} elseif ($val['type'] == 'html') {
|
||||
print getDolGlobalString($constname);
|
||||
} elseif ($val['type'] == 'yesno') {
|
||||
print ajax_constantonoff($constname);
|
||||
} elseif (preg_match('/emailtemplate:/', $val['type'])) {
|
||||
if (getDolGlobalString($constname)) {
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
|
||||
$formmail = new FormMail($db);
|
||||
if ($val['type'] == 'textarea') {
|
||||
print dol_nl2br(getDolGlobalString($constname));
|
||||
} elseif (preg_match('/emailtemplate:/', $val['type'])) {
|
||||
if (getDolGlobalString($constname)) {
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
|
||||
$formmail = new FormMail($db);
|
||||
|
||||
$tmp = explode(':', $val['type']);
|
||||
$labelemailtemplate = getDolGlobalString($constname);
|
||||
if ($labelemailtemplate && $labelemailtemplate != '-1') {
|
||||
$template = $formmail->getEMailTemplate($db, $tmp[1], $user, $langs, getDolGlobalInt($constname));
|
||||
if (is_numeric($template) && $template < 0) {
|
||||
setEventMessages($formmail->error, $formmail->errors, 'errors');
|
||||
} else {
|
||||
if ($template->label != 'default') {
|
||||
print $langs->trans($template->label);
|
||||
}
|
||||
}
|
||||
$tmp = explode(':', $val['type']);
|
||||
$labelemailtemplate = getDolGlobalString($constname);
|
||||
if ($labelemailtemplate && $labelemailtemplate != '-1') {
|
||||
$template = $formmail->getEMailTemplate($db, $tmp[1], $user, $langs, getDolGlobalInt($constname));
|
||||
if (is_numeric($template) && $template < 0) {
|
||||
setEventMessages($formmail->error, $formmail->errors, 'errors');
|
||||
} else {
|
||||
if ($template->label != 'default') {
|
||||
print $langs->trans($template->label);
|
||||
}
|
||||
}
|
||||
} elseif (preg_match('/category:/', $val['type'])) {
|
||||
if (getDolGlobalInt($constname)) {
|
||||
$c = new Categorie($db);
|
||||
$result = $c->fetch(getDolGlobalInt($constname));
|
||||
if ($result < 0) {
|
||||
setEventMessages(null, $c->errors, 'errors');
|
||||
}
|
||||
$ways = $c->print_all_ways(' >> ', 'none', 0, 1); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text
|
||||
$toprint = array();
|
||||
foreach ($ways as $way) {
|
||||
$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ? ' style="background: #' . $c->color . ';"' : ' style="background: #bbb"') . '>' . $way . '</li>';
|
||||
}
|
||||
print '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>';
|
||||
}
|
||||
} elseif (preg_match('/thirdparty_type/', $val['type'])) {
|
||||
if (getDolGlobalString($constname) == 2) {
|
||||
print $langs->trans("Prospect");
|
||||
} elseif (getDolGlobalString($constname) == 3) {
|
||||
print $langs->trans("ProspectCustomer");
|
||||
} elseif (getDolGlobalString($constname) == 1) {
|
||||
print $langs->trans("Customer");
|
||||
} elseif (getDolGlobalString($constname) == 0) {
|
||||
print $langs->trans("NorProspectNorCustomer");
|
||||
}
|
||||
} elseif ($val['type'] == 'product') {
|
||||
$product = new Product($db);
|
||||
$idproduct = getDolGlobalInt($constname);
|
||||
if ($idproduct > 0) {
|
||||
$resprod = $product->fetch($idproduct);
|
||||
if ($resprod > 0) {
|
||||
print $product->getNomUrl(1);
|
||||
} elseif ($resprod < 0) {
|
||||
setEventMessages($product->error, $product->errors, "errors");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
print getDolGlobalString($constname);
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
}
|
||||
} elseif (preg_match('/category:/', $val['type'])) {
|
||||
if (getDolGlobalInt($constname)) {
|
||||
$c = new Categorie($db);
|
||||
$result = $c->fetch(getDolGlobalInt($constname));
|
||||
if ($result < 0) {
|
||||
setEventMessages(null, $c->errors, 'errors');
|
||||
}
|
||||
$ways = $c->print_all_ways(' >> ', 'none', 0, 1); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text
|
||||
$toprint = array();
|
||||
foreach ($ways as $way) {
|
||||
$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ? ' style="background: #' . $c->color . ';"' : ' style="background: #bbb"') . '>' . $way . '</li>';
|
||||
}
|
||||
print '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>';
|
||||
}
|
||||
} elseif (preg_match('/thirdparty_type/', $val['type'])) {
|
||||
if (getDolGlobalString($constname) == 2) {
|
||||
print $langs->trans("Prospect");
|
||||
} elseif (getDolGlobalString($constname) == 3) {
|
||||
print $langs->trans("ProspectCustomer");
|
||||
} elseif (getDolGlobalString($constname) == 1) {
|
||||
print $langs->trans("Customer");
|
||||
} elseif (getDolGlobalString($constname) == 0) {
|
||||
print $langs->trans("NorProspectNorCustomer");
|
||||
}
|
||||
} elseif ($val['type'] == 'product') {
|
||||
$product = new Product($db);
|
||||
$idproduct = getDolGlobalInt($constname);
|
||||
if ($idproduct > 0) {
|
||||
$resprod = $product->fetch($idproduct);
|
||||
if ($resprod > 0) {
|
||||
print $product->getNomUrl(1);
|
||||
} elseif ($resprod < 0) {
|
||||
setEventMessages($product->error, $product->errors, "errors");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
print getDolGlobalString($constname);
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>';
|
||||
print '</div>';
|
||||
} else {
|
||||
print '<br>'.$langs->trans("NothingToSetup");
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
255
htdocs/admin/eventorganization_public.php
Normal file
255
htdocs/admin/eventorganization_public.php
Normal file
|
|
@ -0,0 +1,255 @@
|
|||
<?php
|
||||
/* Copyright (C) 2021 Florian Henry <florian.henry@scopen.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/eventorganization.php
|
||||
* \ingroup eventorganization
|
||||
* \brief EventOrganization setup page.
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
|
||||
// Libraries
|
||||
require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/eventorganization.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $dolibarr_main_url_root
|
||||
*/
|
||||
|
||||
// Translations
|
||||
$langs->loadLangs(array("admin", "eventorganization", "categories"));
|
||||
|
||||
// Parameters
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$cancel = GETPOST('cancel', 'aZ09');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
$value = GETPOST('value', 'alpha');
|
||||
$label = GETPOST('label', 'alpha');
|
||||
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||
|
||||
$scandir = GETPOST('scan_dir', 'alpha');
|
||||
$type = 'myobject';
|
||||
|
||||
$arrayofparameters = array(
|
||||
'EVENTORGANIZATION_SECUREKEY' => array('type' => 'securekey', 'enabled' => 1, 'css' => ''),
|
||||
);
|
||||
|
||||
$error = 0;
|
||||
$setupnotempty = 0;
|
||||
|
||||
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
||||
|
||||
// Access control
|
||||
if (empty($user->admin)) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
if (empty($action)) {
|
||||
$action = 'edit';
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($cancel) {
|
||||
$action = '';
|
||||
}
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$page_name = "EventOrganizationSetup";
|
||||
|
||||
llxHeader('', $langs->trans($page_name), '', '', 0, 0, '', '', '', 'mod-admin page-eventorganization');
|
||||
|
||||
// Subheader
|
||||
$linkback = '<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1').'">'.$langs->trans("BackToModuleList").'</a>';
|
||||
|
||||
print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup');
|
||||
|
||||
// Configuration header
|
||||
$head = eventorganizationAdminPrepareHead();
|
||||
print dol_get_fiche_head($head, 'public', $langs->trans($page_name), -1, 'eventorganization');
|
||||
|
||||
// Setup page goes here
|
||||
// print '<span class="opacitymedium">'.$langs->trans("EventOrganizationSetupPage").'</span><br>';
|
||||
print '<br>';
|
||||
|
||||
if ($action == 'edit') {
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td></td></tr>';
|
||||
|
||||
foreach ($arrayofparameters as $constname => $val) {
|
||||
// @phpstan-ignore-next-line
|
||||
if ($val['enabled'] == 1) {
|
||||
$setupnotempty++;
|
||||
print '<tr class="oddeven"><td><!-- '.$constname.' -->';
|
||||
$tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : '');
|
||||
$tooltiphelp .= (($langs->trans($constname . 'Tooltip2') && $langs->trans($constname . 'Tooltip2') != $constname . 'Tooltip2') ? '<br><br>'."\n".$langs->trans($constname . 'Tooltip2') : '');
|
||||
print '<span id="helplink'.$constname.'" class="spanforparamtooltip">'.$form->textwithpicto($langs->trans($constname), $tooltiphelp, 1, 'info', '', 0, 3, 'tootips'.$constname).'</span>';
|
||||
print '</td><td>';
|
||||
|
||||
/*if ($val['type'] == 'textarea') {
|
||||
print '<textarea class="flat" name="'.$constname.'" id="'.$constname.'" cols="50" rows="5" wrap="soft">' . "\n";
|
||||
print getDolGlobalString($constname);
|
||||
print "</textarea>\n";
|
||||
} elseif ($val['type'] == 'html') {
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%');
|
||||
$doleditor->Create();
|
||||
} elseif ($val['type'] == 'yesno') {
|
||||
print $form->selectyesno($constname, getDolGlobalString($constname), 1);
|
||||
} elseif (preg_match('/emailtemplate:/', $val['type'])) {
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
|
||||
$formmail = new FormMail($db);
|
||||
|
||||
$tmp = explode(':', $val['type']);
|
||||
$nboftemplates = $formmail->fetchAllEMailTemplate($tmp[1], $user, null, 1); // We set lang=null to get in priority record with no lang
|
||||
//$arraydefaultmessage = $formmail->getEMailTemplate($db, $tmp[1], $user, null, 0, 1, '');
|
||||
$arrayofmessagename = array();
|
||||
if (is_array($formmail->lines_model)) {
|
||||
foreach ($formmail->lines_model as $modelmail) {
|
||||
//var_dump($modelmail);
|
||||
$moreonlabel = '';
|
||||
if (!empty($arrayofmessagename[$modelmail->label])) {
|
||||
$moreonlabel = ' <span class="opacitymedium">(' . $langs->trans("SeveralLangugeVariatFound") . ')</span>';
|
||||
}
|
||||
// The 'label' is the key that is unique if we exclude the language
|
||||
$arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)) . $moreonlabel;
|
||||
}
|
||||
}
|
||||
print $form->selectarray($constname, $arrayofmessagename, getDolGlobalString($constname), 'None', 0, 0, '', 0, 0, 0, '', '', 1);
|
||||
} elseif (preg_match('/category:/', $val['type'])) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
$formother = new FormOther($db);
|
||||
|
||||
$tmp = explode(':', $val['type']);
|
||||
print img_picto('', 'category', 'class="pictofixedwidth"');
|
||||
print $formother->select_categories($tmp[1], getDolGlobalInt($constname), $constname, 0, $langs->trans('CustomersProspectsCategoriesShort'));
|
||||
} elseif (preg_match('/thirdparty_type/', $val['type'])) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
$formcompany = new FormCompany($db);
|
||||
print $formcompany->selectProspectCustomerType(getDolGlobalString($constname), $constname, 'customerorprospect', 'form', '', '1');
|
||||
} elseif ($val['type'] == 'securekey') { */
|
||||
print '<input type="text" class="flat" id="'.$constname.'" name="'.$constname.'" value="'.(GETPOST($constname, 'alpha') ? GETPOST($constname, 'alpha') : getDolGlobalString($constname)).'" size="40">';
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token'.$constname.'" class="linkobject"');
|
||||
}
|
||||
|
||||
// Add button to autosuggest a key
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
||||
print dolJSToSetRandomPassword($constname, 'generate_token'.$constname);
|
||||
/* } elseif ($val['type'] == 'product') {
|
||||
if (isModEnabled("product") || isModEnabled("service")) {
|
||||
$selected = getDolGlobalInt($constname);
|
||||
print img_picto('', 'product', 'class="pictofixedwidth"');
|
||||
print $form->select_produits($selected, $constname, '', 0, 0, 1, 2, '', 0, array(), 0, '1', 0, 'maxwidth500 widthcentpercentminusx', 0, '', null, 1);
|
||||
}
|
||||
} else {
|
||||
print '<input name="' . $constname . '" class="flat ' . (empty($val['css']) ? 'minwidth200' : $val['css']) . '" value="' . getDolGlobalString($constname) . '">';
|
||||
}*/
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
print $form->buttonsSaveCancel('Save', '');
|
||||
|
||||
print '</form>';
|
||||
print '<br>';
|
||||
} else {
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td></td></tr>';
|
||||
|
||||
foreach ($arrayofparameters as $constname => $val) {
|
||||
$setupnotempty++;
|
||||
print '<tr class="oddeven">';
|
||||
print '<td><!-- '.$constname.' -->';
|
||||
$tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : '');
|
||||
$tooltiphelp .= (($langs->trans($constname . 'Tooltip2') && $langs->trans($constname . 'Tooltip2') != $constname . 'Tooltip2') ? '<br><br>'."\n".$langs->trans($constname . 'Tooltip2') : '');
|
||||
print $form->textwithpicto($langs->trans($constname), $tooltiphelp);
|
||||
print '</td><td>';
|
||||
print getDolGlobalString($constname);
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
// Page end
|
||||
print dol_get_fiche_end();
|
||||
|
||||
|
||||
//if (getDolGlobalString('EVENTORGANIZATION_ENABLE_PUBLIC')) {
|
||||
print '<br>';
|
||||
//print $langs->trans('FollowingLinksArePublic').'<br>';
|
||||
print img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans('BlankSubscriptionForm').'</span><br>';
|
||||
if (isModEnabled('multicompany')) {
|
||||
$entity_qr = '?entity='.$conf->entity;
|
||||
} else {
|
||||
$entity_qr = '';
|
||||
}
|
||||
|
||||
// Define $urlwithroot
|
||||
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
|
||||
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
|
||||
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
|
||||
|
||||
print '<div class="urllink">';
|
||||
print $langs->trans("TheLinkIsAvailableOnTheProjectEventCard");
|
||||
//print '<input type="text" id="publicurlmember" class="quatrevingtpercentminusx" value="'.$urlwithroot.'/public/project/index.php'.$entity_qr.'">';
|
||||
//print '<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.'/public/project/index.php'.$entity_qr.'">'.img_picto('', 'globe', 'class="paddingleft"').'</a>';
|
||||
print '</div>';
|
||||
print ajax_autoselect('publicurlmember');
|
||||
//}
|
||||
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
|
@ -1249,7 +1249,7 @@ if ($object->id > 0) {
|
|||
$contrat->ref_customer = $objp->refcus;
|
||||
$contrat->ref_supplier = $objp->refsup;
|
||||
$contrat->fk_project = $objp->fk_projet;
|
||||
$contrat->statut = $objp->contract_status;
|
||||
$contrat->statut = $objp->contract_status; // deprecated
|
||||
$contrat->status = $objp->contract_status;
|
||||
$contrat->last_main_doc = $objp->last_main_doc;
|
||||
$contrat->model_pdf = $objp->model_pdf;
|
||||
|
|
@ -1258,7 +1258,7 @@ if ($object->id > 0) {
|
|||
$late = '';
|
||||
foreach ($contrat->lines as $line) {
|
||||
if ($contrat->status == Contrat::STATUS_VALIDATED && $line->statut == ContratLigne::STATUS_OPEN) {
|
||||
if (((!empty($line->date_end) ? $line->date_end : 0) + $conf->contrat->services->expires->warning_delay) < $now) {
|
||||
if (((!empty($line->date_end) ? $line->date_end : 0) + $conf->contract->services->expires->warning_delay) < $now) {
|
||||
$late = img_warning($langs->trans("Late"));
|
||||
}
|
||||
}
|
||||
|
|
@ -1269,7 +1269,7 @@ if ($object->id > 0) {
|
|||
print $contrat->getNomUrl(1, 12);
|
||||
if (!empty($contrat->model_pdf)) {
|
||||
// Preview
|
||||
$filedir = $conf->contrat->multidir_output[$objp->entity].'/'.dol_sanitizeFileName($objp->ref);
|
||||
$filedir = $conf->contract->multidir_output[$objp->entity].'/'.dol_sanitizeFileName($objp->ref);
|
||||
$file_list = null;
|
||||
if (!empty($filedir)) {
|
||||
$file_list = dol_dir_list($filedir, 'files', 0, dol_sanitizeFileName($objp->ref).'.pdf', '(\.meta|_preview.*.*\.png)$', 'date', SORT_DESC);
|
||||
|
|
@ -1362,7 +1362,7 @@ if ($object->id > 0) {
|
|||
|
||||
$fichinter_static->id = $objp->id;
|
||||
$fichinter_static->ref = $objp->ref;
|
||||
$fichinter_static->statut = $objp->fk_statut;
|
||||
$fichinter_static->statut = $objp->fk_statut; // deprecated
|
||||
$fichinter_static->status = $objp->fk_statut;
|
||||
$fichinter_static->fk_project = $objp->fk_projet;
|
||||
|
||||
|
|
@ -1599,7 +1599,7 @@ if ($object->id > 0) {
|
|||
print '<td class="nowraponall">';
|
||||
print $facturestatic->getNomUrl(1);
|
||||
// Preview
|
||||
$filedir = $conf->facture->multidir_output[$objp->entity].'/'.dol_sanitizeFileName($objp->ref);
|
||||
$filedir = $conf->invoice->multidir_output[$objp->entity].'/'.dol_sanitizeFileName($objp->ref);
|
||||
$file_list = null;
|
||||
if (!empty($filedir)) {
|
||||
$file_list = dol_dir_list($filedir, 'files', 0, dol_sanitizeFileName($objp->ref).'.pdf', '(\.meta|_preview.*.*\.png)$', 'date', SORT_DESC);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
|
||||
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
|||
|
|
@ -832,7 +832,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
} else {
|
||||
$object->status = $oldstatus;
|
||||
$object->statut = $oldstatus;
|
||||
$object->statut = $oldstatus; // deprecated
|
||||
|
||||
$db->rollback();
|
||||
$action = '';
|
||||
|
|
@ -851,7 +851,7 @@ if (empty($reshook)) {
|
|||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
} else {
|
||||
$object->statut = $newstatus;
|
||||
$object->statut = $newstatus; // deprecated
|
||||
$object->status = $newstatus;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -638,7 +638,7 @@ class Propal extends CommonObject
|
|||
|
||||
dol_syslog(get_class($this)."::addline propalid=$this->id, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_except=$remise_percent, price_base_type=$price_base_type, pu_ttc=$pu_ttc, info_bits=$info_bits, type=$type, fk_remise_except=".$fk_remise_except);
|
||||
|
||||
if ($this->statut == self::STATUS_DRAFT) {
|
||||
if ($this->status == self::STATUS_DRAFT) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
|
||||
// Clean parameters
|
||||
|
|
@ -1575,6 +1575,7 @@ class Propal extends CommonObject
|
|||
$object->ref = '';
|
||||
$object->entity = (!empty($forceentity) ? $forceentity : $object->entity);
|
||||
$object->statut = self::STATUS_DRAFT;
|
||||
$object->status = self::STATUS_DRAFT;
|
||||
|
||||
// Clear fields
|
||||
$object->user_creation_id = $user->id;
|
||||
|
|
@ -2707,7 +2708,7 @@ class Propal extends CommonObject
|
|||
|
||||
if (!$error) {
|
||||
$this->oldcopy = clone $this;
|
||||
$this->statut = $status;
|
||||
$this->statut = $status; // deprecated
|
||||
$this->status = $status;
|
||||
$this->date_signature = $date_signature;
|
||||
$this->note_private = $newprivatenote;
|
||||
|
|
@ -2726,7 +2727,7 @@ class Propal extends CommonObject
|
|||
$this->db->commit();
|
||||
return 1;
|
||||
} else {
|
||||
$this->statut = $this->oldcopy->status;
|
||||
$this->statut = $this->oldcopy->status; // deprecated
|
||||
$this->status = $this->oldcopy->status;
|
||||
$this->date_signature = $this->oldcopy->date_signature;
|
||||
$this->note_private = $this->oldcopy->note_private;
|
||||
|
|
@ -2857,7 +2858,7 @@ class Propal extends CommonObject
|
|||
}
|
||||
|
||||
if (!$error) {
|
||||
$this->statut = self::STATUS_CANCELED;
|
||||
$this->statut = self::STATUS_CANCELED; // deprecated
|
||||
$this->status = self::STATUS_CANCELED;
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
|
|
@ -2923,7 +2924,7 @@ class Propal extends CommonObject
|
|||
}
|
||||
|
||||
if (!$error) {
|
||||
$this->statut = self::STATUS_DRAFT;
|
||||
$this->statut = self::STATUS_DRAFT; // deprecated
|
||||
$this->status = self::STATUS_DRAFT;
|
||||
|
||||
$this->db->commit();
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2019-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2021 Anthony Berton <anthony.berton@bb2a.fr>
|
||||
* Copyright (C) 2021-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2021-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2022 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
|
||||
|
|
@ -496,7 +496,7 @@ if ($action == "nosign" && $permissiontoclose) {
|
|||
$db->begin();
|
||||
foreach ($toselect as $checked) {
|
||||
if ($tmpproposal->fetch($checked) > 0) {
|
||||
if ($tmpproposal->status == $tmpproposal::STATUS_VALIDATED || (getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE') && $tmpproposal->statut == $tmpproposal::STATUS_DRAFT)) {
|
||||
if ($tmpproposal->status == $tmpproposal::STATUS_VALIDATED || (getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE') && $tmpproposal->status == $tmpproposal::STATUS_DRAFT)) {
|
||||
$tmpproposal->status = $tmpproposal::STATUS_NOTSIGNED;
|
||||
if ($tmpproposal->closeProposal($user, $tmpproposal::STATUS_NOTSIGNED) > 0) {
|
||||
setEventMessage($tmpproposal->ref." ".$langs->trans('NoSigned'), 'mesgs');
|
||||
|
|
@ -1785,7 +1785,7 @@ while ($i < $imaxinloop) {
|
|||
$object->ref_customer = $obj->ref_client;
|
||||
$object->note_public = $obj->note_public;
|
||||
$object->note_private = $obj->note_private;
|
||||
$object->statut = $obj->status;
|
||||
$object->statut = $obj->status; // deprecated
|
||||
$object->status = $obj->status;
|
||||
|
||||
$companystatic->id = $obj->socid;
|
||||
|
|
|
|||
|
|
@ -2353,8 +2353,9 @@ class Facture extends CommonInvoice
|
|||
$this->multicurrency_total_ttc = $obj->multicurrency_total_ttc;
|
||||
|
||||
// Now process extrafields
|
||||
$this->array_options = array();
|
||||
if ($doFetchInOneSqlRequest && $extraFieldsCheck) {
|
||||
$this->array_options = array();
|
||||
|
||||
foreach ($extrafields->attributes[$this->table_element]['label'] as $key => $val) {
|
||||
$type = !empty($extrafields->attributes[$this->table_element]['type'][$key])
|
||||
? $extrafields->attributes[$this->table_element]['type'][$key]
|
||||
|
|
|
|||
|
|
@ -337,8 +337,9 @@ class FactureLigne extends CommonInvoiceLine
|
|||
|
||||
$this->packaging = $objp->packaging;
|
||||
|
||||
$this->array_options = array();
|
||||
if ($doFetchInOneSqlRequest && $extraFieldsCheck) {
|
||||
$this->array_options = array();
|
||||
|
||||
foreach ($extrafields->attributes[$this->table_element]['label'] as $key => $val) {
|
||||
$type = !empty($extrafields->attributes[$this->table_element]['type'][$key])
|
||||
? $extrafields->attributes[$this->table_element]['type'][$key]
|
||||
|
|
|
|||
|
|
@ -209,9 +209,10 @@ if (isModEnabled('invoice') && $user->hasRight('facture', 'lire')) {
|
|||
$tmpinvoice->total_ht = $obj->total_ht;
|
||||
$tmpinvoice->total_tva = $obj->total_tva;
|
||||
$tmpinvoice->total_ttc = $obj->total_ttc;
|
||||
$tmpinvoice->statut = $obj->status;
|
||||
$tmpinvoice->statut = $obj->status; // deprecated
|
||||
$tmpinvoice->status = $obj->status;
|
||||
$tmpinvoice->paye = $obj->paye;
|
||||
$tmpinvoice->paye = $obj->paye; // deprecated
|
||||
$tmpinvoice->paid = $obj->paye;
|
||||
$tmpinvoice->date_lim_reglement = $db->jdate($obj->datelimite);
|
||||
$tmpinvoice->type = $obj->type;
|
||||
|
||||
|
|
@ -362,7 +363,7 @@ if ((isModEnabled('fournisseur') && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMO
|
|||
$facstatic->total_ttc = $obj->total_ttc;
|
||||
$facstatic->statut = $obj->status; // deprecated
|
||||
$facstatic->status = $obj->status;
|
||||
$facstatic->paye = $obj->paye;
|
||||
$facstatic->paye = $obj->paye; // deprecated
|
||||
$facstatic->paid = $obj->paye;
|
||||
$facstatic->type = $obj->type;
|
||||
$facstatic->ref_supplier = $obj->ref_supplier;
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ if ($id) {
|
|||
if (is_object($bon) && $bon->statut == BonPrelevement::STATUS_CREDITED) {
|
||||
if ($lipre->statut == 2) {
|
||||
if ($user->hasRight('prelevement', 'bons', 'credit')) {
|
||||
print '<a class="butActionDelete" href="line.php?action=rejet&type='.$type.'&id='.$lipre->id.'">'.$langs->trans("StandingOrderReject").'</a>';
|
||||
print '<a class="butActionDelete" href="line.php?action=rejet&token='.newToken().'&type='.$type.'&id='.$lipre->id.'">'.$langs->trans("StandingOrderReject").'</a>';
|
||||
} else {
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotAllowed").'">'.$langs->trans("StandingOrderReject").'</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';
|
|||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
* @var string $dolibarr_main_url_root
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -65,6 +65,11 @@ function eventorganizationAdminPrepareHead()
|
|||
$head[$h][2] = 'conferenceorboothattendee_extrafields';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/admin/eventorganization_public.php';
|
||||
$head[$h][1] = $langs->trans("BlankSubscriptionForm");
|
||||
$head[$h][2] = 'public';
|
||||
$h++;
|
||||
|
||||
// Show more tabs from modules
|
||||
// Entries must be declared in modules descriptor with line
|
||||
//$this->tabs = array(
|
||||
|
|
|
|||
|
|
@ -13786,6 +13786,7 @@ function getElementProperties($elementType)
|
|||
$classpath = 'supplier_proposal/class';
|
||||
$module = 'supplier_proposal';
|
||||
$classfile = 'supplier_proposal';
|
||||
$classname = 'SupplierProposalLine';
|
||||
$table_element = 'supplier_proposaldet';
|
||||
$parent_element = 'supplier_proposal';
|
||||
} elseif ($elementType == 'contract') {
|
||||
|
|
|
|||
|
|
@ -278,9 +278,10 @@ class modSociete extends DolibarrModules
|
|||
's.status' => "Status", 's.client' => "Customer", 's.fournisseur' => "Supplier", 's.datec' => "DateCreation", 's.tms' => "DateLastModification",
|
||||
's.code_client' => "CustomerCode", 's.code_fournisseur' => "SupplierCode", 's.code_compta' => "AccountancyCode", 's.code_compta_fournisseur' => "SupplierAccountancyCode",
|
||||
's.address' => "Address", 's.zip' => "Zip", 's.town' => "Town", 'd.nom' => 'State', 'r.nom' => 'Region', 'c.label' => "Country", 'c.code' => "CountryCode", 's.phone' => "Phone", 's.fax' => "Fax",
|
||||
's.url' => "Url", 's.email' => "Email", 's.default_lang' => "DefaultLang", 's.canvas' => "Canvas", 's.siren' => "ProfId1", 's.siret' => "ProfId2", 's.ape' => "ProfId3", 's.idprof4' => "ProfId4",
|
||||
's.idprof5' => "ProfId5", 's.idprof6' => "ProfId6", 's.tva_intra' => "VATIntraShort", 's.capital' => "Capital", 's.note_private' => "NotePrivate", 's.note_public' => "NotePublic",
|
||||
't.code' => "ThirdPartyType", 'ce.code' => "DictionaryStaff", "cfj.libelle" => "JuridicalStatus", 's.fk_prospectlevel' => 'ProspectLevel',
|
||||
's.phone_mobile' => "PhoneMobile", 's.url' => "Url", 's.email' => "Email", 's.default_lang' => "DefaultLang", 's.canvas' => "Canvas",
|
||||
's.siren' => "ProfId1", 's.siret' => "ProfId2", 's.ape' => "ProfId3", 's.idprof4' => "ProfId4", 's.idprof5' => "ProfId5", 's.idprof6' => "ProfId6",
|
||||
's.tva_intra' => "VATIntraShort", 's.capital' => "Capital", 's.note_private' => "NotePrivate",
|
||||
's.note_public' => "NotePublic", 't.code' => "ThirdPartyType", 'ce.code' => "DictionaryStaff", "cfj.libelle" => "JuridicalStatus", 's.fk_prospectlevel' => 'ProspectLevel',
|
||||
'st.code' => 'ProspectStatus', 'payterm.libelle' => 'PaymentConditions', 'paymode.libelle' => 'PaymentMode',
|
||||
's.outstanding_limit' => 'OutstandingBill', 'pbacc.ref' => 'PaymentBankAccount', 'incoterm.code' => 'IncotermLabel'
|
||||
);
|
||||
|
|
@ -312,7 +313,7 @@ class modSociete extends DolibarrModules
|
|||
's.code_client' => "Text", 's.code_fournisseur' => "Text", 's.code_compta' => "Text", 's.code_compta_fournisseur' => "Text",
|
||||
's.address' => "Text", 's.zip' => "Text", 's.town' => "Text",
|
||||
'd.nom' => 'Text', 'r.nom' => 'Text', 'c.label' => 'List:c_country:label:label', 'c.code' => 'Text',
|
||||
's.phone' => "Text", 's.fax' => "Text",
|
||||
's.phone' => "Text", 's.phone_mobile' => "Text", 's.fax' => "Text",
|
||||
's.url' => "Text", 's.email' => "Text", 's.default_lang' => "Text", 's.canvas' => "Text",
|
||||
's.siret' => "Text", 's.siren' => "Text", 's.ape' => "Text", 's.idprof4' => "Text", 's.idprof5' => "Text", 's.idprof6' => "Text",
|
||||
's.tva_intra' => "Text", 's.capital' => "Numeric",
|
||||
|
|
@ -567,6 +568,7 @@ class modSociete extends DolibarrModules
|
|||
's.fk_departement' => "StateCode",
|
||||
's.fk_pays' => "CountryCode",
|
||||
's.phone' => "Phone",
|
||||
's.phone_mobile' => "PhoneMobile",
|
||||
's.fax' => "Fax",
|
||||
's.url' => "Url",
|
||||
's.email' => "Email",
|
||||
|
|
@ -737,6 +739,7 @@ class modSociete extends DolibarrModules
|
|||
's.fk_departement' => 'matches field "code_departement" in table "'.MAIN_DB_PREFIX.'c_departements"',
|
||||
's.fk_pays' => 'US/FR/DE etc. matches field "code" in table "'.MAIN_DB_PREFIX.'c_country"',
|
||||
's.phone' => "eg: +34123456789",
|
||||
's.phone_mobile' => "eg +33601020304",
|
||||
's.fax' => "eg. +34987654321",
|
||||
's.url' => "e.g. https://www.mybigcompany.com",
|
||||
's.email' => "e.g. test@mybigcompany.com",
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ $formfile->list_of_documents(
|
|||
);
|
||||
|
||||
|
||||
print "<br><br>";
|
||||
print "<br>";
|
||||
|
||||
|
||||
//List of links
|
||||
|
|
|
|||
|
|
@ -129,14 +129,18 @@ if ($reshook < 0) {
|
|||
if (empty($reshook)) {
|
||||
$error = 0;
|
||||
|
||||
$backurlforlist = dol_buildpath('/eventorganization/conferenceorbooth_list.php', 1);
|
||||
if (!empty($withproject)) {
|
||||
$backurlforlist = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_list.php?withproject=1&fk_project='.((int) $object->id);
|
||||
} else {
|
||||
$backurlforlist = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_list.php';
|
||||
}
|
||||
|
||||
if (empty($backtopage) || ($cancel && empty($id))) {
|
||||
if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
|
||||
if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
|
||||
$backtopage = $backurlforlist;
|
||||
} else {
|
||||
$backtopage = dol_buildpath('/eventorganization/conferenceorbooth_card.php', 1).'?id='.($id > 0 ? $id : '__ID__').($withproject ? '&withproject=1' : '');
|
||||
$backtopage = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_card.php?fk_project='.((int) $object->id).'&id='.($id > 0 ? $id : '__ID__').($withproject ? '&withproject=1' : '');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -271,17 +275,6 @@ if (!empty($withproject)) {
|
|||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Visibility
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($projectstatic->public == 0) {
|
||||
print img_picto($langs->trans('PrivateProject'), 'private', 'class="paddingrightonly"');
|
||||
print $langs->trans("PrivateProject");
|
||||
} else {
|
||||
print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"');
|
||||
print $langs->trans("SharedProject");
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Budget
|
||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||
if (strcmp($projectstatic->budget_amount, '')) {
|
||||
|
|
@ -296,7 +289,7 @@ if (!empty($withproject)) {
|
|||
$end = dol_print_date($projectstatic->date_end, 'day');
|
||||
print ' - ';
|
||||
print($end ? $end : '?');
|
||||
if ($object->hasDelay()) {
|
||||
if ($projectstatic->hasDelay()) {
|
||||
print img_warning("Late");
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
|
@ -308,11 +301,22 @@ if (!empty($withproject)) {
|
|||
$end = dol_print_date($projectstatic->date_end_event, 'day');
|
||||
print ' - ';
|
||||
print($end ? $end : '?');
|
||||
if ($object->hasDelay()) {
|
||||
if ($projectstatic->hasDelay()) {
|
||||
print img_warning("Late");
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($projectstatic->public == 0) {
|
||||
print img_picto($langs->trans('PrivateProject'), 'private', 'class="paddingrightonly"');
|
||||
print $langs->trans("PrivateProject");
|
||||
} else {
|
||||
print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"');
|
||||
print $langs->trans("SharedProject");
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Location event
|
||||
print '<tr><td>'.$langs->trans("Location").'</td><td>';
|
||||
print $projectstatic->location;
|
||||
|
|
@ -334,11 +338,6 @@ if (!empty($withproject)) {
|
|||
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
// Description
|
||||
print '<tr><td class="titlefield tdtop">'.$langs->trans("Description").'</td><td class="valuefield">';
|
||||
print dol_htmlentitiesbr($projectstatic->description);
|
||||
print '</td></tr>';
|
||||
|
||||
// Categories
|
||||
if (isModEnabled('category')) {
|
||||
print '<tr><td class="titlefield valignmiddle">'.$langs->trans("Categories").'</td><td class="valuefield">';
|
||||
|
|
@ -346,6 +345,11 @@ if (!empty($withproject)) {
|
|||
print "</td></tr>";
|
||||
}
|
||||
|
||||
// Description
|
||||
print '<tr><td class="titlefield tdtop">'.$langs->trans("Description").'</td><td class="valuefield">';
|
||||
print dol_htmlentitiesbr($projectstatic->description);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td class="titlefield nowrap">';
|
||||
$typeofdata = 'checkbox:'.($projectstatic->accept_conference_suggestions ? ' checked="checked"' : '');
|
||||
$htmltext = $langs->trans("AllowUnknownPeopleSuggestConfHelp");
|
||||
|
|
@ -380,6 +384,20 @@ if (!empty($withproject)) {
|
|||
print $form->editfieldval($form->textwithpicto($langs->trans('MaxNbOfAttendees'), ''), 'max_attendees', $projectstatic->max_attendees, $projectstatic, $permissiontoadd, 'integer:3', '', null, null, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
// Link to ICS for the event
|
||||
print '<tr><td class="titlefield valignmiddle">'.$langs->trans("EventOrganizationICSLinkProject").'</td><td class="valuefield">';
|
||||
// Define $urlwithroot
|
||||
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
|
||||
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
|
||||
|
||||
// Show message
|
||||
$message = '<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ? "&entity=".$conf->entity : "");
|
||||
$message .= '&exportkey='.urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...'));
|
||||
$message .= "&project=".$projectstatic->id.'&module='.urlencode('project@eventorganization').'&file='.urlencode('calendar-'.$projectstatic->ref.'.ics').'&output=file">'.$langs->trans('DownloadICSLink').img_picto('', 'download', 'class="paddingleft"').'</a>';
|
||||
print $message;
|
||||
print "</td></tr>";
|
||||
|
||||
// Link for ICS for conference or booth
|
||||
print '<tr><td class="titlefield valignmiddle">'.$langs->trans("EventOrganizationICSLink").'</td><td>';
|
||||
// Define $urlwithroot
|
||||
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
|
||||
|
|
@ -421,7 +439,7 @@ if (!empty($withproject)) {
|
|||
//print '<div class="urllink">';
|
||||
//print '<input type="text" value="'.$linkregister.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
||||
print '<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.'" class="quatrevingtpercent">'.$link_subscription.'</a></div>';
|
||||
print '<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" href="'.$link_subscription.'">'.img_picto('', 'globe').'</a>';
|
||||
print '<a target="_blank" rel="noopener noreferrer" href="'.$link_subscription.'">'.img_picto('', 'globe').'</a>';
|
||||
//print '</div>';
|
||||
//print ajax_autoselect("linkregister");
|
||||
print '</td></tr>';
|
||||
|
|
@ -438,7 +456,7 @@ if (!empty($withproject)) {
|
|||
print '<br>';
|
||||
}
|
||||
|
||||
// Part to create
|
||||
// Part to create a conference or booth
|
||||
if ($action == 'create') {
|
||||
print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("ConferenceOrBooth")), '', 'object_'.$object->picto);
|
||||
|
||||
|
|
@ -477,7 +495,7 @@ if ($action == 'create') {
|
|||
//dol_set_focus('input[name="ref"]');
|
||||
}
|
||||
|
||||
// Part to edit record
|
||||
// Part to edit conference or booth
|
||||
if (($id || $ref) && $action == 'edit') {
|
||||
print load_fiche_titre($langs->trans("ConferenceOrBooth"), '', 'object_'.$object->picto);
|
||||
|
||||
|
|
@ -514,7 +532,7 @@ if (($id || $ref) && $action == 'edit') {
|
|||
print '</form>';
|
||||
}
|
||||
|
||||
// Part to show record
|
||||
// Part to show conference or booth
|
||||
if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) {
|
||||
$res = $object->fetch_optionals();
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
|||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
|
||||
|
|
@ -60,9 +60,10 @@ $cancel = GETPOST('cancel', 'aZ09');
|
|||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'conferenceorboothattendeecard'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
|
||||
$lineid = GETPOSTINT('lineid');
|
||||
$mode = GETPOST('mode', 'alpha');
|
||||
|
||||
$lineid = GETPOSTINT('lineid');
|
||||
|
||||
$conf_or_booth_id = GETPOSTINT('conforboothid');
|
||||
$fk_project = GETPOSTINT('fk_project');
|
||||
$withproject = 1;
|
||||
|
|
@ -76,10 +77,9 @@ $hookmanager->initHooks(array('conferenceorboothattendeecard', 'globalcard')); /
|
|||
|
||||
|
||||
$confOrBooth = null;
|
||||
|
||||
if ($conf_or_booth_id > 0) {
|
||||
if ($conf_or_booth_id > 0 || $fk_project > 0) {
|
||||
$confOrBooth = new ConferenceOrBooth($db);
|
||||
$result = $confOrBooth->fetch($id > 0 ? $id : $conf_or_booth_id);
|
||||
$result = $confOrBooth->fetch($fk_project > 0 ? $fk_project : $conf_or_booth_id);
|
||||
if ($result < 0) {
|
||||
setEventMessages(null, $confOrBooth->errors, 'errors');
|
||||
} else {
|
||||
|
|
@ -135,6 +135,17 @@ $permissionnote = $user->hasRight('eventorganization', 'write'); // Used by the
|
|||
$permissiondellink = $user->hasRight('eventorganization', 'write'); // Used by the include of actions_dellink.inc.php
|
||||
$upload_dir = $conf->eventorganization->multidir_output[isset($object->entity) ? $object->entity : 1];
|
||||
|
||||
// Security check
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||
$result = restrictedArea($user, 'eventorganization', $object->id, '', '', 'fk_soc', 'id', $isdraft);
|
||||
|
||||
if (!$permissiontoread) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
|
@ -147,20 +158,18 @@ if ($reshook < 0) {
|
|||
}
|
||||
|
||||
if (empty($reshook)) {
|
||||
$error = 0;
|
||||
|
||||
if (!empty($withproject)) {
|
||||
$backurlforlist = DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_list.php?withproject=1&fk_project='.((int) $fk_project);
|
||||
} else {
|
||||
$backurlforlist = DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_list.php';
|
||||
}
|
||||
//if (!empty($withproject)) {
|
||||
$backurlforlist = DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_list.php?withproject=1&fk_project='.((int) $fk_project);
|
||||
//} else {
|
||||
// $backurlforlist = DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_list.php';
|
||||
//}
|
||||
|
||||
if (empty($backtopage) || ($cancel && empty($id))) {
|
||||
if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
|
||||
if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
|
||||
$backtopage = $backurlforlist;
|
||||
} else {
|
||||
$backtopage = DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_card.php?fk_project='.((int) $fk_project).'&id='.($id > 0 ? $id : '__ID__');
|
||||
$backtopage = DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_card.php?fk_project='.((int) $fk_project).'&id='.($id > 0 ? $id : '__ID__').'&withproject=1';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -231,13 +240,16 @@ if (!empty($projectstatic->socid)) {
|
|||
$projectstatic->fetch_thirdparty();
|
||||
}
|
||||
|
||||
|
||||
$withProjectUrl = '';
|
||||
$object->project = clone $projectstatic;
|
||||
|
||||
if (!empty($withproject)) {
|
||||
// Tabs for project
|
||||
$tab = 'eventorganisation';
|
||||
$withProjectUrl = "&withproject=1";
|
||||
|
||||
$head = project_prepare_head($projectstatic);
|
||||
|
||||
print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public ? 'projectpub' : 'project'), 0, '', '');
|
||||
|
||||
$param = ($mode == 'mine' ? '&mode=mine' : '');
|
||||
|
|
@ -256,7 +268,7 @@ if (!empty($withproject)) {
|
|||
$morehtmlref .= '</div>';
|
||||
|
||||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('projet', 'all', 'lire')) {
|
||||
if (!$user->hasRight('project', 'all', 'lire')) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
|
@ -301,17 +313,15 @@ if (!empty($withproject)) {
|
|||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Visibility
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($projectstatic->public) {
|
||||
print $langs->trans('SharedProject');
|
||||
} else {
|
||||
print $langs->trans('PrivateProject');
|
||||
// Budget
|
||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||
if (strcmp($projectstatic->budget_amount, '')) {
|
||||
print '<span class="amount">'.price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).'</span>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Date start - end
|
||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||
// Date start - end project
|
||||
print '<tr><td>'.$langs->trans("Dates").' ('.$langs->trans("Project").')</td><td>';
|
||||
$start = dol_print_date($projectstatic->date_start, 'day');
|
||||
print($start ? $start : '?');
|
||||
$end = dol_print_date($projectstatic->date_end, 'day');
|
||||
|
|
@ -322,13 +332,34 @@ if (!empty($withproject)) {
|
|||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Budget
|
||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||
if (strcmp($projectstatic->budget_amount, '')) {
|
||||
print price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency);
|
||||
// Date start - end of event
|
||||
print '<tr><td>'.$langs->trans("Dates").' ('.$langs->trans("Event").')</td><td>';
|
||||
$start = dol_print_date($projectstatic->date_start_event, 'day');
|
||||
print($start ? $start : '?');
|
||||
$end = dol_print_date($projectstatic->date_end_event, 'day');
|
||||
print ' - ';
|
||||
print($end ? $end : '?');
|
||||
if ($projectstatic->hasDelay()) {
|
||||
print img_warning("Late");
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($projectstatic->public == 0) {
|
||||
print img_picto($langs->trans('PrivateProject'), 'private', 'class="paddingrightonly"');
|
||||
print $langs->trans("PrivateProject");
|
||||
} else {
|
||||
print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"');
|
||||
print $langs->trans("SharedProject");
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Location event
|
||||
print '<tr><td>'.$langs->trans("Location").'</td><td>';
|
||||
print $projectstatic->location;
|
||||
print '</td></tr>';
|
||||
|
||||
// Other attributes
|
||||
$cols = 2;
|
||||
//include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
||||
|
|
@ -342,18 +373,18 @@ if (!empty($withproject)) {
|
|||
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
// Categories
|
||||
if (isModEnabled('category')) {
|
||||
print '<tr><td class="titlefield valignmiddle">'.$langs->trans("Categories").'</td><td class="valuefield">';
|
||||
print $form->showCategories($projectstatic->id, Categorie::TYPE_PROJECT, 1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
// Description
|
||||
print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>';
|
||||
print nl2br($projectstatic->description);
|
||||
print '</td></tr>';
|
||||
|
||||
// Categories
|
||||
if (isModEnabled('category')) {
|
||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
||||
print $form->showCategories($projectstatic->id, 'project', 1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
print '<tr><td class="nowrap">';
|
||||
$typeofdata = 'checkbox:'.($projectstatic->accept_conference_suggestions ? ' checked="checked"' : '');
|
||||
$htmltext = $langs->trans("AllowUnknownPeopleSuggestConfHelp");
|
||||
|
|
@ -382,14 +413,34 @@ if (!empty($withproject)) {
|
|||
print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfRegistration'), $langs->trans("PriceOfRegistrationHelp")), 'price_registration', $projectstatic->price_registration, $projectstatic, 0, 'amount', '', null, null, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td valign="middle">'.$langs->trans("EventOrganizationICSLink").'</td><td>';
|
||||
print '<tr><td class="titlefield">';
|
||||
print $form->editfieldkey($form->textwithpicto($langs->trans('MaxNbOfAttendees'), ''), 'max_attendees', '', $projectstatic, $permissiontoadd, 'integer:3', '', 0, 0, 'projectid');
|
||||
print '</td><td class="valuefield">';
|
||||
print $form->editfieldval($form->textwithpicto($langs->trans('MaxNbOfAttendees'), ''), 'max_attendees', $projectstatic->max_attendees, $projectstatic, $permissiontoadd, 'integer:3', '', null, null, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
// Link to ICS for the event
|
||||
print '<tr><td class="titlefield valignmiddle">'.$langs->trans("EventOrganizationICSLinkProject").'</td><td class="valuefield">';
|
||||
// Define $urlwithroot
|
||||
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
|
||||
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
|
||||
|
||||
// Show message
|
||||
$message = '<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ? "&entity=".$conf->entity : "");
|
||||
$message .= '&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...');
|
||||
$message .= '&exportkey='.urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...'));
|
||||
$message .= "&project=".$projectstatic->id.'&module='.urlencode('project@eventorganization').'&file='.urlencode('calendar-'.$projectstatic->ref.'.ics').'&output=file">'.$langs->trans('DownloadICSLink').img_picto('', 'download', 'class="paddingleft"').'</a>';
|
||||
print $message;
|
||||
print "</td></tr>";
|
||||
|
||||
// Link for ICS for conference or booth
|
||||
print '<tr><td class="titlefield valignmiddle">'.$langs->trans("EventOrganizationICSLink").'</td><td>';
|
||||
// Define $urlwithroot
|
||||
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
|
||||
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
|
||||
|
||||
// Show message
|
||||
$message = '<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ? "&entity=".$conf->entity : "");
|
||||
$message .= '&exportkey='.urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...'));
|
||||
$message .= "&project=".$projectstatic->id.'&module='.urlencode('@eventorganization').'&status='.ConferenceOrBooth::STATUS_CONFIRMED.'">'.$langs->trans('DownloadICSLink').img_picto('', 'download', 'class="paddingleft"').'</a>';
|
||||
print $message;
|
||||
print "</td></tr>";
|
||||
|
|
@ -400,13 +451,13 @@ if (!empty($withproject)) {
|
|||
print $form->textwithpicto($langs->trans("SuggestOrVoteForConfOrBooth"), $langs->trans("EvntOrgRegistrationHelpMessage"));
|
||||
//print '</span>';
|
||||
print '</td><td>';
|
||||
$linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.$projectstatic->id;
|
||||
$encodedsecurekey = dol_hash(getDolGlobalString("EVENTORGANIZATION_SECUREKEY").'conferenceorbooth'.$projectstatic->id, 'md5');
|
||||
$linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.((int) $projectstatic->id);
|
||||
$encodedsecurekey = dol_hash(getDolGlobalString("EVENTORGANIZATION_SECUREKEY").'conferenceorbooth'.((int) $projectstatic->id), 'md5');
|
||||
$linksuggest .= '&securekey='.urlencode($encodedsecurekey);
|
||||
//print '<div class="urllink">';
|
||||
//print '<input type="text" value="'.$linksuggest.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
||||
print '<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$linksuggest.'" class="quatrevingtpercent">'.$linksuggest.'</a></div>';
|
||||
print '<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" href="'.$linksuggest.'">'.img_picto('', 'globe').'</a>';
|
||||
print '<a target="_blank" rel="noopener noreferrer" href="'.$linksuggest.'">'.img_picto('', 'globe').'</a>';
|
||||
//print '</div>';
|
||||
//print ajax_autoselect("linkregister");
|
||||
print '</td></tr>';
|
||||
|
|
@ -440,8 +491,8 @@ if (!empty($withproject)) {
|
|||
print '<br>';
|
||||
}
|
||||
|
||||
// Part to create
|
||||
if ($action == 'create' && $confOrBooth !== null) {
|
||||
// Part to create an attendee
|
||||
if ($action == 'create' && $confOrBooth === null) {
|
||||
print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("ConferenceOrBoothAttendee")), '', 'object_'.$object->picto);
|
||||
|
||||
|
||||
|
|
@ -449,9 +500,6 @@ if ($action == 'create' && $confOrBooth !== null) {
|
|||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
|
||||
if ($confOrBooth->id > 0) {
|
||||
print '<input type="hidden" name="conforboothid" value="'.$confOrBooth->id.'">';
|
||||
}
|
||||
if ($projectstatic->id > 0) {
|
||||
print '<input type="hidden" name="fk_project" value="'.$projectstatic->id.'">';
|
||||
print '<input type="hidden" name="projectid" value="'.$projectstatic->id.'">';
|
||||
|
|
@ -485,7 +533,7 @@ if ($action == 'create' && $confOrBooth !== null) {
|
|||
//dol_set_focus('input[name="ref"]');
|
||||
}
|
||||
|
||||
// Part to edit record
|
||||
// Part to edit attendee
|
||||
if (($id || $ref) && $action == 'edit' && $confOrBooth !== null) {
|
||||
print load_fiche_titre($langs->trans("ConferenceOrBoothAttendee"), '', 'object_'.$object->picto);
|
||||
|
||||
|
|
@ -528,7 +576,7 @@ if (($id || $ref) && $action == 'edit' && $confOrBooth !== null) {
|
|||
print '</form>';
|
||||
}
|
||||
|
||||
// Part to show record
|
||||
// Part to show attendee
|
||||
if ($confOrBooth !== null && $object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) {
|
||||
$object->fetch_optionals();
|
||||
|
||||
|
|
@ -574,7 +622,7 @@ if ($confOrBooth !== null && $object->id > 0 && (empty($action) || ($action != '
|
|||
|
||||
// Object card
|
||||
// ------------------------------------------------------------
|
||||
$linkback = '<a href="'.dol_buildpath('/eventorganization/conferenceorboothattendee_list.php', 1).'?restore_lastsearch_values=1'.(!empty($confOrBooth->id) && $confOrBooth->id > 0 ? '&conforboothid='.((int) $confOrBooth->id) : '').$moreparam.'">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '<a href="'.dol_buildpath('/eventorganization/conferenceorboothattendee_list.php', 1).'?restore_lastsearch_values=1'.$moreparam.'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
$morehtmlref = '<div class="refidno">';
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2018-2021 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -214,7 +214,7 @@ if (!$error && $massaction == 'confirm_presend_attendees') {
|
|||
$urlwithouturlroot = preg_replace('/' . preg_quote(DOL_URL_ROOT, '/') . '$/i', '', trim($dolibarr_main_url_root));
|
||||
$urlwithroot = $urlwithouturlroot . DOL_URL_ROOT;
|
||||
$url_link = $urlwithroot . '/public/agenda/agendaexport.php?format=ical' . ($conf->entity > 1 ? "&entity=" . $conf->entity : "");
|
||||
$url_link .= '&exportkey=' . ($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...');
|
||||
$url_link .= '&exportkey=' . urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...'));
|
||||
$url_link .= "&project=" . $listofselectedref[$email]->fk_project . '&module=' . urlencode('@eventorganization') . '&status=' . ConferenceOrBooth::STATUS_CONFIRMED;
|
||||
$html_link = '<a href="' . $url_link . '">' . $langs->trans('DownloadICSLink') . '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -448,7 +448,7 @@ class Fichinter extends CommonObject
|
|||
$sql .= ", date_valid = ".($this->datev ? "'".$this->db->idate($this->datev)."'" : "null");
|
||||
}
|
||||
if (isset($this->datet)) {
|
||||
$sql .= ", datet = '".($this->datet ? "'".$this->db->idate($this->datet)."'" : "null");
|
||||
$sql .= ", datet = ".($this->datet ? "'".$this->db->idate($this->datet)."'" : "null");
|
||||
}
|
||||
$sql .= ", note_private = ".($this->note_private ? "'".$this->db->escape($this->note_private)."'" : "null");
|
||||
$sql .= ", note_public = ".($this->note_public ? "'".$this->db->escape($this->note_public)."'" : "null");
|
||||
|
|
|
|||
|
|
@ -264,3 +264,6 @@ CREATE TABLE llx_webhook_history(
|
|||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_societe_rib ADD COLUMN cci varchar(100) after iban_prefix; -- Interbank code for some countries like Chile
|
||||
|
||||
ALTER TABLE llx_eventorganization_conferenceorboothattendee DROP INDEX idx_eventorganization_conferenceorboothattendee_ref;
|
||||
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD UNIQUE INDEX uk_eventorganization_confboothattendee(ref);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
-- BEGIN MODULEBUILDER INDEXES
|
||||
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_rowid (rowid);
|
||||
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_ref (ref);
|
||||
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_fk_soc (fk_soc);
|
||||
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_fk_actioncomm (fk_actioncomm);
|
||||
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_fk_project (fk_project);
|
||||
|
|
@ -24,5 +23,6 @@ ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_evento
|
|||
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_status (status);
|
||||
-- END MODULEBUILDER INDEXES
|
||||
|
||||
-- Note if we add the entity, we want the ref numbering rule per entity, so we must add entity in constraint.
|
||||
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD UNIQUE INDEX uk_eventorganization_confboothattendee (ref);
|
||||
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD UNIQUE INDEX uk_eventorganization_conferenceorboothattendee(fk_project, email, fk_actioncomm);
|
||||
|
||||
|
|
|
|||
|
|
@ -18,9 +18,11 @@ CREATE TABLE llx_webhook_history(
|
|||
-- BEGIN MODULEBUILDER FIELDS
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
--ref varchar(128) NOT NULL,
|
||||
trigger_code varchar(128) NOT NULL,
|
||||
trigger_data text NOT NULL,
|
||||
fk_target integer NOT NULL,
|
||||
url integer NOT NULL,
|
||||
error_messsage text,
|
||||
--note_public text,
|
||||
note_private text,
|
||||
date_creation datetime NOT NULL,
|
||||
|
|
|
|||
|
|
@ -162,3 +162,4 @@ NoRecordUpdated=No Record updated
|
|||
ProfitPerValidatedAttendee=Profit per attendee
|
||||
Confirmed=Confirmed
|
||||
NotSelected=Not selected
|
||||
TheLinkIsAvailableOnTheProjectEventCard=The links to suggest or vote for a conference or apply for a booth is provided into the page of the project/event
|
||||
|
|
|
|||
|
|
@ -379,4 +379,51 @@ SecurityPolicySucesfullyAdded=Content Security Policy successfully added
|
|||
ErrorAddingSecurityPolicy=An error occurred when trying to add a Content Security Policy
|
||||
UnknowContentSecurityPolicyDirective=Unknown Content Security Policy directive syntax
|
||||
FillCSPDirective=Please fill Content Security Policy directive
|
||||
FillCSPSource=Please fill Content Security Policy source
|
||||
FillCSPSource=Please fill Content Security Policy source
|
||||
presentation=Presentation
|
||||
missionVision=Mission & Vision
|
||||
directory=Members Directory
|
||||
newsEvents=News & Events
|
||||
actionsEvents=Actions & Events
|
||||
commitmentSupport=Commitment & Support
|
||||
becomeMember=Become a Member
|
||||
makeDonation=Make a Donation
|
||||
contact=Contact
|
||||
memberArea=Member Area
|
||||
noCompanyInfoSlogan=No company information defined
|
||||
noCompanyInfoDescription=No company %s and %s provided. Please update it in Company & Organization settings.
|
||||
highlights=Highlights
|
||||
volunteer=Volunteer
|
||||
member=Member
|
||||
fundsCollected=Funds Collected
|
||||
actions=Actions
|
||||
news=News
|
||||
readMore=Read More
|
||||
loadMore=Load more
|
||||
goal=Goal
|
||||
raised=Raised
|
||||
donateNow=Donate Now
|
||||
Participate=Participate
|
||||
contactTitle=Get in touch
|
||||
contactMessage=We are here to answer all your questions and help you. Feel free to contact us for any information or assistance.
|
||||
submit=Submit
|
||||
labelAddress=Address
|
||||
mailUs=Mail Us
|
||||
labelFirstName=Your First Name
|
||||
labelEmail=Your Email
|
||||
labelPhone=Your Phone
|
||||
labelSubject=Subject
|
||||
labelMessage=Your Message
|
||||
contactFormSubject=New contact request from %s website
|
||||
contactFormReceived = You have received a new message from %s website contact form
|
||||
contactFormName = Name
|
||||
contactFormEmail = Email
|
||||
contactFormPhone = Phone
|
||||
contactFormSubjectEntered = Subject entered
|
||||
contactFormMessageLabel = Message
|
||||
contactFormSuccessAlert = Thank you for your message. We will get back to you shortly.
|
||||
socials=Reseau sociaux
|
||||
rgpd=RGPD
|
||||
joinUs=Join US
|
||||
home=Home
|
||||
anonymous=Anonymous
|
||||
|
|
|
|||
|
|
@ -377,3 +377,50 @@ SecurityPolicySucesfullyRemoved=La politique de sécurité du contenu a été su
|
|||
ErrorRemovingSecurityPolicy=Une erreur s'est produite lors de la tentative de suppression d'une politique de sécurité du contenu
|
||||
SecurityPolicySucesfullyAdded=La politique de sécurité du contenu a été ajoutée avec succès
|
||||
ErrorAddingSecurityPolicy=Une erreur s'est produite lors de la tentative d'ajout d'une politique de sécurité du contenu
|
||||
presentation=Présentation
|
||||
missionVision=Mission & Vision
|
||||
directory=Annuaire des membres
|
||||
newsEvents=Actualités & Événements
|
||||
actionsEvents=Actions & Événements
|
||||
commitmentSupport=Engagement & Soutien
|
||||
becomeMember=Devenir membre
|
||||
makeDonation=Faire un don
|
||||
contact=Contact
|
||||
memberArea=Espace membre
|
||||
highlights=Chiffres
|
||||
volunteer=Bénévole
|
||||
member=Membre
|
||||
fundsCollected=Fonds collectés
|
||||
actions=Actions
|
||||
news=Actualités
|
||||
readMore=Lire la suite
|
||||
loadMore=Voir plus
|
||||
actionsEvents=Événements & Actions
|
||||
goal=Objectif
|
||||
raised=Collecté
|
||||
donateNow=Faire un don
|
||||
Participate= Participer
|
||||
contactTitle=Contactez-nous
|
||||
contactMessage=Nous sommes là pour répondre à toutes vos questions et vous aider. N'hésitez pas à nous contacter pour toute information ou assistance.
|
||||
submit=Envoyer
|
||||
labelAddress=Adresse
|
||||
labelEmail=E-mail
|
||||
labelPhone=Téléphone
|
||||
labelFirstName_fr=Votre prénom
|
||||
labelEmail_fr=Votre E-mail
|
||||
labelPhone_fr=Votre téléphone
|
||||
labelSubject_fr=Sujet
|
||||
labelMessage_fr=Votre message
|
||||
contactFormSubject = Nouvelle demande de contact depuis le site %s
|
||||
contactFormReceived = Vous avez reçu un nouveau message depuis le formulaire de contact du site %s.
|
||||
contactFormName = Nom
|
||||
contactFormEmail = Email
|
||||
contactFormPhone = Téléphone
|
||||
contactFormSubjectEntered = Sujet saisi
|
||||
contactFormMessageLabel = Message
|
||||
contactFormSuccessAlert = Merci pour votre message. Nous vous répondrons dans les plus brefs délais.
|
||||
socials=Réseaux sociaux
|
||||
rgpd=RGPD
|
||||
joinUs = Rejoignez-nous
|
||||
home=Accueil
|
||||
anonymous=Inconnu
|
||||
|
|
|
|||
|
|
@ -364,15 +364,7 @@ if (!empty($doactionsthenredirect)) {
|
|||
$ext_urlko = DOL_URL_ROOT.'/public/website/index.php?paymentsessionkey='.urlencode($randomseckey).'&website='.urlencode($ws).'&pageref=paymentko&fulltag='.$FULLTAG;
|
||||
}
|
||||
|
||||
if (getDolGlobalInt('MARKETPLACE_PAYMENT_IN_FRAME') == 1) { // TODO Remove this to make only a http redirect, if the website need a js redirect to parent frame, he must do it itself.
|
||||
dol_syslog("Now do a redirect in iframe mode in js to ".$ext_urlko, LOG_DEBUG, 0, '_payment');
|
||||
|
||||
// Redirect in js is not reliable
|
||||
print "<!DOCTYPE html><html><head></head><script>window.top.location.href = '".dol_escape_js($ext_urlko)."';</script></html>";
|
||||
} else {
|
||||
dol_syslog("Now do a redirect using Location : ".$ext_urlko, LOG_DEBUG, 0, '_payment');
|
||||
|
||||
header("Location: ".$ext_urlko);
|
||||
exit;
|
||||
}
|
||||
dol_syslog("Now do a redirect using Location : ".$ext_urlko, LOG_DEBUG, 0, '_payment');
|
||||
header("Location: ".$ext_urlko);
|
||||
exit;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2171,17 +2171,9 @@ if (!empty($doactionsthenredirect)) {
|
|||
$ext_urlok = DOL_URL_ROOT.'/public/website/index.php?paymentsessionkey='.urlencode($randomseckey).'&website='.urlencode($ws).'&pageref=paymentok&fulltag='.$FULLTAG;
|
||||
}
|
||||
|
||||
if (getDolGlobalInt('MARKETPLACE_PAYMENT_IN_FRAME') == 1) { // TODO Remove this to make only a http redirect, if the website need a js redirect to parent frame, he must do it itself.
|
||||
dol_syslog("Now do a redirect in iframe mode in js to ".$ext_urlok, LOG_DEBUG, 0, '_payment');
|
||||
|
||||
// Redirect in js is not reliable
|
||||
print "<!DOCTYPE html><html><head></head><script>window.top.location.href = '".dol_escape_js($ext_urlok)."';</script></html>";
|
||||
} else {
|
||||
dol_syslog("Now do a redirect using a Location: ".$ext_urlok, LOG_DEBUG, 0, '_payment');
|
||||
|
||||
header("Location: ".$ext_urlok);
|
||||
exit;
|
||||
}
|
||||
dol_syslog("Now do a redirect using a Location: ".$ext_urlok, LOG_DEBUG, 0, '_payment');
|
||||
header("Location: ".$ext_urlok);
|
||||
exit;
|
||||
} else {
|
||||
// Redirect to an error page
|
||||
// Paymentko page must be created for the specific website
|
||||
|
|
@ -2191,16 +2183,8 @@ if (!empty($doactionsthenredirect)) {
|
|||
$ext_urlko = DOL_URL_ROOT.'/public/website/index.php?paymentsessionkey='.urlencode($randomseckey).'&website='.urlencode($ws).'&pageref=paymentko&fulltag='.$FULLTAG;
|
||||
}
|
||||
|
||||
if (getDolGlobalInt('MARKETPLACE_PAYMENT_IN_FRAME') == 1) { // TODO Remove this to make only a http redirect, if the website need a js redirect to parent frame, he must do it itself.
|
||||
dol_syslog("Now do a redirect in iframe mode in js to ".$ext_urlko, LOG_DEBUG, 0, '_payment');
|
||||
|
||||
// Redirect in js is not reliable
|
||||
print "<!DOCTYPE html><html><head></head><script>window.top.location.href = '".dol_escape_js($ext_urlko)."';</script></html>";
|
||||
} else {
|
||||
dol_syslog("Now do a redirect using a Location:".$ext_urlko, LOG_DEBUG, 0, '_payment');
|
||||
|
||||
header("Location: ".$ext_urlko);
|
||||
exit;
|
||||
}
|
||||
dol_syslog("Now do a redirect using a Location:".$ext_urlko, LOG_DEBUG, 0, '_payment');
|
||||
header("Location: ".$ext_urlko);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@
|
|||
/**
|
||||
* \file htdocs/public/project/index.php
|
||||
* \ingroup core
|
||||
* \brief File to offer a way to suggest a conference or a booth for an event
|
||||
* \brief Page to offer a way to suggest a conference or a booth for a given event.
|
||||
* Link of this page is given into the project card.
|
||||
*/
|
||||
|
||||
if (!defined('NOLOGIN')) {
|
||||
|
|
@ -54,8 +55,6 @@ require_once DOL_DOCUMENT_ROOT.'/societe/class/societeaccount.class.php';
|
|||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
|
||||
global $dolibarr_main_url_root;
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
|
|
@ -240,7 +239,7 @@ print '<input type="hidden" name="forcesandbox" value="'.GETPOSTINT('forcesandbo
|
|||
print "\n";
|
||||
|
||||
|
||||
print '<div align="center">';
|
||||
print '<div class="centergrid">';
|
||||
print '<div id="divsubscribe">';
|
||||
|
||||
|
||||
|
|
@ -251,7 +250,7 @@ print load_fiche_titre($langs->trans("NewRegistration"), '', '', 0, '', 'center'
|
|||
print '<span class="opacitymedium">'.$langs->trans("EvntOrgRegistrationWelcomeMessage").'</span>';
|
||||
print '<br>';
|
||||
// Title
|
||||
print '<span class="eventlabel large">'.dol_escape_htmltag($project->title . ' '. $conference->label).'</span><br>';
|
||||
print '<span class="eventlabel large">'.dol_escape_htmltag($project->title).'</span><br>';
|
||||
print '</div>';
|
||||
|
||||
// Help text
|
||||
|
|
@ -293,16 +292,8 @@ print '<br>';
|
|||
|
||||
print '<table id="dolsuggestboost" summary="Suggest a boost form" class="center">'."\n";
|
||||
|
||||
print $text;
|
||||
|
||||
// Output payment summary form
|
||||
print '<tr><td align="center">';
|
||||
|
||||
$found = false;
|
||||
$error = 0;
|
||||
$var = false;
|
||||
|
||||
$object = null;
|
||||
print '<tr><td class="center">';
|
||||
|
||||
print "\n";
|
||||
|
||||
|
|
@ -344,8 +335,9 @@ print '</div>'."\n";
|
|||
print '<br>';
|
||||
|
||||
|
||||
$suffix = '';
|
||||
|
||||
htmlPrintOnlineFooter($mysoc, $langs, 1, $suffix, $object);
|
||||
htmlPrintOnlineFooter($mysoc, $langs, 1, $suffix, $project);
|
||||
|
||||
llxFooter('', 'public');
|
||||
|
||||
|
|
|
|||
|
|
@ -589,6 +589,7 @@ input.buttonpaymentstripe {
|
|||
max-height: 80px;
|
||||
max-width: 300px;
|
||||
image-rendering: -webkit-optimize-contrast; /* better rendering on public page header */
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
a.butStatus {
|
||||
|
|
@ -1021,6 +1022,11 @@ textarea.centpercent {
|
|||
.centerimp {
|
||||
text-align: center !important;
|
||||
}
|
||||
.centergrid {
|
||||
display: grid;
|
||||
text-align: center;
|
||||
place-items: center;
|
||||
}
|
||||
.alignstart {
|
||||
text-align: start;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -788,6 +788,7 @@ input.buttonpaymentstripe {
|
|||
max-height: 80px;
|
||||
max-width: 300px;
|
||||
image-rendering: -webkit-optimize-contrast; /* better rendering on public page header */
|
||||
border-radius: 4px;
|
||||
}
|
||||
a.butStatus {
|
||||
padding-left: 5px;
|
||||
|
|
@ -1202,6 +1203,11 @@ textarea.centpercent {
|
|||
.centerimp {
|
||||
text-align: center !important;
|
||||
}
|
||||
.centergrid {
|
||||
display: grid;
|
||||
text-align: center;
|
||||
place-items: center;
|
||||
}
|
||||
.alignstart {
|
||||
text-align: start;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,6 +104,29 @@ class FichinterTest extends CommonClassTest
|
|||
return $localobject;
|
||||
}
|
||||
|
||||
/**
|
||||
* testFichinterUpdate
|
||||
*
|
||||
* Check that a intervention object can be updated.
|
||||
*
|
||||
* @param Object $localobject An existing intervention object to update.
|
||||
* @return Intervention object with data fetched and description changed
|
||||
*
|
||||
* @depends testFichinterFetch
|
||||
*/
|
||||
public function testFichinterUpdate($localobject)
|
||||
{
|
||||
global $user;
|
||||
|
||||
$localobject->description = "foobar";
|
||||
|
||||
$result = $localobject->update($user);
|
||||
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
||||
$this->assertLessThan($result, 0, $localobject->errorsToString());
|
||||
|
||||
return $localobject;
|
||||
}
|
||||
|
||||
/**
|
||||
* testFichinterValid
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue