commit
5effcd222f
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
/* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -74,4 +74,3 @@ print '</form>';
|
|||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
/* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -50,7 +51,7 @@ if ($_POST) {
|
|||||||
$object->label = $label;
|
$object->label = $label;
|
||||||
|
|
||||||
if ($object->update($user) < 1) {
|
if ($object->update($user) < 1) {
|
||||||
setEventMessages($langs->trans('CoreErrorMessage'), null, 'errors');
|
setEventMessages($langs->trans('CoreErrorMessage'), $object->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
setEventMessages($langs->trans('RecordSaved'), null, 'mesgs');
|
setEventMessages($langs->trans('RecordSaved'), null, 'mesgs');
|
||||||
header('Location: '.dol_buildpath('/variants/card.php?id='.$id, 2));
|
header('Location: '.dol_buildpath('/variants/card.php?id='.$id, 2));
|
||||||
@ -79,7 +80,7 @@ if ($_POST) {
|
|||||||
if ($objectval->update($user) > 0) {
|
if ($objectval->update($user) > 0) {
|
||||||
setEventMessages($langs->trans('RecordSaved'), null, 'mesgs');
|
setEventMessages($langs->trans('RecordSaved'), null, 'mesgs');
|
||||||
} else {
|
} else {
|
||||||
setEventMessage($langs->trans('CoreErrorMessage'), null, 'errors');
|
setEventMessage($langs->trans('CoreErrorMessage'), $objectval->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -99,7 +100,7 @@ if ($confirm == 'yes') {
|
|||||||
|
|
||||||
if ($res < 1 || ($object->delete() < 1)) {
|
if ($res < 1 || ($object->delete() < 1)) {
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessages($langs->trans('CoreErrorMessage'), null, 'errors');
|
setEventMessages($langs->trans('CoreErrorMessage'), $object->errors, 'errors');
|
||||||
header('Location: '.dol_buildpath('/variants/card.php?id='.$object->id, 2));
|
header('Location: '.dol_buildpath('/variants/card.php?id='.$object->id, 2));
|
||||||
} else {
|
} else {
|
||||||
$db->commit();
|
$db->commit();
|
||||||
@ -113,7 +114,7 @@ if ($confirm == 'yes') {
|
|||||||
if ($objectval->fetch($valueid) > 0) {
|
if ($objectval->fetch($valueid) > 0) {
|
||||||
|
|
||||||
if ($objectval->delete() < 1) {
|
if ($objectval->delete() < 1) {
|
||||||
setEventMessages($langs->trans('CoreErrorMessage'), null, 'errors');
|
setEventMessages($langs->trans('CoreErrorMessage'), $objectval->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
setEventMessages($langs->trans('RecordSaved'), null, 'mesgs');
|
setEventMessages($langs->trans('RecordSaved'), null, 'mesgs');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
/* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
/* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -49,7 +50,7 @@ if ($_POST) {
|
|||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
setEventMessage($langs->trans('ErrorRecordAlreadyExists'), 'errors');
|
setEventMessages($langs->trans('ErrorRecordAlreadyExists'), $prodattr->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
/* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -70,7 +71,7 @@ if ($action == 'add')
|
|||||||
header('Location: '.DOL_URL_ROOT.'/variants/card.php?id='.$object->id);
|
header('Location: '.DOL_URL_ROOT.'/variants/card.php?id='.$object->id);
|
||||||
exit();
|
exit();
|
||||||
} else {
|
} else {
|
||||||
setEventMessages($langs->trans('ErrorCreatingProductAttributeValue'), null, 'errors');
|
setEventMessages($langs->trans('ErrorCreatingProductAttributeValue'), $objectval->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
/* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user