Bug 19417: Display full error text when problem importing records
To test: 1 - Upload a file to stage 2 - Select your import options 3 - Delete the file from the server, example: sudo rm /tmp/koha_kohadev_uploads/ 4 - 'Click stage for import' 5 - Get an alert 'Failed to submit form: error' 6 - Apply patches 7 - Repeat 1-4 8 - Get a pretty error with additional info Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
40d0a77a01
commit
3d167645be
3 changed files with 4 additions and 2 deletions
|
@ -75,7 +75,6 @@ var humanMsg = {
|
||||||
bindEvents: function() {
|
bindEvents: function() {
|
||||||
// Remove message if mouse is moved or key is pressed
|
// Remove message if mouse is moved or key is pressed
|
||||||
jQuery(document)
|
jQuery(document)
|
||||||
.mousemove(humanMsg.removeMsg)
|
|
||||||
.click(humanMsg.removeMsg)
|
.click(humanMsg.removeMsg)
|
||||||
.keypress(humanMsg.removeMsg)
|
.keypress(humanMsg.removeMsg)
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
#fileuploadstatus,#fileuploadfailed,#fileuploadcancel,#jobpanel,#jobstatus,#jobfailed { display : none; }
|
#fileuploadstatus,#fileuploadfailed,#fileuploadcancel,#jobpanel,#jobstatus,#jobfailed { display : none; }
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
[% Asset.css("css/humanmsg.css") %]
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body id="tools_stage-marc-import" class="tools">
|
<body id="tools_stage-marc-import" class="tools">
|
||||||
[% INCLUDE 'header.inc' %]
|
[% INCLUDE 'header.inc' %]
|
||||||
|
@ -213,6 +215,7 @@
|
||||||
[% Asset.js("js/tools-menu.js") | $raw %]
|
[% Asset.js("js/tools-menu.js") | $raw %]
|
||||||
[% Asset.js("js/background-job-progressbar.js") | $raw %]
|
[% Asset.js("js/background-job-progressbar.js") | $raw %]
|
||||||
[% Asset.js("js/file-upload.js") | $raw %]
|
[% Asset.js("js/file-upload.js") | $raw %]
|
||||||
|
[% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
|
||||||
<script>
|
<script>
|
||||||
var xhr;
|
var xhr;
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
|
@ -69,7 +69,7 @@ function submitBackgroundJob(f) {
|
||||||
backgroundJobProgressTimer = setInterval("updateJobProgress()", 500);
|
backgroundJobProgressTimer = setInterval("updateJobProgress()", 500);
|
||||||
},
|
},
|
||||||
error: function(xml, textStatus) {
|
error: function(xml, textStatus) {
|
||||||
alert('Failed to submit form: ' + textStatus);
|
humanMsg.displayMsg( '<p>' + _('Failed to submit form: ') + textStatus + '</p></br>'+xml.responseText, { className: 'humanError' } );
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue