Bugzilla – Attachment 89489 Details for
Bug 8558
Better confirmation message for importing frameworks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8558: Improve confirmation message for importing frameworks
Bug-8558-Improve-confirmation-message-for-importin.patch (text/plain), 4.17 KB, created by
Liz Rea
on 2019-05-09 02:01:36 UTC
(
hide
)
Description:
Bug 8558: Improve confirmation message for importing frameworks
Filename:
MIME Type:
Creator:
Liz Rea
Created:
2019-05-09 02:01:36 UTC
Size:
4.17 KB
patch
obsolete
>From 8cfc20587e400636ee6dea92238352198ad05056 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Mon, 29 Apr 2019 03:30:30 +0000 >Subject: [PATCH] Bug 8558: Improve confirmation message for importing > frameworks > >This patch updates the confirmation message from: >"Do you really want to import the framework fields and subfields? This >will overwrite the current configuration. For safety reasons please use >the export option to make a backup" >to: >"Are you sure you want to import the [% frameworkcode %] >framework structure? This will overwrite the current configuration. For >safety reasons, it is recommended to use the export option to make a >backup first." > >To test: >1) Go to Administration -> MARC bibliographic frameworks >2) Export one of the frameworks >3) Create a new test framework >4) Import the new test framework structure using the exported file >5) Upon clicking Confirm, confirm the message is improved and makes >sense. > >Sponsored-by: Catalyst IT > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt | 3 +-- > koha-tmpl/intranet-tmpl/prog/js/biblio_framework.js | 3 ++- > 2 files changed, 3 insertions(+), 3 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 b9814ab09f..c94398cdde 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 >@@ -258,7 +258,7 @@ > <div id="importing_[% loo.frameworkcode | html %]" style="display:none" class="importing"><img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /><span class="importing_msg"></span></div> > </div> > <div class="modal-footer"> >- <button type="submit" class="btn btn-default">Import</button> >+ <button type="submit" class="btn btn-default" title="[% loo.frameworkcode | html %]">Import</button> > <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button> > </div> > </form> >@@ -291,7 +291,6 @@ > /* Set some variable needed in biblio_framework.js */ > var MSG_IMPORT_ERROR = _("Error importing the framework"); > var MSG_SELECT_FILE_FORMAT = _("Please select a CSV (.csv), ODS (.ods) or XML (.xml) spreadsheet file."); >- var MSG_OVERWRITE_WARNING = _("Do you really want to import the framework fields and subfields? This will overwrite the current configuration. For safety reasons please use the export option to make a backup"); > var MSG_IMPORTING_TO_FRAMEWORK = _("Importing to framework: %s. Importing from file: %s."); > var template_path = "[% interface | html %]/[% theme | html %]"; > </script> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/biblio_framework.js b/koha-tmpl/intranet-tmpl/prog/js/biblio_framework.js >index 15dd1f77d2..6c7427fdf9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/biblio_framework.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/biblio_framework.js >@@ -52,8 +52,9 @@ > var id = $(this).attr('id'); > var obj = $('#' + id + ' input:file'); > if (/(?:\.csv|\.ods|\.xml)$/.test(obj.val())) { >+ var frameworkcode = $('#' + id + ' input:hidden[name=frameworkcode]').val(); >+ var MSG_OVERWRITE_WARNING = _("Are you sure you want to import the " + frameworkcode + " framework structure? This will overwrite the current configuration. For safety reasons, it is recommended to use the export option to make a backup first."); > if (confirm( MSG_OVERWRITE_WARNING )) { >- var frameworkcode = $('#' + id + ' input:hidden[name=frameworkcode]').val(); > $('#importing_' + frameworkcode).find("span").html(MSG_IMPORTING_TO_FRAMEWORK.format("<strong>" + frameworkcode + "</strong>", "<i>" + obj.val().replace(new RegExp("^.+[/\\\\]"),"") + "</i>")); > if (navigator.userAgent.toLowerCase().indexOf('msie') != -1) { > var timestamp = new Date().getTime(); >-- >2.11.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 8558
:
88997
|
89366
|
89489
|
89490
|
89491
|
89587
|
89588