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

[TASK] Review feedback

parent 24312324
No related branches found
No related tags found
1 merge request!7Feature max file size
......@@ -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 exceeds the maximum filesize</source>
<source>The selected file exceeds the maximum file size</source>
<target>Die ausgewählte Datei ist zu groß!</target>
</trans-unit>
<trans-unit id="frontend.allVacancies" approved="yes">
......
......@@ -106,7 +106,7 @@
<source>Please select one of the following pages:</source>
</trans-unit>
<trans-unit id="error.maxFileSizeMessage">
<source>The selected file exceeds the maximum filesize</source>
<source>The selected file exceeds the maximum file size</source>
</trans-unit>
<trans-unit id="frontend.allVacancies">
<source>All vacancies</source>
......
......@@ -62,8 +62,8 @@
<target>邮编</target>
</trans-unit>
<trans-unit id="error.maxFileSizeMessage" approved="yes">
<source>The selected file exceeds the maximum filesize</source>
<target>The selected file exceeds the maximum filesize</target>
<source>The selected file exceeds the maximum file size</source>
<target>The selected file exceeds the maximum file size</target>
</trans-unit>
<trans-unit id="frontend.allVacancies" approved="yes">
<source>All vacancies</source>
......
......@@ -13,9 +13,9 @@ export default class SgJobs {
constructor() {
$('.remove-file').on('click', this._removeFile);
$('#sgjobs-joblist').on('change', '.sgjobs-select', this._filterJoblist);
$('#apply-cover-letter').on('change', this._checkFileSize);
$('#apply-cv').on('change', this._checkFileSize);
$('#apply-certificate').on('change', this._checkFileSize);
$('#apply-cover-letter').on('change', SgJobs._checkFileSize);
$('#apply-cv').on('change', SgJobs._checkFileSize);
$('#apply-certificate').on('change', SgJobs._checkFileSize);
}
/**
......@@ -53,10 +53,10 @@ export default class SgJobs {
*
* @private
*/
_checkFileSize(event) {
static _checkFileSize(event) {
if (event.currentTarget.files[0].size > document.querySelector('#maxFileSize').getAttribute('data-maxFilesize') * 1000) {
alert(document.querySelector('#maxFileSizeMessage').getAttribute('data-maxFileSizeMessage'));
this.value = "";
event.currentTarget.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