Clear wopi file length error on input, css fix [SCI-8877]

This commit is contained in:
Martin Artnik 2023-07-24 12:46:45 +02:00
parent ff83b97d7b
commit ebfaca6966
2 changed files with 13 additions and 0 deletions

View file

@ -127,6 +127,10 @@
padding: 5px 0;
}
.filter-table input {
width: auto !important;
}
.filter-table,
.display-limit {
flex-shrink: 0;

View file

@ -1,5 +1,7 @@
/* global HelperModule */
const FILENAME_MAX_LENGTH = 100;
export default {
methods: {
initWopiFileModal(step, requestCallback) {
@ -10,6 +12,13 @@ export default {
$wopiModal.modal('show');
$($wopiModal).find('#new-wopi-file-name').focus();
// Clear filename input error on input change if appropriate
$wopiModal.on('input', '#new-wopi-file-name', (e) => {
if (e.currentTarget.value.length <= FILENAME_MAX_LENGTH) {
$wopiModal.clearFormErrors();
}
});
$wopiModal.find('form').on(
'ajax:success',
(e, data, status) => {