]> git.koha-community.org Git - koha.git/commit
Bug 12965: Prevent to erase an existing item type
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 10 Jul 2015 15:11:48 +0000 (16:11 +0100)
committerChris Cormack <chris@bigballofwax.co.nz>
Tue, 22 Sep 2015 01:42:53 +0000 (13:42 +1200)
commite76def3a946d39bc56737236554be6aa21c725a9
tree0dcf5f02361c71fc4ef988ad39efee86d7e9b99d
parent1ed31fe5ba874a649d34beb0fb649bd912fe456d
Bug 12965: Prevent to erase an existing item type

On creating an item type, if it already exists, it will replace the
existing one.
This patch prevent that and display a message to the interface.

Note: The fields are lost.

Test plan:
1/ Create an item type 'AAA', description 'AAA'
2/ Edit it, update the description with 'BBB'
3/ Create an item type 'AAA' with a description 'CCC' => you should get
a warning "already exists".

Works well, no errors

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Warning message is triggered.
Adding, editing and deleting item types still works.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eb12ee1e223b662cd1e89c0a56a5d1c083ba1ddc)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
admin/itemtypes.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt