Bugzilla – Attachment 47973 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]
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.83 KB, created by
Jonathan Druart
on 2016-02-12 13:11:58 UTC
(
hide
)
Description:
Bug 15790 - Don't delete a MARC framework if existing records use that framework
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-02-12 13:11:58 UTC
Size:
3.83 KB
patch
obsolete
>From 8d8c0d535ef03513e3b78aa9432e7c142edfd487 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 >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >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. > >Depends on Bug 15785 - Use Font Awesome icons in confirmation dialogs > >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. > >Works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../prog/en/modules/admin/biblio_framework.tt | 26 +++++++++++++--------- > 1 file changed, 16 insertions(+), 10 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 8d0b7a8..2232825 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 >@@ -175,18 +175,24 @@ > > [% IF op == 'delete_confirm' %] > <div class="dialog alert"> >- <h3>Delete framework for [% framework.frameworktext %] ([% framework.frameworkcode %])?</h3> > [% IF biblios_use_this_framework %] >- <p><strong>This framework is used [% biblios_use_this_framework %] times</strong>.</p> >+ <h3>This framework cannot be deleted</h3> >+ <p><strong><span class="ex">[% framework.frameworktext %] ([% framework.frameworkcode %])</span></strong></p> >+ <p>The framework is used [% biblios_use_this_framework %] times.</p> >+ <form action="/cgi-bin/koha/admin/biblio_framework.pl" method="get"> >+ <button type="submit"><i class="fa fa-fw fa-arrow-left"></i> Return to frameworks</button> >+ </form> >+ [% ELSE %] >+ <h3>Delete framework for [% framework.frameworktext %] ([% framework.frameworkcode %])?</h3> >+ <form class="inline" action="/cgi-bin/koha/admin/biblio_framework.pl" method="post"> >+ <input type="hidden" name="op" value="delete_confirmed" /> >+ <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" /> >+ <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this framework</button> >+ </form> >+ <form class="inline" action="/cgi-bin/koha/admin/biblio_framework.pl" method="get"> >+ <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button> >+ </form> > [% END %] >- <form class="inline" action="/cgi-bin/koha/admin/biblio_framework.pl" method="post"> >- <input type="hidden" name="op" value="delete_confirmed" /> >- <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" /> >- <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this framework</button> >- </form> >- <form class="inline" action="/cgi-bin/koha/admin/biblio_framework.pl" method="get"> >- <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button> >- </form> > </div> > [% END %] > >-- >2.7.0
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