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>
bindEvents: function() {
// Remove message if mouse is moved or key is pressed
jQuery(document)
- .mousemove(humanMsg.removeMsg)
.click(humanMsg.removeMsg)
.keypress(humanMsg.removeMsg)
},
#fileuploadstatus,#fileuploadfailed,#fileuploadcancel,#jobpanel,#jobstatus,#jobfailed { display : none; }
</style>
+[% Asset.css("css/humanmsg.css") %]
+
</head>
<body id="tools_stage-marc-import" class="tools">
[% INCLUDE 'header.inc' %]
[% Asset.js("js/tools-menu.js") | $raw %]
[% Asset.js("js/background-job-progressbar.js") | $raw %]
[% Asset.js("js/file-upload.js") | $raw %]
+ [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
<script>
var xhr;
$(document).ready(function(){
backgroundJobProgressTimer = setInterval("updateJobProgress()", 500);
},
error: function(xml, textStatus) {
- alert('Failed to submit form: ' + textStatus);
+ humanMsg.displayMsg( '<p>' + _('Failed to submit form: ') + textStatus + '</p></br>'+xml.responseText, { className: 'humanError' } );
}
});