[FM] FIX - ticket extrafields of type 'date' are not saved
This commit is contained in:
parent
60ab32c7fb
commit
a55d23f363
@ -560,17 +560,21 @@ if (empty($reshook)) {
|
|||||||
// Action to update one extrafield
|
// Action to update one extrafield
|
||||||
if ($action == "update_extras" && !empty($permissiontoadd)) {
|
if ($action == "update_extras" && !empty($permissiontoadd)) {
|
||||||
$object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha'));
|
$object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha'));
|
||||||
$attributekey = GETPOST('attribute', 'alpha');
|
|
||||||
$attributekeylong = 'options_' . $attributekey;
|
|
||||||
$object->array_options['options_' . $attributekey] = GETPOST($attributekeylong, ' alpha');
|
|
||||||
|
|
||||||
$result = $object->insertExtraFields(empty($triggermodname) ? '' : $triggermodname, $user);
|
$ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none'));
|
||||||
if ($result > 0) {
|
if ($ret < 0) $error++;
|
||||||
setEventMessages($langs->trans('RecordSaved'), null, 'mesgs');
|
if (!$error)
|
||||||
$action = 'view';
|
{
|
||||||
} else {
|
$result = $object->insertExtraFields(empty($triggermodname) ? '' : $triggermodname, $user);
|
||||||
|
if ($result < 0) { $error++; }
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($error) {
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
$action = 'edit_extras';
|
$action = 'edit_extras';
|
||||||
|
} else {
|
||||||
|
setEventMessages($langs->trans('RecordSaved'), null, 'mesgs');
|
||||||
|
$action = 'view';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user