diff --git a/htdocs/core/actions_extrafields.inc.php b/htdocs/core/actions_extrafields.inc.php index dd762f466f4..25c9d299ee2 100644 --- a/htdocs/core/actions_extrafields.inc.php +++ b/htdocs/core/actions_extrafields.inc.php @@ -401,8 +401,12 @@ if ($action == 'update') { // Delete attribute if ($action == 'delete') { if (GETPOSTISSET("attrname") && preg_match("/^\w[a-zA-Z0-9-_]*$/", GETPOST("attrname", 'aZ09'))) { - $result = $extrafields->delete(GETPOST("attrname", 'aZ09'), $elementtype); + $attributekey = GETPOST('attrname', 'aZ09'); + + $result = $extrafields->delete($attributekey, $elementtype); if ($result >= 0) { + setEventMessages($langs->trans("ExtrafieldsDeleted", $attributekey), null, 'mesgs'); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index d6b148fd32e..9df78b592a0 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2416,4 +2416,5 @@ AllowAnyPrivileges=If a user A has this permission, he can create a user B with ThisValueCanBeReadBecauseInstanceIsNotInProductionMode=This value can be read because your instance is not set in production mode SeeConfFile=See inside conf.php file on the server ReEncryptDesc=Reencrypt data if not yet encrypted -PasswordFieldEncrypted=%s new record have this field been encrypted \ No newline at end of file +PasswordFieldEncrypted=%s new record have this field been encrypted +ExtrafieldsDeleted=Extrafields %s has been deleted \ No newline at end of file