Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
This commit is contained in:
commit
363bfd1a48
@ -86,6 +86,7 @@ $hookmanager->initHooks(array('contactcard', 'globalcard'));
|
||||
|
||||
if ($id > 0) {
|
||||
$object->fetch($id);
|
||||
$object->info($id);
|
||||
}
|
||||
|
||||
if (!($object->id > 0) && $action == 'view') {
|
||||
@ -101,6 +102,9 @@ $permissiontoadd = $user->rights->societe->contact->creer;
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
if ($object->priv && $object->user_creation->id != $user->id) {
|
||||
accessforbidden();
|
||||
}
|
||||
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', 0); // If we create a contact with no company (shared contacts), no check on write permission
|
||||
|
||||
|
||||
|
||||
@ -1123,6 +1123,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as t";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople_extrafields as ef on (t.rowid = ef.fk_object)";
|
||||
$sql .= " WHERE t.fk_soc = ".((int) $object->id);
|
||||
$sql .= " AND ((t.fk_user_creat = ".((int) $user->id)." AND t.priv = 1) OR t.priv = 0)";
|
||||
if ($search_rowid) {
|
||||
$sql .= natural_search('t.rowid', $search_rowid);
|
||||
}
|
||||
|
||||
@ -209,7 +209,7 @@ $toutsujet = explode(",", $object->sujet);
|
||||
$listofanswers = array();
|
||||
foreach ($toutsujet as $value) {
|
||||
$tmp = explode('@', $value);
|
||||
$listofanswers[] = array('label'=>$tmp[0], 'format'=>($tmp[1] ? $tmp[1] : 'checkbox'));
|
||||
$listofanswers[] = array('label'=>$tmp[0], 'format'=>(!empty($tmp[1]) ? $tmp[1] : 'checkbox'));
|
||||
}
|
||||
$toutsujet = str_replace("@", "<br>", $toutsujet);
|
||||
$toutsujet = str_replace("°", "'", $toutsujet);
|
||||
|
||||
@ -274,7 +274,7 @@ class Opensurveysondage extends CommonObject
|
||||
$this->sujet = $obj->sujet;
|
||||
$this->fk_user_creat = $obj->fk_user_creat;
|
||||
|
||||
$this->date_m = $this->db->jdate($obj->tls);
|
||||
$this->date_m = $this->db->jdate(!empty($obj->tls) ? $obj->tls : "");
|
||||
$ret = 1;
|
||||
} else {
|
||||
$sondage = ($id ? 'id='.$id : 'sondageid='.$numsurvey);
|
||||
@ -686,7 +686,7 @@ class Opensurveysondage extends CommonObject
|
||||
{
|
||||
$result = 0;
|
||||
|
||||
$sql .= " SELECT COUNT(id_users) as nb FROM ".MAIN_DB_PREFIX."opensurvey_user_studs";
|
||||
$sql = " SELECT COUNT(id_users) as nb FROM ".MAIN_DB_PREFIX."opensurvey_user_studs";
|
||||
$sql .= " WHERE id_sondage = '".$this->db->escape($this->ref)."'";
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
@ -63,9 +63,9 @@ $now = dol_now();
|
||||
|
||||
$nbcolonnes = substr_count($object->sujet, ',') + 1;
|
||||
$toutsujet = explode(",", $object->sujet);
|
||||
|
||||
$somme = array();
|
||||
// affichage des sujets du sondage
|
||||
$input .= $langs->trans("Name").";";
|
||||
$input = $langs->trans("Name").";";
|
||||
for ($i = 0; $toutsujet[$i]; $i++) {
|
||||
if ($object->format == "D") {
|
||||
$input .= ''.dol_print_date($toutsujet[$i], 'dayhour').';';
|
||||
@ -105,6 +105,9 @@ if ($resql) {
|
||||
//affichage des resultats
|
||||
$ensemblereponses = $obj->reponses;
|
||||
for ($k = 0; $k < $nbcolonnes; $k++) {
|
||||
if (empty($somme[$k])) {
|
||||
$somme[$k] = 0;
|
||||
}
|
||||
$car = substr($ensemblereponses, $k, 1);
|
||||
if ($car == "1") {
|
||||
$input .= 'OK;';
|
||||
|
||||
@ -40,6 +40,7 @@ $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'opensurveylist'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
|
||||
|
||||
$id = GETPOST('id', 'alpha');
|
||||
$search_ref = GETPOST('search_ref', 'alpha');
|
||||
@ -175,16 +176,16 @@ $sql .= " WHERE p.entity IN (".getEntity('survey').")";
|
||||
if ($search_status != '-1' && $search_status != '') {
|
||||
$sql .= natural_search("p.status", $search_status, 2);
|
||||
}
|
||||
if ($search_expired == 'expired') {
|
||||
if (!empty($search_expired) && $search_expired == 'expired') {
|
||||
$sql .= " AND p.date_fin < '".$db->idate($now)."'";
|
||||
}
|
||||
if ($search_expired == 'opened') {
|
||||
if (!empty($search_expired) && $search_expired == 'opened') {
|
||||
$sql .= " AND p.date_fin >= '".$db->idate($now)."'";
|
||||
}
|
||||
if ($search_ref) {
|
||||
if (!empty($search_ref)) {
|
||||
$sql .= natural_search("p.id_sondage", $search_ref);
|
||||
}
|
||||
if ($search_title) {
|
||||
if (!empty($search_title)) {
|
||||
$sql .= natural_search("p.titre", $search_title);
|
||||
}
|
||||
// Add where from extra fields
|
||||
|
||||
@ -435,7 +435,7 @@ $toutsujet = explode(",", $object->sujet);
|
||||
$listofanswers = array();
|
||||
foreach ($toutsujet as $value) {
|
||||
$tmp = explode('@', $value);
|
||||
$listofanswers[] = array('label'=>$tmp[0], 'format'=>($tmp[1] ? $tmp[1] : 'checkbox'));
|
||||
$listofanswers[] = array('label'=>$tmp[0], 'format'=>(!empty($tmp[1]) ? $tmp[1] : 'checkbox'));
|
||||
}
|
||||
$toutsujet = str_replace("@", "<br>", $toutsujet);
|
||||
$toutsujet = str_replace("°", "'", $toutsujet);
|
||||
|
||||
@ -68,6 +68,14 @@ $search_month = GETPOST('search_month', 'int');
|
||||
$search_year = GETPOST('search_year', 'int');
|
||||
$search_datehour = '';
|
||||
$search_datewithhour = '';
|
||||
$search_date_startday = GETPOST('search_date_startday', 'int');
|
||||
$search_date_startmonth = GETPOST('search_date_startmonth', 'int');
|
||||
$search_date_startyear = GETPOST('search_date_startyear', 'int');
|
||||
$search_date_endday = GETPOST('search_date_endday', 'int');
|
||||
$search_date_endmonth = GETPOST('search_date_endmonth', 'int');
|
||||
$search_date_endyear = GETPOST('search_date_endyear', 'int');
|
||||
$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
|
||||
$search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
|
||||
$search_note = GETPOST('search_note', 'alpha');
|
||||
$search_duration = GETPOST('search_duration', 'int');
|
||||
$search_value = GETPOST('search_value', 'int');
|
||||
@ -77,6 +85,9 @@ $search_user = GETPOST('search_user', 'int');
|
||||
$search_valuebilled = GETPOST('search_valuebilled', 'int');
|
||||
$search_product_ref = GETPOST('search_product_ref', 'alpha');
|
||||
$search_company = GETPOST('$search_company', 'alpha');
|
||||
$search_company_alias = GETPOST('$search_company_alias', 'alpha');
|
||||
$search_project_ref = GETPOST('$search_project_ref', 'alpha');
|
||||
$search_project_label = GETPOST('$search_project_label', 'alpha');
|
||||
|
||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||
@ -166,8 +177,19 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
||||
$search_value = '';
|
||||
$search_date_creation = '';
|
||||
$search_date_update = '';
|
||||
$search_date_startday = '';
|
||||
$search_date_startmonth = '';
|
||||
$search_date_startyear = '';
|
||||
$search_date_endday = '';
|
||||
$search_date_endmonth = '';
|
||||
$search_date_endyear = '';
|
||||
$search_date_start = '';
|
||||
$search_date_end = '';
|
||||
$search_task_ref = '';
|
||||
$search_company = '';
|
||||
$search_company_alias = '';
|
||||
$search_project_ref = '';
|
||||
$search_project_label = '';
|
||||
$search_task_label = '';
|
||||
$search_user = 0;
|
||||
$search_valuebilled = '';
|
||||
@ -1220,7 +1242,12 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
||||
$arrayfields = array();
|
||||
$arrayfields['t.task_date'] = array('label'=>$langs->trans("Date"), 'checked'=>1);
|
||||
$arrayfields['p.fk_soc'] = array('label'=>$langs->trans("ThirdParty"), 'type'=>'integer:Societe:/societe/class/societe.class.php:1','checked'=>1);
|
||||
$arrayfields['s.name_alias'] = array('label'=>$langs->trans("AliasNameShort"), 'type'=>'integer:Societe:/societe/class/societe.class.php:1');
|
||||
if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task
|
||||
if (! empty($allprojectforuser)) {
|
||||
$arrayfields['p.project_ref'] = ['label' => $langs->trans('RefProject'), 'checked' => 1];
|
||||
$arrayfields['p.project_label'] = ['label' => $langs->trans('ProjectLabel'), 'checked' => 1];
|
||||
}
|
||||
$arrayfields['t.task_ref'] = array('label'=>$langs->trans("RefTask"), 'checked'=>1);
|
||||
$arrayfields['t.task_label'] = array('label'=>$langs->trans("LabelTask"), 'checked'=>1);
|
||||
}
|
||||
@ -1259,6 +1286,15 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
||||
if ($search_company != '') {
|
||||
$param .= '&$search_company='.urlencode($search_company);
|
||||
}
|
||||
if ($search_company_alias != '') {
|
||||
$param .= '&$search_company_alias='.urlencode($search_company_alias);
|
||||
}
|
||||
if ($search_project_ref != '') {
|
||||
$param .= '&$search_project_ref='.urlencode($search_project_ref);
|
||||
}
|
||||
if ($search_project_label != '') {
|
||||
$param .= '&$search_project_label='.urlencode($search_project_label);
|
||||
}
|
||||
if ($search_task_label != '') {
|
||||
$param .= '&search_task_label='.urlencode($search_task_label);
|
||||
}
|
||||
@ -1271,6 +1307,25 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
||||
if ($optioncss != '') {
|
||||
$param .= '&optioncss='.urlencode($optioncss);
|
||||
}
|
||||
if ($search_date_startday) {
|
||||
$param .= '&search_date_startday='.urlencode($search_date_startday);
|
||||
}
|
||||
if ($search_date_startmonth) {
|
||||
$param .= '&search_date_startmonth='.urlencode($search_date_startmonth);
|
||||
}
|
||||
if ($search_date_startyear) {
|
||||
$param .= '&search_date_startyear='.urlencode($search_date_startyear);
|
||||
}
|
||||
if ($search_date_endday) {
|
||||
$param .= '&search_date_endday='.urlencode($search_date_endday);
|
||||
}
|
||||
if ($search_date_endmonth) {
|
||||
$param .= '&search_date_endmonth='.urlencode($search_date_endmonth);
|
||||
}
|
||||
if ($search_date_endyear) {
|
||||
$param .= '&search_date_endyear='.urlencode($search_date_endyear);
|
||||
}
|
||||
|
||||
/*
|
||||
// Add $param from extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||
@ -1460,7 +1515,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
||||
$sql .= " pt.ref, pt.label, pt.fk_projet,";
|
||||
$sql .= " u.lastname, u.firstname, u.login, u.photo, u.statut as user_status,";
|
||||
$sql .= " il.fk_facture as invoice_id, inv.fk_statut,";
|
||||
$sql .= " p.fk_soc,";
|
||||
$sql .= " p.fk_soc,s.name_alias,";
|
||||
// Add fields from hooks
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
@ -1503,6 +1558,15 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
||||
if ($search_company) {
|
||||
$sql .= natural_search('s.nom', $search_company);
|
||||
}
|
||||
if ($search_company_alias) {
|
||||
$sql .= natural_search('s.name_alias', $search_company_alias);
|
||||
}
|
||||
if ($search_project_ref) {
|
||||
$sql .= natural_search('p.ref', $search_project_ref);
|
||||
}
|
||||
if ($search_project_label) {
|
||||
$sql .= natural_search('p.title', $search_project_label);
|
||||
}
|
||||
if ($search_task_label) {
|
||||
$sql .= natural_search('pt.label', $search_task_label);
|
||||
}
|
||||
@ -1519,6 +1583,13 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
||||
$sql .= ' AND (t.invoice_id = 0 OR t.invoice_id IS NULL)';
|
||||
}
|
||||
|
||||
if ($search_date_start) {
|
||||
$sql .= " AND t.task_date >= '".$db->idate($search_date_start)."'";
|
||||
}
|
||||
if ($search_date_end) {
|
||||
$sql .= " AND t.task_date <= '".$db->idate($search_date_end)."'";
|
||||
}
|
||||
|
||||
$sql .= dolSqlDateFilter('t.task_datehour', $search_day, $search_month, $search_year);
|
||||
|
||||
// Add where from hooks
|
||||
@ -1741,12 +1812,13 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
||||
print '<tr class="liste_titre_filter">';
|
||||
// Date
|
||||
if (!empty($arrayfields['t.task_date']['checked'])) {
|
||||
print '<td class="liste_titre">';
|
||||
if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) {
|
||||
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||
}
|
||||
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
|
||||
print $formother->selectyear($search_year, 'search_year', 1, 20, 5);
|
||||
print '<td class="liste_titre left">';
|
||||
print '<div class="nowrap">';
|
||||
print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
|
||||
print '</div>';
|
||||
print '<div class="nowrap">';
|
||||
print $form->selectDate($search_date_end ? $search_date_end : -1, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
}
|
||||
// Thirdparty
|
||||
@ -1754,8 +1826,18 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="'.dol_escape_htmltag($search_company).'"></td>';
|
||||
}
|
||||
|
||||
// Thirdparty alias
|
||||
if (!empty($arrayfields['s.name_alias']['checked'])) {
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="'.dol_escape_htmltag($search_company_alias).'"></td>';
|
||||
}
|
||||
|
||||
if (!empty($allprojectforuser)) {
|
||||
print '<td class="liste_titre"></td>';
|
||||
if (!empty($arrayfields['p.project_ref']['checked'])) {
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>';
|
||||
}
|
||||
if (!empty($arrayfields['p.project_label']['checked'])) {
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_label" value="'.dol_escape_htmltag($search_project_label).'"></td>';
|
||||
}
|
||||
}
|
||||
// Task
|
||||
if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task
|
||||
@ -1810,11 +1892,20 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
||||
if (!empty($arrayfields['t.task_date']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['t.task_date']['label'], $_SERVER['PHP_SELF'], 't.task_date,t.task_datehour,t.rowid', '', $param, '', $sortfield, $sortorder);
|
||||
}
|
||||
|
||||
if (!empty($arrayfields['p.fk_soc']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['p.fk_soc']['label'], $_SERVER['PHP_SELF'], 't.task_date,t.task_datehour,t.rowid', '', $param, '', $sortfield, $sortorder);
|
||||
}
|
||||
if (!empty($arrayfields['s.name_alias']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER['PHP_SELF'], 's.name_alias', '', $param, '', $sortfield, $sortorder);
|
||||
}
|
||||
if (!empty($allprojectforuser)) {
|
||||
print_liste_field_titre("Project", $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder);
|
||||
if (!empty($arrayfields['p.project_ref']['checked'])) {
|
||||
print_liste_field_titre("Project", $_SERVER['PHP_SELF'], 'p.ref', '', $param, '', $sortfield, $sortorder);
|
||||
}
|
||||
if (!empty($arrayfields['p.project_label']['checked'])) {
|
||||
print_liste_field_titre("ProjectLabel", $_SERVER['PHP_SELF'], 'p.title', '', $param, '', $sortfield, $sortorder);
|
||||
}
|
||||
}
|
||||
if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task
|
||||
if (!empty($arrayfields['t.task_ref']['checked'])) {
|
||||
@ -1901,7 +1992,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
||||
} else {
|
||||
$tmpsociete = $conf->cache['thridparty'][$task_time->fk_soc];
|
||||
}
|
||||
print $tmpsociete->getNomUrl(1);
|
||||
print $tmpsociete->getNomUrl(1, '', 100, 0, 1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1);
|
||||
}
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
@ -1909,23 +2000,59 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
||||
}
|
||||
}
|
||||
|
||||
// Project ref
|
||||
if (!empty($allprojectforuser)) {
|
||||
print '<td class="nowraponall">';
|
||||
if (empty($conf->cache['project'][$task_time->fk_projet])) {
|
||||
$tmpproject = new Project($db);
|
||||
$tmpproject->fetch($task_time->fk_projet);
|
||||
$conf->cache['project'][$task_time->fk_projet] = $tmpproject;
|
||||
} else {
|
||||
$tmpproject = $conf->cache['project'][$task_time->fk_projet];
|
||||
// Thirdparty alias
|
||||
if (!empty($arrayfields['s.name_alias']['checked'])) {
|
||||
print '<td class="nowrap">';
|
||||
if ($task_time->fk_soc > 0) {
|
||||
if (empty($conf->cache['thridparty'][$task_time->fk_soc])) {
|
||||
$tmpsociete = new Societe($db);
|
||||
$tmpsociete->fetch($task_time->fk_soc);
|
||||
$conf->cache['thridparty'][$task_time->fk_soc] = $tmpsociete;
|
||||
} else {
|
||||
$tmpsociete = $conf->cache['thridparty'][$task_time->fk_soc];
|
||||
}
|
||||
print $tmpsociete->name_alias;
|
||||
}
|
||||
print $tmpproject->getNomUrl(1);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
|
||||
// Project ref & label
|
||||
if (!empty($allprojectforuser)) {
|
||||
if (!empty($arrayfields['p.project_ref']['checked'])) {
|
||||
print '<td class="nowraponall">';
|
||||
if (empty($conf->cache['project'][$task_time->fk_projet])) {
|
||||
$tmpproject = new Project($db);
|
||||
$tmpproject->fetch($task_time->fk_projet);
|
||||
$conf->cache['project'][$task_time->fk_projet] = $tmpproject;
|
||||
} else {
|
||||
$tmpproject = $conf->cache['project'][$task_time->fk_projet];
|
||||
}
|
||||
print $tmpproject->getNomUrl(1);
|
||||
print '</td>';
|
||||
if (! $i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
if (!empty($arrayfields['p.project_label']['checked'])) {
|
||||
print '<td class="nowraponall">';
|
||||
if (empty($conf->cache['project'][$task_time->fk_projet])) {
|
||||
$tmpproject = new Project($db);
|
||||
$tmpproject->fetch($task_time->fk_projet);
|
||||
$conf->cache['project'][$task_time->fk_projet] = $tmpproject;
|
||||
} else {
|
||||
$tmpproject = $conf->cache['project'][$task_time->fk_projet];
|
||||
}
|
||||
print $tmpproject->title;
|
||||
print '</td>';
|
||||
if (! $i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Task ref
|
||||
if (!empty($arrayfields['t.task_ref']['checked'])) {
|
||||
if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task
|
||||
|
||||
@ -819,7 +819,7 @@ if ((!empty($conference->id) && $conference->status == ConferenceOrBooth::STATUS
|
||||
print '</td></tr>';
|
||||
|
||||
// Country
|
||||
print '<tr><td><span class="fieldrequired"' . $langs->trans('Country') . '</span></td><td>';
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans('Country').'</span></td><td>';
|
||||
print img_picto('', 'country', 'class="pictofixedwidth"');
|
||||
$country_id = GETPOST('country_id');
|
||||
if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) {
|
||||
|
||||
@ -319,7 +319,7 @@ $toutsujet = explode(",", $object->sujet);
|
||||
$listofanswers = array();
|
||||
foreach ($toutsujet as $value) {
|
||||
$tmp = explode('@', $value);
|
||||
$listofanswers[] = array('label'=>$tmp[0], 'format'=>($tmp[1] ? $tmp[1] : 'checkbox'));
|
||||
$listofanswers[] = array('label'=>$tmp[0], 'format'=>(!empty($tmp[1]) ? $tmp[1] : 'checkbox'));
|
||||
}
|
||||
$toutsujet = str_replace("°", "'", $toutsujet);
|
||||
|
||||
|
||||
@ -28,6 +28,7 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/recruitment/core/modules/recruitment/modules_recruitmentjobposition.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
@ -238,7 +239,7 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi
|
||||
// If $object is id instead of object
|
||||
if (!is_object($object)) {
|
||||
$id = $object;
|
||||
$object = new Commande($this->db);
|
||||
$object = new RecruitmentJobPosition($this->db);
|
||||
$result = $object->fetch($id);
|
||||
if ($result < 0) {
|
||||
dol_print_error($this->db, $object->error);
|
||||
@ -339,7 +340,7 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi
|
||||
$odfHandler = new odf(
|
||||
$srctemplatepath,
|
||||
array(
|
||||
'PATH_TO_TMP' => $conf->commande->dir_temp,
|
||||
'PATH_TO_TMP' => $conf->recruitment->dir_temp,
|
||||
'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy.
|
||||
'DELIMITER_LEFT' => '{',
|
||||
'DELIMITER_RIGHT' => '}'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user