Bugzilla – Attachment 48731 Details for
Bug 15790
Don't delete a MARC framework if existing records use that framework
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[3.22.x] Bug 15790 - Don't delete a MARC framework if existing records use that framework
Bug-15790---Dont-delete-a-MARC-framework-if-existi.patch (text/plain), 3.07 KB, created by
Julian Maurice
on 2016-03-07 10:25:01 UTC
(
hide
)
Description:
[3.22.x] Bug 15790 - Don't delete a MARC framework if existing records use that framework
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2016-03-07 10:25:01 UTC
Size:
3.07 KB
patch
obsolete
>From 18820b6c8fc30fb25c99e0e0710d08eda2bc745c Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 11 Feb 2016 12:06:39 -0500 >Subject: [PATCH] Bug 15790 - Don't delete a MARC framework if existing records > use that framework > >If a MARC framework is in use by any records it should not be possible >to delete it. Deleting a framework which is in use will leave the >deleted framework code in those records. > >This patch modifies the deletion confirmation dialog so that it will not >let the user confirm the deletion if there are records using it. > >To test, apply the patch and go to Administration -> MARC frameworks > >1. Try to delete a framework which is in use by 1 or more records. The > resulting confirmation dialog should prevent you from proceeding. >2. Try to delete a framework which is not in use. Test both canceling > and confirming that deletion to make both function correctly. > >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > .../prog/en/modules/admin/biblio_framework.tt | 21 ++++++++++++++++----- > 1 file changed, 16 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt >index 8b90023..ddcb406 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt >@@ -135,13 +135,24 @@ > > [% IF ( delete_confirm ) %] > <div class="dialog alert"> >- <h3>Delete framework for [% frameworktext %] ([% frameworkcode %])?</h3> > [% IF ( total ) %] >- <p><strong>This framework is used [% total %] times</strong>.</p> >+ <h3>This framework cannot be deleted</h3> >+ <p><strong><span class="ex">[% frameworktext %] ([% frameworkcode %])</span></strong></p> >+ <p><strong>This framework is used [% total %] times</strong>.</p> >+ <form action="/cgi-bin/koha/admin/biblio_framework.pl" method="get"> >+ <input type="submit" value="Return to frameworks" /> >+ </form> >+ [% ELSE %] >+ <h3>Delete framework for [% frameworktext %] ([% frameworkcode %])?</h3> >+ <form class="inline" action="[% script_name %]" method="post"> >+ <input type="hidden" name="op" value="delete_confirmed" /> >+ <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" /> >+ <input type="submit" class="approve" value="Yes, delete this framework!" /> >+ </form> >+ <form class="inline" action="[% script_name %]" method="get"> >+ <input type="submit" class="deny" value="No, do not delete!" /> >+ </form> > [% END %] >- <form class="inline" action="[% script_name %]" method="post"><input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" /><input type="submit" class="approve" value="Yes, delete this framework!" /> >- </form> >- <form class="inline" action="[% script_name %]" method="get"><input type="submit" class="deny" value="No, do not delete!" /></form> > </div> > [% END %] > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15790
:
47931
|
47933
|
47973
| 48731