diff --git a/Resources/Private/Language/de.locallang.xlf b/Resources/Private/Language/de.locallang.xlf index 080121a35df8b129073bfeade3d0c0c2ea5293a9..9d4e0732731475a508425f1666a70b8493019c9e 100644 --- a/Resources/Private/Language/de.locallang.xlf +++ b/Resources/Private/Language/de.locallang.xlf @@ -139,7 +139,7 @@ <target>Bitte wählen Sie eine der folgenden Seiten aus:</target> </trans-unit> <trans-unit id="error.maxFileSizeMessage" approved="yes"> - <source>The selected File is too big!</source> + <source>The selected file exceeds the maximum filesize</source> <target>Die ausgewählte Datei ist zu groß!</target> </trans-unit> <trans-unit id="frontend.allVacancies" approved="yes"> diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf index 18639fe8e865fd130792dc7b52ecf6ebd4bf64af..a28b09f630080fca175abef4949a38c9f80dec95 100644 --- a/Resources/Private/Language/locallang.xlf +++ b/Resources/Private/Language/locallang.xlf @@ -106,7 +106,7 @@ <source>Please select one of the following pages:</source> </trans-unit> <trans-unit id="error.maxFileSizeMessage"> - <source>The selected File is too big!</source> + <source>The selected file exceeds the maximum filesize</source> </trans-unit> <trans-unit id="frontend.allVacancies"> <source>All vacancies</source> diff --git a/Resources/Private/Language/zh.locallang.xlf b/Resources/Private/Language/zh.locallang.xlf index e7b12a6beb447f5932fd70607736ee7812c7df80..f804284f58be6c5fedc47af1d3e1425fbef3b330 100644 --- a/Resources/Private/Language/zh.locallang.xlf +++ b/Resources/Private/Language/zh.locallang.xlf @@ -62,8 +62,8 @@ <target>邮编</target> </trans-unit> <trans-unit id="error.maxFileSizeMessage" approved="yes"> - <source>The selected File is too big!</source> - <target>The selected File is too big!</target> + <source>The selected file exceeds the maximum filesize</source> + <target>The selected file exceeds the maximum filesize</target> </trans-unit> <trans-unit id="frontend.allVacancies" approved="yes"> <source>All vacancies</source> diff --git a/Resources/Private/Templates/Joblist/ApplyForm.html b/Resources/Private/Templates/Joblist/ApplyForm.html index bb438f4526638c6b10078a74fd0db2823cee373d..eb0929baea4652d2fb56b8e1421bbc13d1e3a382 100644 --- a/Resources/Private/Templates/Joblist/ApplyForm.html +++ b/Resources/Private/Templates/Joblist/ApplyForm.html @@ -14,6 +14,8 @@ </f:if> </div> <div class="default-content-element"> + <input id="maxFileSize" type="hidden" data-maxFileSize="{maxFileSize}" /> + <input id="maxFileSizeMessage" type="hidden" data-maxFileSizeMessage="{maxFileSizeMessage}" /> <f:form action="apply" controller="Joblist" method="post" name="applyData" object="{applyData}" enctype="multipart/form-data"> <f:if condition="{job}"> <f:then> diff --git a/Resources/Public/JavaScript/sgJobs.js b/Resources/Public/JavaScript/sgJobs.js index 28040eb7f35b05b3b335085d731f974b3b565202..a1868594acaf713f81d7ee9cfee15c73d1394b27 100644 --- a/Resources/Public/JavaScript/sgJobs.js +++ b/Resources/Public/JavaScript/sgJobs.js @@ -44,14 +44,19 @@ export default class SgJobs { * * @private */ - _filterJoblist() { + static _filterJoblist() { $('#sgjobs-filter').submit(); } - _checkFileSize() { - if (this.files[0].size > document.querySelector('#maxFileSize').getAttribute('data-maxFilesize') * 1000) { + /** + * Check the file size of the upload fields + * + * @private + */ + _checkFileSize(event) { + if (event.currentTarget.files[0].size > document.querySelector('#maxFileSize').getAttribute('data-maxFilesize') * 1000) { alert(document.querySelector('#maxFileSizeMessage').getAttribute('data-maxFileSizeMessage')); this.value = ""; - }; + } } }