forked from Wavyzz/dolibarr
Debug v16
This commit is contained in:
@@ -74,7 +74,6 @@ llxHeader('', $langs->trans("ResourceSetup"));
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("ResourceSetup"), $linkback, 'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
$head = resource_admin_prepare_head();
|
||||
|
||||
|
||||
@@ -461,6 +461,13 @@ if (empty($reshook) && $action == 'add') {
|
||||
}
|
||||
}
|
||||
|
||||
// Modify $moreparam so we are sure to see the event we have just created, whatever are the default value of filter on next page.
|
||||
/*$moreparam .= ($moreparam ? '&' : '').'search_actioncode=0';
|
||||
$moreparam .= ($moreparam ? '&' : '').'search_status=-1';
|
||||
$moreparam .= ($moreparam ? '&' : '').'search_filtert='.$object->userownerid;
|
||||
*/
|
||||
$moreparam .= ($moreparam ? '&' : '').'disabledefaultvalues=1';
|
||||
|
||||
if ($error) {
|
||||
$db->rollback();
|
||||
} else {
|
||||
@@ -952,16 +959,17 @@ if ($action == 'create') {
|
||||
console.log("setdatefields");
|
||||
setdatefields();
|
||||
});
|
||||
|
||||
$("#selectcomplete").change(function() {
|
||||
if ($("#selectcomplete").val() == 100)
|
||||
{
|
||||
console.log("we change the complete status - set the doneby");
|
||||
if ($("#selectcomplete").val() == 100) {
|
||||
if ($("#doneby").val() <= 0) $("#doneby").val(\''.((int) $user->id).'\');
|
||||
}
|
||||
if ($("#selectcomplete").val() == 0)
|
||||
{
|
||||
if ($("#selectcomplete").val() == 0) {
|
||||
$("#doneby").val(-1);
|
||||
}
|
||||
});
|
||||
|
||||
$("#actioncode").change(function() {
|
||||
if ($("#actioncode").val() == \'AC_RDV\') $("#dateend").addClass("fieldrequired");
|
||||
else $("#dateend").removeClass("fieldrequired");
|
||||
@@ -1019,59 +1027,15 @@ if ($action == 'create') {
|
||||
print '<tr><td'.(empty($conf->global->AGENDA_USE_EVENT_TYPE) ? ' class="fieldrequired titlefieldcreate"' : '').'>'.$langs->trans("Label").'</td><td><input type="text" id="label" name="label" class="soixantepercent" value="'.GETPOST('label').'"></td></tr>';
|
||||
|
||||
// Full day
|
||||
print '<tr><td><label for="fullday">'.$langs->trans("EventOnFullDay").'</label></td><td><input type="checkbox" id="fullday" name="fullday" '.(GETPOST('fullday') ? ' checked' : '').'></td></tr>';
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Date").'</span></td><td class="valignmiddle height30 small"><input type="checkbox" id="fullday" name="fullday" '.(GETPOST('fullday') ? ' checked' : '').'><label for="fullday">'.$langs->trans("EventOnFullDay").'</label>';
|
||||
|
||||
$datep = ($datep ? $datep : (is_null($object->datep) ? '' : $object->datep));
|
||||
if (GETPOST('datep', 'int', 1)) {
|
||||
$datep = dol_stringtotime(GETPOST('datep', 'int', 1), 'tzuser');
|
||||
}
|
||||
$datef = ($datef ? $datef : $object->datef);
|
||||
if (GETPOST('datef', 'int', 1)) {
|
||||
$datef = dol_stringtotime(GETPOST('datef', 'int', 1), 'tzuser');
|
||||
}
|
||||
if (empty($datef) && !empty($datep)) {
|
||||
if (GETPOST("actioncode", 'aZ09') == 'AC_RDV' || empty($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT)) {
|
||||
$datef = dol_time_plus_duree($datep, (empty($conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS) ? 1 : $conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS), 'h');
|
||||
}
|
||||
}
|
||||
|
||||
// Date start
|
||||
print '<tr><td class="nowrap">';
|
||||
print '<span class="fieldrequired">'.$langs->trans("DateActionStart").'</span>';
|
||||
print ' - ';
|
||||
print '<span id="dateend"'.(GETPOST("actioncode", 'aZ09') == 'AC_RDV' ? ' class="fieldrequired"' : '').'>'.$langs->trans("DateActionEnd").'</span>';
|
||||
print '</td><td>';
|
||||
if (GETPOST("afaire") == 1) {
|
||||
print $form->selectDate($datep, 'ap', 1, 1, 0, "action", 1, 2, 0, 'fulldaystart', '', '', '', 1, '', '', 'tzuserrel'); // Empty value not allowed for start date and hours if "todo"
|
||||
} else {
|
||||
print $form->selectDate($datep, 'ap', 1, 1, 1, "action", 1, 2, 0, 'fulldaystart', '', '', '', 1, '', '', 'tzuserrel');
|
||||
}
|
||||
print ' <span class="hideonsmartphone"> - </span> ';
|
||||
//print ' - ';
|
||||
if (GETPOST("afaire") == 1) {
|
||||
print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 0, 0, 'fulldayend', '', '', '', 1, '', '', 'tzuserrel');
|
||||
} else {
|
||||
print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 0, 0, 'fulldayend', '', '', '', 1, '', '', 'tzuserrel');
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
/*print '<tr><td>';
|
||||
print '<span id="dateend"'.(GETPOST("actioncode", 'aZ09') == 'AC_RDV' ? ' class="fieldrequired"' : '').'>'.$langs->trans("DateActionEnd").'</span>';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if (GETPOST("afaire") == 1) {
|
||||
print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 2, 0, 'fulldayend');
|
||||
} else {
|
||||
print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 2, 0, 'fulldayend');
|
||||
}
|
||||
print '</td></tr>';*/
|
||||
|
||||
// Dev in progress
|
||||
// Recurring event
|
||||
$userepeatevent = ($conf->global->MAIN_FEATURES_LEVEL == 2 ? 1 : 0);
|
||||
if ($userepeatevent) {
|
||||
// Repeat
|
||||
print '<tr><td></td><td colspan="3">';
|
||||
//print '<tr><td></td><td colspan="3" class="opacitymedium">';
|
||||
print ' <div class="opacitymedium inline-block">';
|
||||
print img_picto($langs->trans("Recurrence"), 'recurring', 'class="paddingright2"');
|
||||
print '<input type="hidden" name="recurid" value="'.$object->recurid.'">';
|
||||
$selectedrecurrulefreq = 'no';
|
||||
$selectedrecurrulebymonthday = '';
|
||||
@@ -1120,34 +1084,51 @@ if ($action == 'create') {
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
print '</td></tr>';
|
||||
print '</div>';
|
||||
//print '</td></tr>';
|
||||
}
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td>';
|
||||
print '<td>';
|
||||
$percent = $complete !=='' ? $complete : -1;
|
||||
if (GETPOSTISSET('status')) {
|
||||
$percent = GETPOST('status');
|
||||
} elseif (GETPOSTISSET('percentage')) {
|
||||
$percent = GETPOST('percentage', 'int');
|
||||
} else {
|
||||
if ($complete == '0' || GETPOST("afaire") == 1) {
|
||||
$percent = '0';
|
||||
} elseif ($complete == 100 || GETPOST("afaire") == 2) {
|
||||
$percent = 100;
|
||||
}
|
||||
}
|
||||
$formactions->form_select_status_action('formaction', $percent, 1, 'complete', 0, 0, 'maxwidth200');
|
||||
print '</td></tr>';
|
||||
|
||||
// Location
|
||||
if (empty($conf->global->AGENDA_DISABLE_LOCATION)) {
|
||||
print '<tr><td>'.$langs->trans("Location").'</td><td><input type="text" name="location" class="minwidth300 maxwidth150onsmartphone" value="'.(GETPOST('location') ? GETPOST('location') : $object->location).'"></td></tr>';
|
||||
$datep = ($datep ? $datep : (is_null($object->datep) ? '' : $object->datep));
|
||||
if (GETPOST('datep', 'int', 1)) {
|
||||
$datep = dol_stringtotime(GETPOST('datep', 'int', 1), 'tzuser');
|
||||
}
|
||||
$datef = ($datef ? $datef : $object->datef);
|
||||
if (GETPOST('datef', 'int', 1)) {
|
||||
$datef = dol_stringtotime(GETPOST('datef', 'int', 1), 'tzuser');
|
||||
}
|
||||
if (empty($datef) && !empty($datep)) {
|
||||
if (GETPOST("actioncode", 'aZ09') == 'AC_RDV' || empty($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT)) {
|
||||
$datef = dol_time_plus_duree($datep, (empty($conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS) ? 1 : $conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS), 'h');
|
||||
}
|
||||
}
|
||||
|
||||
// Date start
|
||||
print '<tr><td class="nowrap">';
|
||||
/*
|
||||
print '<span class="fieldrequired">'.$langs->trans("DateActionStart").'</span>';
|
||||
print ' - ';
|
||||
print '<span id="dateend"'.(GETPOST("actioncode", 'aZ09') == 'AC_RDV' ? ' class="fieldrequired"' : '').'>'.$langs->trans("DateActionEnd").'</span>';
|
||||
*/
|
||||
print '</td><td>';
|
||||
if (GETPOST("afaire") == 1) {
|
||||
print $form->selectDate($datep, 'ap', 1, 1, 0, "action", 1, 2, 0, 'fulldaystart', '', '', '', 1, '', '', 'tzuserrel'); // Empty value not allowed for start date and hours if "todo"
|
||||
} else {
|
||||
print $form->selectDate($datep, 'ap', 1, 1, 1, "action", 1, 2, 0, 'fulldaystart', '', '', '', 1, '', '', 'tzuserrel');
|
||||
}
|
||||
print ' <span class="hideonsmartphone"> - </span> ';
|
||||
if (GETPOST("afaire") == 1) {
|
||||
print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 0, 0, 'fulldayend', '', '', '', 1, '', '', 'tzuserrel');
|
||||
} else {
|
||||
print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 0, 0, 'fulldayend', '', '', '', 1, '', '', 'tzuserrel');
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td class=""> </td><td></td></tr>';
|
||||
|
||||
// Assigned to
|
||||
print '<tr><td class="tdtop nowrap">'.$langs->trans("ActionAffectedTo").'</td><td>';
|
||||
print '<tr><td class="tdtop nowrap"><span class="fieldrequired">'.$langs->trans("ActionAffectedTo").'</span></td><td>';
|
||||
$listofuserid = array();
|
||||
$listofcontactid = array();
|
||||
$listofotherid = array();
|
||||
@@ -1181,6 +1162,29 @@ if ($action == 'create') {
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Location
|
||||
if (empty($conf->global->AGENDA_DISABLE_LOCATION)) {
|
||||
print '<tr><td>'.$langs->trans("Location").'</td><td><input type="text" name="location" class="minwidth300 maxwidth150onsmartphone" value="'.(GETPOST('location') ? GETPOST('location') : $object->location).'"></td></tr>';
|
||||
}
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td>';
|
||||
print '<td>';
|
||||
$percent = $complete !=='' ? $complete : -1;
|
||||
if (GETPOSTISSET('status')) {
|
||||
$percent = GETPOST('status');
|
||||
} elseif (GETPOSTISSET('percentage')) {
|
||||
$percent = GETPOST('percentage', 'int');
|
||||
} else {
|
||||
if ($complete == '0' || GETPOST("afaire") == 1) {
|
||||
$percent = '0';
|
||||
} elseif ($complete == 100 || GETPOST("afaire") == 2) {
|
||||
$percent = 100;
|
||||
}
|
||||
}
|
||||
$formactions->form_select_status_action('formaction', $percent, 1, 'complete', 0, 0, 'maxwidth200');
|
||||
print '</td></tr>';
|
||||
|
||||
if ($conf->categorie->enabled) {
|
||||
// Categories
|
||||
print '<tr><td>'.$langs->trans("Categories").'</td><td>';
|
||||
@@ -1523,6 +1527,7 @@ if ($id > 0) {
|
||||
if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) {
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Type").'</td><td colspan="3">';
|
||||
if ($object->type_code != 'AC_OTH_AUTO') {
|
||||
print img_picto($langs->trans("ActionType"), 'square', 'class="fawidth30 inline-block" style="color: #ddd;"');
|
||||
print $formactions->select_type_actions(GETPOST("actioncode", 'aZ09') ? GETPOST("actioncode", 'aZ09') : $object->type_code, "actioncode", "systemauto", 0, 0, 0, 1);
|
||||
} else {
|
||||
print '<input type="hidden" name="actioncode" value="'.$object->type_code.'">';
|
||||
@@ -1533,40 +1538,19 @@ if ($id > 0) {
|
||||
}
|
||||
|
||||
// Title
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Title").'</td><td colspan="3"><input type="text" name="label" class="soixantepercent" value="'.$object->label.'"></td></tr>';
|
||||
print '<tr><td'.(empty($conf->global->AGENDA_USE_EVENT_TYPE) ? ' class="fieldrequired titlefieldcreate"' : '').'>'.$langs->trans("Title").'</td><td colspan="3"><input type="text" name="label" class="soixantepercent" value="'.$object->label.'"></td></tr>';
|
||||
|
||||
// Full day event
|
||||
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td colspan="3"><input type="checkbox" id="fullday" name="fullday" '.($object->fulldayevent ? ' checked' : '').'></td></tr>';
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Date").'</span></td><td colspan="3" class="valignmiddle height30 small"><input type="checkbox" id="fullday" name="fullday" '.($object->fulldayevent ? ' checked' : '').'>';
|
||||
print '<label for="fullday">'.$langs->trans("EventOnFullDay").'</label>';
|
||||
|
||||
// Date start - end
|
||||
print '<tr><td class="nowrap">';
|
||||
print '<span class="fieldrequired">'.$langs->trans("DateActionStart").'</span>';
|
||||
print ' - ';
|
||||
print '<span id="dateend"'.($object->type_code == 'AC_RDV' ? ' class="fieldrequired"' : '').'>'.$langs->trans("DateActionEnd").'</span>';
|
||||
print '</td><td td colspan="3">';
|
||||
$tzforfullday = getDolGlobalString('MAIN_STORE_FULL_EVENT_IN_GMT');
|
||||
if (GETPOST("afaire") == 1) {
|
||||
print $form->selectDate($datep ? $datep : $object->datep, 'ap', 1, 1, 0, "action", 1, 1, 0, 'fulldaystart', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel');
|
||||
} elseif (GETPOST("afaire") == 2) {
|
||||
print $form->selectDate($datep ? $datep : $object->datep, 'ap', 1, 1, 1, "action", 1, 1, 0, 'fulldaystart', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel');
|
||||
} else {
|
||||
print $form->selectDate($datep ? $datep : $object->datep, 'ap', 1, 1, 1, "action", 1, 1, 0, 'fulldaystart', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel');
|
||||
}
|
||||
print ' - ';
|
||||
if (GETPOST("afaire") == 1) {
|
||||
print $form->selectDate($datef ? $datef : $object->datef, 'p2', 1, 1, 1, "action", 1, 1, 0, 'fulldayend', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel');
|
||||
} elseif (GETPOST("afaire") == 2) {
|
||||
print $form->selectDate($datef ? $datef : $object->datef, 'p2', 1, 1, 1, "action", 1, 1, 0, 'fulldayend', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel');
|
||||
} else {
|
||||
print $form->selectDate($datef ? $datef : $object->datef, 'p2', 1, 1, 1, "action", 1, 1, 0, 'fulldayend', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel');
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Dev in progress
|
||||
// Recurring event
|
||||
$userepeatevent = ($conf->global->MAIN_FEATURES_LEVEL == 2 ? 1 : 0);
|
||||
if ($userepeatevent) {
|
||||
// Repeat
|
||||
print '<tr><td></td><td colspan="3">';
|
||||
//print '<tr><td></td><td colspan="3">';
|
||||
print ' <div class="opacitymedium inline-block">';
|
||||
print img_picto($langs->trans("Recurrence"), 'recurring', 'class="paddingright2"');
|
||||
print '<input type="hidden" name="recurid" value="'.$object->recurid.'">';
|
||||
$selectedrecurrulefreq = 'no';
|
||||
$selectedrecurrulebymonthday = '';
|
||||
@@ -1615,19 +1599,37 @@ if ($id > 0) {
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
print '</td></tr>';
|
||||
print '</div>';
|
||||
//print '</td></tr>';
|
||||
}
|
||||
|
||||
// Status
|
||||
print '<tr><td class="nowrap">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="3">';
|
||||
$percent = GETPOSTISSET("percentage") ? GETPOST("percentage", "int") : $object->percentage;
|
||||
$formactions->form_select_status_action('formaction', $percent, 1, 'complete', 0, 0, 'maxwidth200');
|
||||
print '</td></tr>';
|
||||
|
||||
// Location
|
||||
if (empty($conf->global->AGENDA_DISABLE_LOCATION)) {
|
||||
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3"><input type="text" name="location" class="width500" value="'.$object->location.'"></td></tr>';
|
||||
// Date start - end
|
||||
print '<tr><td class="nowrap">';
|
||||
/*print '<span class="fieldrequired">'.$langs->trans("DateActionStart").'</span>';
|
||||
print ' - ';
|
||||
print '<span id="dateend"'.($object->type_code == 'AC_RDV' ? ' class="fieldrequired"' : '').'>'.$langs->trans("DateActionEnd").'</span>';
|
||||
*/
|
||||
print '</td><td td colspan="3">';
|
||||
$tzforfullday = getDolGlobalString('MAIN_STORE_FULL_EVENT_IN_GMT');
|
||||
if (GETPOST("afaire") == 1) {
|
||||
print $form->selectDate($datep ? $datep : $object->datep, 'ap', 1, 1, 0, "action", 1, 1, 0, 'fulldaystart', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel');
|
||||
} elseif (GETPOST("afaire") == 2) {
|
||||
print $form->selectDate($datep ? $datep : $object->datep, 'ap', 1, 1, 1, "action", 1, 1, 0, 'fulldaystart', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel');
|
||||
} else {
|
||||
print $form->selectDate($datep ? $datep : $object->datep, 'ap', 1, 1, 1, "action", 1, 1, 0, 'fulldaystart', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel');
|
||||
}
|
||||
print ' <span class="hideonsmartphone"> - </span> ';
|
||||
if (GETPOST("afaire") == 1) {
|
||||
print $form->selectDate($datef ? $datef : $object->datef, 'p2', 1, 1, 1, "action", 1, 0, 0, 'fulldayend', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel');
|
||||
} elseif (GETPOST("afaire") == 2) {
|
||||
print $form->selectDate($datef ? $datef : $object->datef, 'p2', 1, 1, 1, "action", 1, 0, 0, 'fulldayend', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel');
|
||||
} else {
|
||||
print $form->selectDate($datef ? $datef : $object->datef, 'p2', 1, 1, 1, "action", 1, 0, 0, 'fulldayend', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel');
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td class=""> </td><td></td></tr>';
|
||||
|
||||
// Assigned to
|
||||
$listofuserid = array(); // User assigned
|
||||
@@ -1678,6 +1680,18 @@ if ($id > 0) {
|
||||
print $form->select_dolusers($object->userdoneid > 0 ? $object->userdoneid : -1, 'doneby', 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Location
|
||||
if (empty($conf->global->AGENDA_DISABLE_LOCATION)) {
|
||||
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3"><input type="text" name="location" class="width500" value="'.$object->location.'"></td></tr>';
|
||||
}
|
||||
|
||||
// Status
|
||||
print '<tr><td class="nowrap">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="3">';
|
||||
$percent = GETPOSTISSET("percentage") ? GETPOST("percentage", "int") : $object->percentage;
|
||||
$formactions->form_select_status_action('formaction', $percent, 1, 'complete', 0, 0, 'maxwidth200');
|
||||
print '</td></tr>';
|
||||
|
||||
// Tags-Categories
|
||||
if ($conf->categorie->enabled) {
|
||||
print '<tr><td>'.$langs->trans("Categories").'</td><td colspan="3">';
|
||||
@@ -1786,7 +1800,7 @@ if ($id > 0) {
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>';
|
||||
// Editeur wysiwyg
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('note', $object->note_private, '', 200, 'dolibarr_notes', 'In', true, true, $conf->fckeditor->enabled, ROWS_5, '90%');
|
||||
$doleditor = new DolEditor('note', $object->note_private, '', 120, 'dolibarr_notes', 'In', true, true, $conf->fckeditor->enabled, ROWS_4, '90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@@ -49,6 +49,8 @@ if (empty($conf->global->AGENDA_EXT_NB)) {
|
||||
}
|
||||
$MAXAGENDA = $conf->global->AGENDA_EXT_NB;
|
||||
|
||||
$disabledefaultvalues = GETPOST('disabledefaultvalues', 'int');
|
||||
|
||||
$check_holiday = GETPOST('check_holiday', 'int');
|
||||
$filter = GETPOST("search_filter", 'alpha', 3) ? GETPOST("search_filter", 'alpha', 3) : GETPOST("filter", 'alpha', 3);
|
||||
$filtert = GETPOST("search_filtert", "int", 3) ? GETPOST("search_filtert", "int", 3) : GETPOST("filtert", "int", 3);
|
||||
@@ -128,14 +130,11 @@ if (GETPOST('search_actioncode', 'array:aZ09')) {
|
||||
$actioncode = '0';
|
||||
}
|
||||
} else {
|
||||
$actioncode = GETPOST("search_actioncode", "alpha", 3) ?GETPOST("search_actioncode", "alpha", 3) : (GETPOST("search_actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE));
|
||||
}
|
||||
if ($actioncode == '' && empty($actioncodearray)) {
|
||||
$actioncode = (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE);
|
||||
$actioncode = GETPOST("search_actioncode", "alpha", 3) ?GETPOST("search_actioncode", "alpha", 3) : (GETPOST("search_actioncode") == '0' ? '0' : ((empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) || $disabledefaultvalues) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE));
|
||||
}
|
||||
|
||||
if ($status == '' && !GETPOSTISSET('search_status')) {
|
||||
$status = (empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS);
|
||||
$status = ((empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) || $disabledefaultvalues) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS);
|
||||
}
|
||||
|
||||
$defaultview = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW);
|
||||
|
||||
@@ -45,6 +45,11 @@ $langs->loadLangs(array("users", "companies", "agenda", "commercial", "other", "
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$massaction = GETPOST('massaction', 'alpha');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'actioncommlist'; // To manage different context of search
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
|
||||
$disabledefaultvalues = GETPOST('disabledefaultvalues', 'int');
|
||||
|
||||
$mode = GETPOST('mode', 'aZ09');
|
||||
if (empty($mode) && preg_match('/show_/', $action)) {
|
||||
@@ -54,12 +59,9 @@ $resourceid = GETPOST("search_resourceid", "int") ?GETPOST("search_resourceid",
|
||||
$pid = GETPOST("search_projectid", 'int', 3) ?GETPOST("search_projectid", 'int', 3) : GETPOST("projectid", 'int', 3);
|
||||
$search_status = (GETPOST("search_status", 'aZ09') != '') ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09');
|
||||
$type = GETPOST('search_type', 'alphanohtml') ?GETPOST('search_type', 'alphanohtml') : GETPOST('type', 'alphanohtml');
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
$year = GETPOST("year", 'int');
|
||||
$month = GETPOST("month", 'int');
|
||||
$day = GETPOST("day", 'int');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
|
||||
// Set actioncode (this code must be same for setting actioncode into peruser, listacton and index)
|
||||
if (GETPOST('search_actioncode', 'array')) {
|
||||
@@ -68,11 +70,9 @@ if (GETPOST('search_actioncode', 'array')) {
|
||||
$actioncode = '0';
|
||||
}
|
||||
} else {
|
||||
$actioncode = GETPOST("search_actioncode", "alpha", 3) ?GETPOST("search_actioncode", "alpha", 3) : (GETPOST("search_actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE));
|
||||
}
|
||||
if ($actioncode == '' && empty($actioncodearray)) {
|
||||
$actioncode = (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE);
|
||||
$actioncode = GETPOST("search_actioncode", "alpha", 3) ?GETPOST("search_actioncode", "alpha", 3) : (GETPOST("search_actioncode") == '0' ? '0' : ((empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) || $disabledefaultvalues) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE));
|
||||
}
|
||||
|
||||
$search_id = GETPOST('search_id', 'alpha');
|
||||
$search_title = GETPOST('search_title', 'alpha');
|
||||
$search_note = GETPOST('search_note', 'alpha');
|
||||
@@ -83,7 +83,7 @@ $datestart_dtend = dol_mktime(23, 59, 59, GETPOST('datestart_dtendmonth', 'int')
|
||||
$dateend_dtstart = dol_mktime(0, 0, 0, GETPOST('dateend_dtstartmonth', 'int'), GETPOST('dateend_dtstartday', 'int'), GETPOST('dateend_dtstartyear', 'int'), 'tzuserrel');
|
||||
$dateend_dtend = dol_mktime(23, 59, 59, GETPOST('dateend_dtendmonth', 'int'), GETPOST('dateend_dtendday', 'int'), GETPOST('dateend_dtendyear', 'int'), 'tzuserrel');
|
||||
if ($search_status == '' && !GETPOSTISSET('search_status')) {
|
||||
$search_status = (empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS);
|
||||
$search_status = ((empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) || $disabledefaultvalues) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS);
|
||||
}
|
||||
if (empty($mode) && !GETPOSTISSET('mode')) {
|
||||
$mode = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW);
|
||||
@@ -216,7 +216,14 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
||||
$datestart_dtend = '';
|
||||
$dateend_dtstart = '';
|
||||
$dateend_dtend = '';
|
||||
$actioncode = '';
|
||||
$search_status = '';
|
||||
$pid = '';
|
||||
$socid = '';
|
||||
$resourceid = '';
|
||||
$filter = '';
|
||||
$filtert = '';
|
||||
$usergroup = '';
|
||||
$toselect = array();
|
||||
$search_array_options = array();
|
||||
}
|
||||
@@ -299,7 +306,7 @@ if ($actioncode != '') {
|
||||
if ($resourceid > 0) {
|
||||
$param .= "&search_resourceid=".urlencode($resourceid);
|
||||
}
|
||||
if ($search_status != '' && $search_status > -1) {
|
||||
if ($search_status != '') {
|
||||
$param .= "&search_status=".urlencode($search_status);
|
||||
}
|
||||
if ($filter) {
|
||||
|
||||
@@ -45,6 +45,8 @@ if (!isset($conf->global->AGENDA_MAX_EVENTS_DAY_VIEW)) {
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
$disabledefaultvalues = GETPOST('disabledefaultvalues', 'int');
|
||||
|
||||
$filter = GETPOST("search_filter", 'alpha', 3) ? GETPOST("search_filter", 'alpha', 3) : GETPOST("filter", 'alpha', 3);
|
||||
$filtert = GETPOST("search_filtert", "int", 3) ? GETPOST("search_filtert", "int", 3) : GETPOST("filtert", "int", 3);
|
||||
$usergroup = GETPOST("search_usergroup", "int", 3) ? GETPOST("search_usergroup", "int", 3) : GETPOST("usergroup", "int", 3);
|
||||
@@ -110,10 +112,7 @@ if (GETPOST('search_actioncode', 'array')) {
|
||||
$actioncode = '0';
|
||||
}
|
||||
} else {
|
||||
$actioncode = GETPOST("search_actioncode", "alpha", 3) ?GETPOST("search_actioncode", "alpha", 3) : (GETPOST("search_actioncode", "alpha") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE));
|
||||
}
|
||||
if ($actioncode == '' && empty($actioncodearray)) {
|
||||
$actioncode = (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE);
|
||||
$actioncode = GETPOST("search_actioncode", "alpha", 3) ?GETPOST("search_actioncode", "alpha", 3) : (GETPOST("search_actioncode", "alpha") == '0' ? '0' : ((empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) || $disabledefaultvalues) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE));
|
||||
}
|
||||
|
||||
$dateselect = dol_mktime(0, 0, 0, GETPOST('dateselectmonth', 'int'), GETPOST('dateselectday', 'int'), GETPOST('dateselectyear', 'int'));
|
||||
@@ -145,7 +144,7 @@ $begin_d = 1;
|
||||
$end_d = 53;
|
||||
|
||||
if ($status == '' && !GETPOSTISSET('search_status')) {
|
||||
$status = (empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS);
|
||||
$status = ((empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) || $disabledefaultvalues) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS);
|
||||
}
|
||||
if (empty($mode) && !GETPOSTISSET('mode')) {
|
||||
$mode = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW);
|
||||
|
||||
@@ -45,6 +45,8 @@ if (!isset($conf->global->AGENDA_MAX_EVENTS_DAY_VIEW)) {
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
$disabledefaultvalues = GETPOST('disabledefaultvalues', 'int');
|
||||
|
||||
$filter = GETPOST("search_filter", 'alpha', 3) ? GETPOST("search_filter", 'alpha', 3) : GETPOST("filter", 'alpha', 3);
|
||||
$filtert = GETPOST("search_filtert", "int", 3) ? GETPOST("search_filtert", "int", 3) : GETPOST("filtert", "int", 3);
|
||||
$usergroup = GETPOST("search_usergroup", "int", 3) ? GETPOST("search_usergroup", "int", 3) : GETPOST("usergroup", "int", 3);
|
||||
@@ -110,10 +112,7 @@ if (GETPOST('search_actioncode', 'array:aZ09')) {
|
||||
$actioncode = '0';
|
||||
}
|
||||
} else {
|
||||
$actioncode = GETPOST("search_actioncode", "alpha", 3) ?GETPOST("search_actioncode", "alpha", 3) : (GETPOST("search_actioncode", "alpha") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE));
|
||||
}
|
||||
if ($actioncode == '' && empty($actioncodearray)) {
|
||||
$actioncode = (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE);
|
||||
$actioncode = GETPOST("search_actioncode", "alpha", 3) ?GETPOST("search_actioncode", "alpha", 3) : (GETPOST("search_actioncode", "alpha") == '0' ? '0' : ((empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) || $disabledefaultvalues) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE));
|
||||
}
|
||||
|
||||
$dateselect = dol_mktime(0, 0, 0, GETPOST('dateselectmonth', 'int'), GETPOST('dateselectday', 'int'), GETPOST('dateselectyear', 'int'));
|
||||
@@ -154,7 +153,7 @@ if ($end_d < $begin_d) {
|
||||
}
|
||||
|
||||
if ($status == '' && !GETPOSTISSET('search_status')) {
|
||||
$status = (empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS);
|
||||
$status = ((empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) || $disabledefaultvalues) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS);
|
||||
}
|
||||
|
||||
if (empty($mode) && !GETPOSTISSET('mode')) {
|
||||
|
||||
@@ -857,7 +857,7 @@ if ($resql) {
|
||||
}
|
||||
}
|
||||
if (!empty($arrayfields['f.datec']['checked'])) {
|
||||
print '<td class="center">';
|
||||
print '<td class="center nowraponall">';
|
||||
print dol_print_date($db->jdate($objp->datec), 'dayhour');
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
@@ -865,7 +865,7 @@ if ($resql) {
|
||||
}
|
||||
}
|
||||
if (!empty($arrayfields['f.tms']['checked'])) {
|
||||
print '<td class="center">';
|
||||
print '<td class="center nowraponall">';
|
||||
print dol_print_date($db->jdate($objp->tms), 'dayhour');
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
|
||||
@@ -86,23 +86,21 @@ class FormActions
|
||||
select_status();
|
||||
|
||||
$('#select' + htmlname).change(function() {
|
||||
console.log('We change field select '+htmlname);
|
||||
select_status();
|
||||
});
|
||||
// FIXME use another method for update combobox
|
||||
//$('#val' + htmlname).change(function() {
|
||||
//select_status();
|
||||
//});
|
||||
});
|
||||
|
||||
function select_status() {
|
||||
var defaultvalue = $('#select' + htmlname).val();
|
||||
console.log('val='+defaultvalue);
|
||||
var percentage = $('input[name=percentage]');
|
||||
var selected = '".(isset($selected) ? dol_escape_js($selected) : '')."';
|
||||
var value = (selected>0?selected:(defaultvalue>=0?defaultvalue:''));
|
||||
|
||||
percentage.val(value);
|
||||
|
||||
if (defaultvalue == -1) {
|
||||
if (defaultvalue == 'na' || defaultvalue == -1) {
|
||||
percentage.prop('disabled', true);
|
||||
$('.hideifna').hide();
|
||||
}
|
||||
@@ -131,7 +129,7 @@ class FormActions
|
||||
}
|
||||
print '<select '.($canedit ? '' : 'disabled ').'name="'.$htmlname.'" id="select'.$htmlname.'" class="flat'.($morecss ? ' '.$morecss : '').'">';
|
||||
if ($showempty) {
|
||||
print '<option value=""'.($selected == '' ? ' selected' : '').'> </option>';
|
||||
print '<option value="-1"'.($selected == '' ? ' selected' : '').'> </option>';
|
||||
}
|
||||
foreach ($listofstatus as $key => $val) {
|
||||
print '<option value="'.$key.'"'.(($selected == $key && strlen($selected) == strlen($key)) || (($selected > 0 && $selected < 100) && $key == '50') ? ' selected' : '').'>'.$val.'</option>';
|
||||
|
||||
@@ -547,6 +547,9 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null
|
||||
}
|
||||
} elseif (isset($user->default_values[$relativepathstring]['filters'])) {
|
||||
foreach ($user->default_values[$relativepathstring]['filters'] as $defkey => $defval) { // $defkey is a querystring like 'a=b&c=d', $defval is key of user
|
||||
if (!empty($_GET['disabledefaultvalues'])) { // If set of default values has been disabled by a request parameter
|
||||
continue;
|
||||
}
|
||||
$qualified = 0;
|
||||
if ($defkey != '_noquery_') {
|
||||
$tmpqueryarraytohave = explode('&', $defkey);
|
||||
|
||||
@@ -3571,7 +3571,7 @@ tr.liste_titre.box_titre td table td, .bordernooddeven tr td {
|
||||
div.tabBar div.border .table-border-row, div.tabBar div.border .table-key-border-col, div.tabBar .table-val-border-col {
|
||||
vertical-align: middle;
|
||||
}
|
||||
div .tdtop {
|
||||
div .tdtop:not(.tagtdnote) {
|
||||
vertical-align: top !important;
|
||||
/*padding-top: 10px !important;
|
||||
padding-bottom: 2px !important; */
|
||||
@@ -4519,6 +4519,9 @@ table.noborder.boxtable tr td {
|
||||
a.valignmiddle.dashboardlineindicator {
|
||||
line-height: 30px;
|
||||
}
|
||||
.height30 {
|
||||
height: 30px !important;
|
||||
}
|
||||
|
||||
tr.box_titre {
|
||||
height: 26px;
|
||||
@@ -5047,9 +5050,10 @@ table.dp {
|
||||
vertical-align:middle;
|
||||
cursor: pointer;
|
||||
}
|
||||
.datenowlink
|
||||
{
|
||||
.datenowlink {
|
||||
color: var(--colortextlink);
|
||||
font-size: 0.8em;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4188,7 +4188,7 @@ div.tabBar .noborder {
|
||||
-webkit-box-shadow: 0px 0px 0px #f4f4f4 !important;
|
||||
box-shadow: 0px 0px 0px #f4f4f4 !important;
|
||||
}
|
||||
div .tdtop {
|
||||
div .tdtop:not(.tagtdnote) {
|
||||
vertical-align: top !important;
|
||||
padding-top: 8px !important;
|
||||
padding-bottom: 0px !important;
|
||||
@@ -4382,6 +4382,9 @@ span.dashboardlineko {
|
||||
a.valignmiddle.dashboardlineindicator {
|
||||
line-height: 30px;
|
||||
}
|
||||
.height30 {
|
||||
height: 30px !important;
|
||||
}
|
||||
|
||||
tr.box_titre {
|
||||
height: 26px !important;
|
||||
@@ -4895,9 +4898,10 @@ table.dp {
|
||||
vertical-align:middle;
|
||||
cursor: pointer;
|
||||
}
|
||||
.datenowlink
|
||||
{
|
||||
.datenowlink {
|
||||
color: rgb(<?php print $colortextlink; ?>);
|
||||
font-size: 0.8em;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.categtextwhite, .treeview .categtextwhite.hover {
|
||||
|
||||
Reference in New Issue
Block a user