Fix: Comment form files not cleared

This commit is contained in:
buddh4 2018-10-08 21:59:02 +02:00
parent db6d01022a
commit 00286a89a9
2 changed files with 13 additions and 1 deletions

View File

@ -15,6 +15,7 @@ HumHub Change Log
- Enh: Enable `data-action-keypress` by default
- Enh: Added `preventDefault` argument to `humhub.modules.action.bindAction` to disable prevent default behaviour for action events
- Fix: Fix bootstrap-datepicker.en.min.js 404 (Not Found)
- Fix: Comment form files not cleared
1.3.4 (September 25, 2018)

View File

@ -82,6 +82,7 @@ humhub.module('content.form', function(module, require, $) {
this.resetSettingInputs();
this.setDefaultVisibility();
this.resetFilePreview();
this.resetFileUpload();
$('#public').attr('checked', false);
$('#contentFormBody').find('.humhub-ui-richtext').trigger('clear');
@ -95,7 +96,17 @@ humhub.module('content.form', function(module, require, $) {
};
CreateForm.prototype.resetFilePreview = function() {
Widget.instance($('#contentFormFiles_preview')).reset();
var preview = Widget.instance($('#contentFormFiles_preview'));
if(preview) {
preview.reset();
}
};
CreateForm.prototype.resetFileUpload = function() {
var upload = Widget.instance($('#contentForm_message-file-upload'));
if(upload) {
upload.reset();
}
};
CreateForm.prototype.handleError = function(response) {