mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Added new Ablehnungstext and checks to STGL Detail View
. Changed Ablehnungstext . Trim text and focus on textarea to fasten editing . Check if forgot to add own Begründungstext
This commit is contained in:
@@ -23,6 +23,7 @@ $this->load->view(
|
||||
'systemfehler',
|
||||
'bitteMindEinenAntragWaehlen',
|
||||
'bitteBegruendungAngeben',
|
||||
'bitteBegruendungVervollstaendigen',
|
||||
'empfehlungWurdeAngefordert',
|
||||
'anrechnungenWurdenGenehmigt',
|
||||
'anrechnungenWurdenAbgelehnt',
|
||||
@@ -323,7 +324,7 @@ $this->load->view(
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span><?php echo $this->p->t('anrechnung', 'genehmigungNegativKenntnisseNichtGleichwertig'); ?></span>
|
||||
<span><?php echo $this->p->t('anrechnung', 'genehmigungNegativKenntnisseNichtGleichwertigWeil'); ?></span>
|
||||
<span class="btn-copyIntoTextarea pull-right" data-toggle="tooltip"
|
||||
data-placement="right"
|
||||
title="<?php echo $this->p->t('ui', 'textUebernehmen'); ?>">
|
||||
|
||||
@@ -141,6 +141,13 @@ $(function(){
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if forgot to fulfill begruendung
|
||||
if (begruendung.trim().endsWith('weil') || begruendung.endsWith('because of'))
|
||||
{
|
||||
FHC_DialogLib.alertInfo(FHC_PhrasesLib.t("ui", "bitteBegruendungVervollstaendigen"));
|
||||
return;
|
||||
}
|
||||
|
||||
// Get form data
|
||||
let form_data = $('form').serializeArray();
|
||||
|
||||
@@ -471,11 +478,29 @@ var approveAnrechnungDetail = {
|
||||
textarea.val($.trim($('#approveAnrechnungDetail-empfehlungDetail-begruendung').text()));
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
||||
// Find Begruendung span
|
||||
let textspan = $(elem).parent().find('span:first');
|
||||
|
||||
// Get Begruendung
|
||||
let begruendung = textspan.text();
|
||||
|
||||
// Check if Begruendung has helptext
|
||||
let hasHelptext = textspan.children('span #helpTxtBegruendungErgaenzen').length > 0;
|
||||
|
||||
if (hasHelptext)
|
||||
{
|
||||
// Copy begruendung into textarea
|
||||
textarea.val($.trim($(elem).parent().find('span:first').text()));
|
||||
let helptext = textspan.children('span #helpTxtBegruendungErgaenzen').text();
|
||||
|
||||
// Remove helptext
|
||||
begruendung = begruendung.replace(helptext, '');
|
||||
|
||||
// Focus into textarea to encourage writing
|
||||
textarea.focus();
|
||||
}
|
||||
|
||||
// Copy begruendung into textarea
|
||||
textarea.val($.trim(begruendung));
|
||||
},
|
||||
formatEmpfehlungIsRequested: function(statusBezeichnung, empfehlungsanfrageAm, empfehlungsanfrageAn) {
|
||||
$('#approveAnrechnungDetail-empfehlungDetail-empfehlungsanfrageAm').html(empfehlungsanfrageAm);
|
||||
|
||||
Reference in New Issue
Block a user