Debug module conference or booth
This commit is contained in:
parent
c7444865a1
commit
dad4c34ec5
@ -242,11 +242,11 @@ class ConferenceOrBooth extends ActionComm
|
||||
*/
|
||||
public function fetch($id, $ref = null, $ref_ext = '', $email_msgid = '')
|
||||
{
|
||||
global $dolibarr_main_url_root, $dolibarr_main_instance_unique_id, $conf, $langs;
|
||||
global $dolibarr_main_url_root, $conf, $langs;
|
||||
|
||||
$result = parent::fetch($id, $ref, $ref_ext, $email_msgid);
|
||||
|
||||
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_subscription.php?id='.$id;
|
||||
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_subscription.php?id='.urlencode($id);
|
||||
|
||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
|
||||
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
||||
|
||||
@ -33,13 +33,13 @@ if ($conf->categorie->enabled) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
}
|
||||
|
||||
global $dolibarr_main_url_root;
|
||||
|
||||
// for other modules
|
||||
//dol_include_once('/othermodule/class/otherobject.class.php');
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("eventorganization", "other"));
|
||||
|
||||
global $dolibarr_main_url_root, $dolibarr_main_instance_unique_id;
|
||||
$langs->loadLangs(array("eventorganization", "other", "projects"));
|
||||
|
||||
$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
|
||||
$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
|
||||
@ -228,7 +228,7 @@ $now = dol_now();
|
||||
|
||||
//$help_url="EN:Module_ConferenceOrBooth|FR:Module_ConferenceOrBooth_FR|ES:Módulo_ConferenceOrBooth";
|
||||
$help_url = '';
|
||||
$title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("ConferenceOrBooths"));
|
||||
$title = $langs->trans('ListOfConferencesOrBooths');
|
||||
|
||||
if ($projectid > 0) {
|
||||
$project = new Project($db);
|
||||
@ -246,9 +246,9 @@ if ($projectid > 0) {
|
||||
}
|
||||
|
||||
$help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
|
||||
$title = $langs->trans("Project") . ' - ' . $langs->trans("ConferenceOrBooths") . ' - ' . $project->ref . ' ' . $project->name;
|
||||
$title = $langs->trans("Project") . ' - ' . $langs->trans("ListOfConferencesOrBooths") . ' - ' . $project->ref . ' ' . $project->name;
|
||||
if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $project->name) {
|
||||
$title = $project->ref . ' ' . $project->name . ' - ' . $langs->trans("ConferenceOrBooths");
|
||||
$title = $project->ref . ' ' . $project->name . ' - ' . $langs->trans("ListOfConferencesOrBooths");
|
||||
}
|
||||
}
|
||||
|
||||
@ -352,14 +352,6 @@ if ($projectid > 0) {
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Link to the vote/register page
|
||||
print '<tr><td>'.$langs->trans("RegisterPage").'</td><td>';
|
||||
$linkregister = $dolibarr_main_url_root.'/public/project/index.php?id='.$project->id;
|
||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$project->id, 2);
|
||||
$linkregister .= '&securekey='.urlencode($encodedsecurekey);
|
||||
print '<a target="_blank" href="'.$linkregister.'">'.$linkregister.'</a>';
|
||||
print '</td></tr>';
|
||||
|
||||
// Other attributes
|
||||
$cols = 2;
|
||||
$objectconf=$object;
|
||||
@ -422,12 +414,45 @@ if ($projectid > 0) {
|
||||
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
|
||||
|
||||
// Show message
|
||||
$message = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ? "&entity=".$conf->entity : "");
|
||||
$message = '<a target="blank" href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ? "&entity=".$conf->entity : "");
|
||||
$message .= '&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...');
|
||||
$message .= "&project=".$projectid.'&module='.urlencode('@eventorganization').'&status='.ConferenceOrBooth::STATUS_CONFIRMED.'">'.$langs->trans('DownloadICSLink').'</a>';
|
||||
$message .= "&project=".$projectid.'&module='.urlencode('@eventorganization').'&status='.ConferenceOrBooth::STATUS_CONFIRMED.'">'.$langs->trans('DownloadICSLink').img_picto('', 'download', 'class="paddingleft"').'</a>';
|
||||
print $message;
|
||||
print "</td></tr>";
|
||||
|
||||
// Link to the submit vote/register page
|
||||
print '<tr><td>';
|
||||
//print '<span class="opacitymedium">';
|
||||
print $form->textwithpicto($langs->trans("SuggestOrVoteForConfOrBooth"), $langs->trans("EvntOrgRegistrationHelpMessage"));
|
||||
//print '</span>';
|
||||
print '</td><td>';
|
||||
$linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.$project->id;
|
||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$project->id, 2);
|
||||
$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" href="'.$linksuggest.'">'.img_picto('', 'globe').'</a>';
|
||||
//print '</div>';
|
||||
//print ajax_autoselect("linkregister");
|
||||
print '</td></tr>';
|
||||
|
||||
// Link to the subscribe
|
||||
print '<tr><td>';
|
||||
//print '<span class="opacitymedium">';
|
||||
print $langs->trans("PublicAttendeeSubscriptionPage");
|
||||
//print '</span>';
|
||||
print '</td><td>';
|
||||
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_subscription.php?id='.$project->id;
|
||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$project->id, 2);
|
||||
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
||||
//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" href="'.$link_subscription.'">'.img_picto('', 'globe').'</a>';
|
||||
//print '</div>';
|
||||
//print ajax_autoselect("linkregister");
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -437,7 +462,6 @@ if ($projectid > 0) {
|
||||
|
||||
print '<div class="clearboth"></div>';
|
||||
|
||||
|
||||
print dol_get_fiche_end();
|
||||
}
|
||||
|
||||
@ -612,7 +636,7 @@ $newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle'
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
// Add code for pre mass action (confirmation or email presend form)
|
||||
$topicmail = "SendConferenceOrBoothRef";
|
||||
$topicmail = $object->ref;
|
||||
$modelmail = "conferenceorbooth";
|
||||
$objecttmp = new ConferenceOrBooth($db);
|
||||
$trackid = 'conferenceorbooth_'.$object->id;
|
||||
@ -665,7 +689,7 @@ foreach ($object->fields as $key => $val) {
|
||||
$cssforfield .= ($cssforfield ? ' ' : '').'center';
|
||||
} elseif (in_array($val['type'], array('timestamp'))) {
|
||||
$cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
|
||||
} elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID') {
|
||||
} elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('rowid', 'ref')) && $val['label'] != 'TechnicalID') {
|
||||
$cssforfield .= ($cssforfield ? ' ' : '').'right';
|
||||
}
|
||||
if (!empty($arrayfields['t.'.$key]['checked'])) {
|
||||
@ -713,7 +737,7 @@ foreach ($object->fields as $key => $val) {
|
||||
$cssforfield .= ($cssforfield ? ' ' : '').'center';
|
||||
} elseif (in_array($val['type'], array('timestamp'))) {
|
||||
$cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
|
||||
} elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID') {
|
||||
} elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('rowid', 'ref')) && $val['label'] != 'TechnicalID') {
|
||||
$cssforfield .= ($cssforfield ? ' ' : '').'right';
|
||||
}
|
||||
if (!empty($arrayfields['t.'.$key]['checked'])) {
|
||||
@ -768,10 +792,10 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
||||
if (in_array($val['type'], array('timestamp'))) {
|
||||
$cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
|
||||
} elseif ($key == 'ref') {
|
||||
$cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
|
||||
$cssforfield .= ($cssforfield ? ' ' : '').'nowrap left';
|
||||
}
|
||||
|
||||
if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('rowid', 'status'))) {
|
||||
if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('rowid', 'ref', 'status'))) {
|
||||
$cssforfield .= ($cssforfield ? ' ' : '').'right';
|
||||
}
|
||||
//if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100';
|
||||
|
||||
@ -100,16 +100,17 @@ EvntOrgCancelled = Cancelled
|
||||
# Public page
|
||||
#
|
||||
SuggestForm = Suggestion page
|
||||
RegisterPage = Page for conferences or booth
|
||||
SuggestOrVoteForConfOrBooth = Page for suggestion or vote
|
||||
EvntOrgRegistrationHelpMessage = Here, you can vote for an event, or suggest a new conference or booth for the project
|
||||
EvntOrgRegistrationConfHelpMessage = Here, you can suggest a new conference for the project
|
||||
EvntOrgRegistrationBoothHelpMessage = Here, you can suggest a new booth for the project
|
||||
ListOfSuggestedConferences = List of suggested conferences
|
||||
ListOfSuggestedBooths = List of suggested booths
|
||||
ListOfConferencesOrBooths=List of conferences or booths
|
||||
SuggestConference = Suggest a new conference
|
||||
SuggestBooth = Suggest a booth
|
||||
ViewAndVote = View and vote for suggested events
|
||||
PublicAttendeeSubscriptionPage = Public link of registration to a conference
|
||||
PublicAttendeeSubscriptionPage = Public link for registration to the event
|
||||
MissingOrBadSecureKey = The security key is invalid or missing
|
||||
EvntOrgWelcomeMessage = This form allows you to register as a new participant to the conference : '%s'
|
||||
EvntOrgDuration = This conference starts on %s and ends on %s.
|
||||
@ -122,6 +123,8 @@ ConferenceIsNotConfirmed=Subcription not available, conference is not confirmed
|
||||
DateMustBeBeforeThan=%s must be before %s
|
||||
DateMustBeAfterThan=%s must be after %s
|
||||
|
||||
NewSubscription=Registration
|
||||
|
||||
#
|
||||
# Vote page
|
||||
#
|
||||
|
||||
@ -564,9 +564,9 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
||||
print '<br>';
|
||||
}
|
||||
if (!empty($conf->eventorganization->enabled)) {
|
||||
print '<input type="checkbox" name="usage_organize_event"'.(GETPOST('usage_organize_event', 'alpha')!=''?' checked="checked"':'').'"> ';
|
||||
print '<input type="checkbox" id="usage_organize_event" name="usage_organize_event"'.(GETPOST('usage_organize_event', 'alpha')!=''?' checked="checked"':'').'"> ';
|
||||
$htmltext = $langs->trans("EventOrganizationDescriptionLong");
|
||||
print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
|
||||
print '<label for="usage_organize_event">'.$form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext).'</label>';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -830,7 +830,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
||||
print '<input type="checkbox" id="usage_opportunity" name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_opportunity ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<label for="usage_opportunity">'.$form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext).'</label>';
|
||||
print '<script>';
|
||||
print '$( document ).ready(function() {
|
||||
jQuery("#usage_opportunity").change(function() {
|
||||
@ -847,21 +847,21 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
||||
print '<br>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS)) {
|
||||
print '<input type="checkbox" name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')) . '"> ';
|
||||
print '<input type="checkbox" id="usage_task" name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')) . '"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<label for="usage_task">'.$form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext).'</label>';
|
||||
print '<br>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) {
|
||||
print '<input type="checkbox" name="usage_bill_time"' . (GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')) . '"> ';
|
||||
print '<input type="checkbox" id="usage_bill_time" name="usage_bill_time"' . (GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')) . '"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<label for="usage_bill_time">'.$form->textwithpicto($langs->trans("BillTime"), $htmltext).'</label>';
|
||||
print '<br>';
|
||||
}
|
||||
if (!empty($conf->eventorganization->enabled)) {
|
||||
print '<input type="checkbox" name="usage_organize_event"'. (GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')) . '"> ';
|
||||
print '<input type="checkbox" id="usage_organize_event" name="usage_organize_event"'. (GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')) . '"> ';
|
||||
$htmltext = $langs->trans("EventOrganizationDescriptionLong");
|
||||
print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
|
||||
print '<label for="usage_organize_event">'.$form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext).'</label>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/public/members/new.php
|
||||
* \ingroup member
|
||||
* \brief Example of form to add a new member
|
||||
* \file htdocs/public/eventorganization/attendee_subscription.php
|
||||
* \ingroup project
|
||||
* \brief Example of form to subscribe to an event
|
||||
*
|
||||
* Note that you can add following constant to change behaviour of page
|
||||
* MEMBER_NEWFORM_AMOUNT Default amount for auto-subscribe form
|
||||
@ -79,12 +79,13 @@ $email = GETPOST("email");
|
||||
$societe = GETPOST("societe");
|
||||
|
||||
// Getting id from Post and decoding it
|
||||
$id = GETPOST('id');
|
||||
$id = GETPOST('id', 'int');
|
||||
|
||||
$conference = new ConferenceOrBooth($db);
|
||||
$resultconf = $conference->fetch($id);
|
||||
if ($resultconf < 0) {
|
||||
setEventMessages(null, $conference->errors, "errors");
|
||||
print 'Bad value for parameter id';
|
||||
exit;
|
||||
}
|
||||
|
||||
$project = new Project($db);
|
||||
@ -196,7 +197,7 @@ function llxFooterVierge()
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
global $mysoc;
|
||||
|
||||
$parameters = array();
|
||||
// Note that $action and $object may have been modified by some hooks
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action);
|
||||
@ -205,7 +206,7 @@ if ($reshook < 0) {
|
||||
}
|
||||
|
||||
// Action called when page is submitted
|
||||
if (empty($reshook) && $action == 'add' && $conference->status==2) {
|
||||
if (empty($reshook) && $action == 'add' && $conference->status == 2) {
|
||||
$error = 0;
|
||||
|
||||
$urlback = '';
|
||||
@ -460,7 +461,7 @@ $formcompany = new FormCompany($db);
|
||||
|
||||
llxHeaderVierge($langs->trans("NewSubscription"));
|
||||
|
||||
|
||||
print '<br>';
|
||||
print load_fiche_titre($langs->trans("NewSubscription"), '', '', 0, 0, 'center');
|
||||
|
||||
|
||||
@ -473,6 +474,9 @@ print $langs->trans("EvntOrgWelcomeMessage", $conference->label);
|
||||
print '<br>';
|
||||
print $langs->trans("EvntOrgDuration", dol_print_date($conference->datep), dol_print_date($conference->datef));
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
dol_htmloutput_errors($errmsg);
|
||||
|
||||
if ($conference->status!=2) {
|
||||
|
||||
@ -195,7 +195,7 @@ if (!empty($conf->global->PROJECT_IMAGE_PUBLIC_ORGANIZEDEVENT)) {
|
||||
print '<table id="dolpaymenttable" summary="Payment form" class="center">'."\n";
|
||||
|
||||
$text = '<tr><td class="textpublicpayment"><br><strong>'.$langs->trans("EvntOrgRegistrationWelcomeMessage").'</strong></td></tr>'."\n";
|
||||
$text .= '<tr><td class="textpublicpayment">'.$langs->trans("EvntOrgRegistrationHelpMessage").' '.$id.'.<br><br></td></tr>'."\n";
|
||||
$text .= '<tr><td class="textpublicpayment">'.$langs->trans("EvntOrgRegistrationHelpMessage").' '.$project->title.'.<br><br></td></tr>'."\n";
|
||||
$text .= '<tr><td class="textpublicpayment">'.$project->note_public.'<br><br></td></tr>'."\n";;
|
||||
|
||||
print $text;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user