Debug v19
This commit is contained in:
parent
7de48435ef
commit
de3fec95f5
4 changed files with 56 additions and 21 deletions
|
|
@ -7033,6 +7033,7 @@ abstract class CommonObject
|
|||
$param['options'] = array();
|
||||
$type = $this->fields[$key]['type'];
|
||||
}
|
||||
//var_dump($type); var_dump($param['options']);
|
||||
|
||||
// Special case that force options and type ($type can be integer, varchar, ...)
|
||||
if (!empty($this->fields[$key]['arrayofkeyval']) && is_array($this->fields[$key]['arrayofkeyval'])) {
|
||||
|
|
@ -7194,7 +7195,27 @@ abstract class CommonObject
|
|||
$out .= '<select class="flat '.$morecss.' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" '.($moreparam ? $moreparam : '').'>';
|
||||
if (is_array($param['options'])) {
|
||||
$param_list = array_keys($param['options']);
|
||||
$InfoFieldList = explode(":", $param_list[0]);
|
||||
$InfoFieldList = explode(":", $param_list[0], 5);
|
||||
if (! empty($InfoFieldList[4])) {
|
||||
$pos = 0; $parenthesisopen = 0;
|
||||
while (substr($InfoFieldList[4], $pos, 1) !== '' && ($parenthesisopen || $pos == 0 || substr($InfoFieldList[4], $pos, 1) != ':')) {
|
||||
if (substr($InfoFieldList[4], $pos, 1) == '(') {
|
||||
$parenthesisopen++;
|
||||
}
|
||||
if (substr($InfoFieldList[4], $pos, 1) == ')') {
|
||||
$parenthesisopen--;
|
||||
}
|
||||
$pos++;
|
||||
}
|
||||
$tmpbefore = substr($InfoFieldList[4], 0, $pos);
|
||||
$tmpafter = substr($InfoFieldList[4], $pos+1);
|
||||
//var_dump($InfoFieldList[4].' -> '.$pos); var_dump($tmpafter);
|
||||
$InfoFieldList[4] = $tmpbefore;
|
||||
if ($tmpafter !== '') {
|
||||
$InfoFieldList = array_merge($InfoFieldList, explode(':', $tmpafter));
|
||||
}
|
||||
//var_dump($InfoFieldList);
|
||||
}
|
||||
$parentName = '';
|
||||
$parentField = '';
|
||||
|
||||
|
|
@ -7250,12 +7271,14 @@ abstract class CommonObject
|
|||
$InfoFieldList[4] = str_replace('$ID$', '0', $InfoFieldList[4]);
|
||||
}
|
||||
|
||||
//We have to join on extrafield table
|
||||
// We have to join on extrafield table
|
||||
$errstr = '';
|
||||
if (strpos($InfoFieldList[4], 'extra') !== false) {
|
||||
$sql .= " as main, " . $this->db->prefix() . $InfoFieldList[0] . "_extrafields as extra";
|
||||
$sqlwhere .= " WHERE extra.fk_object=main." . $InfoFieldList[2] . " AND " . $InfoFieldList[4];
|
||||
$sqlwhere .= " WHERE extra.fk_object=main." . $InfoFieldList[2];
|
||||
$sqlwhere .= " AND " . forgeSQLFromUniversalSearchCriteria($InfoFieldList[4], $errstr, 1);
|
||||
} else {
|
||||
$sqlwhere .= " WHERE " . $InfoFieldList[4];
|
||||
$sqlwhere .= " WHERE " . forgeSQLFromUniversalSearchCriteria($InfoFieldList[4], $errstr, 1);
|
||||
}
|
||||
} else {
|
||||
$sqlwhere .= ' WHERE 1=1';
|
||||
|
|
|
|||
|
|
@ -73,8 +73,18 @@ class ConferenceOrBooth extends ActionComm
|
|||
|
||||
|
||||
/**
|
||||
* 'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter]]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')
|
||||
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
|
||||
* 'type' field format:
|
||||
* 'integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]',
|
||||
* 'select' (list of values are in 'options'),
|
||||
* 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter[:CategoryIdType[:CategoryIdList[:SortField]]]]]]',
|
||||
* 'chkbxlst:...',
|
||||
* 'varchar(x)',
|
||||
* 'text', 'text:none', 'html',
|
||||
* 'double(24,8)', 'real', 'price',
|
||||
* 'date', 'datetime', 'timestamp', 'duration',
|
||||
* 'boolean', 'checkbox', 'radio', 'array',
|
||||
* 'mail', 'phone', 'url', 'password', 'ip'
|
||||
* Note: Filter must be a Dolibarr Universal Filter syntax string. Example: "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.status:!=:0) or (t.nature:is:NULL)"
|
||||
* 'label' the translation key.
|
||||
* 'picto' is code of a picto to show before value in forms
|
||||
* 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM)
|
||||
|
|
|
|||
|
|
@ -449,17 +449,17 @@ if ($projectid > 0) {
|
|||
print '<tr><td class="titlefield">';
|
||||
$typeofdata = 'checkbox:'.($project->accept_conference_suggestions ? ' checked="checked"' : '');
|
||||
$htmltext = $langs->trans("AllowUnknownPeopleSuggestConfHelp");
|
||||
print $form->editfieldkey('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', '', $project, $permissiontoadd, $typeofdata, '', 0, 0, 'projectid', $htmltext);
|
||||
print $form->editfieldkey('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', ($project->accept_conference_suggestions ? 1 : 0), $project, $permissiontoadd, $typeofdata, '', 0, 0, 'projectid', $htmltext);
|
||||
print '</td><td class="valuefield">';
|
||||
print $form->editfieldval('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', '1', $project, $permissiontoadd, $typeofdata, '', 0, 0, '', 0, '', 'projectid');
|
||||
print $form->editfieldval('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', ($project->accept_conference_suggestions ? 1 : 0), $project, $permissiontoadd, $typeofdata, '', 0, 0, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td class="titlefield">';
|
||||
$typeofdata = 'checkbox:'.($project->accept_booth_suggestions ? ' checked="checked"' : '');
|
||||
$htmltext = $langs->trans("AllowUnknownPeopleSuggestBoothHelp");
|
||||
print $form->editfieldkey('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', '', $project, $permissiontoadd, $typeofdata, '', 0, 0, 'projectid', $htmltext);
|
||||
print $form->editfieldkey('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', ($project->accept_booth_suggestions ? 1 : 0), $project, $permissiontoadd, $typeofdata, '', 0, 0, 'projectid', $htmltext);
|
||||
print '</td><td class="valuefield">';
|
||||
print $form->editfieldval('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', '1', $project, $permissiontoadd, $typeofdata, '', 0, 0, '', 0, '', 'projectid');
|
||||
print $form->editfieldval('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', ($project->accept_booth_suggestions ? 1 : 0), $project, $permissiontoadd, $typeofdata, '', 0, 0, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td class="titlefield">';
|
||||
|
|
|
|||
|
|
@ -126,17 +126,19 @@ function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $
|
|||
|
||||
print '<div class="center">';
|
||||
// Output html code for logo
|
||||
print '<div class="backgreypublicpayment">';
|
||||
print '<div class="logopublicpayment">';
|
||||
if ($urllogo) {
|
||||
print '<div class="backgreypublicpayment">';
|
||||
print '<div class="logopublicpayment">';
|
||||
print '<img id="dolpaymentlogo" src="'.$urllogo.'"';
|
||||
print '>';
|
||||
print '</div>';
|
||||
if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
|
||||
print '<div class="poweredbypublicpayment opacitymedium right"><a class="poweredbyhref" href="https://www.dolibarr.org?utm_medium=website&utm_source=poweredby" target="dolibarr" rel="noopener">'.$langs->trans("PoweredBy").'<br><img class="poweredbyimg" src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.svg" width="80px"></a></div>';
|
||||
}
|
||||
print '</div>';
|
||||
print '<img id="dolpaymentlogo" src="'.$urllogo.'">';
|
||||
}
|
||||
if (empty($urllogo)) {
|
||||
print $mysoc->name;
|
||||
}
|
||||
print '</div>';
|
||||
if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
|
||||
print '<div class="poweredbypublicpayment opacitymedium right"><a class="poweredbyhref" href="https://www.dolibarr.org?utm_medium=website&utm_source=poweredby" target="dolibarr" rel="noopener">'.$langs->trans("PoweredBy").'<br><img class="poweredbyimg" src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.svg" width="80px"></a></div>';
|
||||
}
|
||||
print '</div>';
|
||||
|
||||
if (!empty($conf->global->PROJECT_IMAGE_PUBLIC_ORGANIZEDEVENT)) {
|
||||
print '<div class="backimagepubliceventorganizationsubscription">';
|
||||
|
|
@ -201,9 +203,9 @@ $conf->dol_hide_leftmenu = 1;
|
|||
|
||||
$replacemainarea = (empty($conf->dol_hide_leftmenu) ? '<div>' : '').'<div>';
|
||||
|
||||
llxHeader($head, $langs->trans("SuggestForm"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea);
|
||||
//llxHeader($head, $langs->trans("SuggestForm"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea);
|
||||
|
||||
//llxHeaderVierge($langs->trans("SuggestForm"));
|
||||
llxHeaderVierge($langs->trans("SuggestForm"));
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue