View | Details | Raw Unified | Return to bug 8558
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt (-2 / +1 lines)
Lines 258-264 Link Here
258
                      <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>
258
                      <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>
259
                    </div>
259
                    </div>
260
                    <div class="modal-footer">
260
                    <div class="modal-footer">
261
                      <button type="submit" class="btn btn-default">Import</button>
261
                      <button type="submit" class="btn btn-default" title="[% loo.frameworkcode | html %]">Import</button>
262
                      <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
262
                      <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
263
                    </div>
263
                    </div>
264
                  </form>
264
                  </form>
Lines 291-297 Link Here
291
        /* Set some variable needed in biblio_framework.js */
291
        /* Set some variable needed in biblio_framework.js */
292
        var MSG_IMPORT_ERROR = _("Error importing the framework");
292
        var MSG_IMPORT_ERROR = _("Error importing the framework");
293
        var MSG_SELECT_FILE_FORMAT = _("Please select a CSV (.csv), ODS (.ods) or XML (.xml) spreadsheet file.");
293
        var MSG_SELECT_FILE_FORMAT = _("Please select a CSV (.csv), ODS (.ods) or XML (.xml) spreadsheet file.");
294
        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");
295
        var MSG_IMPORTING_TO_FRAMEWORK = _("Importing to framework: %s. Importing from file: %s.");
294
        var MSG_IMPORTING_TO_FRAMEWORK = _("Importing to framework: %s. Importing from file: %s.");
296
        var template_path = "[% interface | html %]/[% theme | html %]";
295
        var template_path = "[% interface | html %]/[% theme | html %]";
297
    </script>
296
    </script>
(-)a/koha-tmpl/intranet-tmpl/prog/js/biblio_framework.js (-2 / +2 lines)
Lines 52-59 Link Here
52
            var id = $(this).attr('id');
52
            var id = $(this).attr('id');
53
            var obj = $('#' + id + ' input:file');
53
            var obj = $('#' + id + ' input:file');
54
            if (/(?:\.csv|\.ods|\.xml)$/.test(obj.val())) {
54
            if (/(?:\.csv|\.ods|\.xml)$/.test(obj.val())) {
55
                var frameworkcode = $('#' + id + ' input:hidden[name=frameworkcode]').val();
56
                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.");
55
                if (confirm( MSG_OVERWRITE_WARNING )) {
57
                if (confirm( MSG_OVERWRITE_WARNING )) {
56
                    var frameworkcode = $('#' + id + ' input:hidden[name=frameworkcode]').val();
57
                    $('#importing_' + frameworkcode).find("span").html(MSG_IMPORTING_TO_FRAMEWORK.format("<strong>" + frameworkcode + "</strong>", "<i>" + obj.val().replace(new RegExp("^.+[/\\\\]"),"") + "</i>"));
58
                    $('#importing_' + frameworkcode).find("span").html(MSG_IMPORTING_TO_FRAMEWORK.format("<strong>" + frameworkcode + "</strong>", "<i>" + obj.val().replace(new RegExp("^.+[/\\\\]"),"") + "</i>"));
58
                    if (navigator.userAgent.toLowerCase().indexOf('msie') != -1) {
59
                    if (navigator.userAgent.toLowerCase().indexOf('msie') != -1) {
59
                        var timestamp = new Date().getTime();
60
                        var timestamp = new Date().getTime();
60
- 

Return to bug 8558