Skip to content
Snippets Groups Projects
Commit 24312324 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Review feedback

parent 22ddf873
No related branches found
No related tags found
1 merge request!7Feature max file size
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
<target>Bitte wählen Sie eine der folgenden Seiten aus:</target> <target>Bitte wählen Sie eine der folgenden Seiten aus:</target>
</trans-unit> </trans-unit>
<trans-unit id="error.maxFileSizeMessage" approved="yes"> <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> <target>Die ausgewählte Datei ist zu groß!</target>
</trans-unit> </trans-unit>
<trans-unit id="frontend.allVacancies" approved="yes"> <trans-unit id="frontend.allVacancies" approved="yes">
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<source>Please select one of the following pages:</source> <source>Please select one of the following pages:</source>
</trans-unit> </trans-unit>
<trans-unit id="error.maxFileSizeMessage"> <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>
<trans-unit id="frontend.allVacancies"> <trans-unit id="frontend.allVacancies">
<source>All vacancies</source> <source>All vacancies</source>
......
...@@ -62,8 +62,8 @@ ...@@ -62,8 +62,8 @@
<target>邮编</target> <target>邮编</target>
</trans-unit> </trans-unit>
<trans-unit id="error.maxFileSizeMessage" approved="yes"> <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>The selected File is too big!</target> <target>The selected file exceeds the maximum filesize</target>
</trans-unit> </trans-unit>
<trans-unit id="frontend.allVacancies" approved="yes"> <trans-unit id="frontend.allVacancies" approved="yes">
<source>All vacancies</source> <source>All vacancies</source>
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
</f:if> </f:if>
</div> </div>
<div class="default-content-element"> <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:form action="apply" controller="Joblist" method="post" name="applyData" object="{applyData}" enctype="multipart/form-data">
<f:if condition="{job}"> <f:if condition="{job}">
<f:then> <f:then>
......
...@@ -44,14 +44,19 @@ export default class SgJobs { ...@@ -44,14 +44,19 @@ export default class SgJobs {
* *
* @private * @private
*/ */
_filterJoblist() { static _filterJoblist() {
$('#sgjobs-filter').submit(); $('#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')); alert(document.querySelector('#maxFileSizeMessage').getAttribute('data-maxFileSizeMessage'));
this.value = ""; this.value = "";
}; }
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment