Fixed: Added serversite check on required form fields

After refactoring code to apply via AJAX call, required fields
have to be direclty validated in JS or on serversite. Now fixed by
checking on serversite.

Signed-off-by: cris-technikum <hainberg@technikum-wien.at>
This commit is contained in:
Cris
2021-03-29 17:55:50 +02:00
committed by cris-technikum
parent c455778731
commit 287b961697
2 changed files with 47 additions and 7 deletions
@@ -133,10 +133,10 @@ $this->load->view(
<div class="checkbox">
<label>
<input type="radio" name="begruendung" value="1" required
<?php echo $anrechnungData->begruendung_id == '1' ? 'checked' : ''; ?>>
<?php echo $anrechnungData->begruendung_id == '1' ? 'checked' : ''; ?> />
<?php echo $this->p->t('anrechnung', 'antragStellenWegenZeugnis'); ?>&emsp;
<span id="requestAnrechnung-anrechnungGrundZeugnisTooltip" data-toggle="tooltip" data-placement="right"
title="<?php echo $this->p->t('anrechnung', 'anrechnungGrundZeugnisTooltipText'); ?>">
title="<?php echo $this->p->t('anrechnung', 'anrechnungGrundZeugnisTooltipText'); ?>" />
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i>
</span>
</label>
@@ -176,11 +176,11 @@ $this->load->view(
title="<?php echo $this->p->t('ui', 'uploadTooltipText'); ?>">
<i class="fa fa-lg fa-question-circle-o" aria-hidden="true"></i>
</span>
<?php if (!empty($anrechnungData->dms_id)): ?>
<a class="pull-right"
href="<?php echo current_url() . '/download?dms_id=' . $anrechnungData->dms_id; ?>"
target="_blank"><?php echo htmlentities($anrechnungData->dokumentname) ?></a>
<?php endif; ?>
<a class="pull-right <?php echo !empty($anrechnungData->dms_id) ? '' : 'hidden' ?>"
id="requestAnrechnung-downloadDocLink"
href="<?php echo current_url() . '/download?dms_id=' . $anrechnungData->dms_id; ?>"
target="_blank"><?php echo htmlentities($anrechnungData->dokumentname) ?>
</a>
</div>
</div>
</div>
+40
View File
@@ -10450,6 +10450,46 @@ array(
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'errorFelderFehlen',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Daten fehlen.<br>Bitte f&uuml;llen Sie alle Formularfelder aus",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "Missing data.<br>Please fill in all form fields",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'errorUploadFehlt',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Dokument fehlt.<br>Bitte laden Sie noch die entsprechenden Dokumente hoch.",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "Missing document.<br>Please upload the required documents.",
'description' => '',
'insertvon' => 'system'
)
)
),
);