mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 22:42:16 +00:00
Added new Ablehnungstext and checks to Lector 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:
@@ -21,6 +21,7 @@ $this->load->view(
|
||||
'systemfehler',
|
||||
'bitteMindEinenAntragWaehlen',
|
||||
'bitteBegruendungAngeben',
|
||||
'bitteBegruendungVervollstaendigen',
|
||||
'anrechnungenWurdenEmpfohlen',
|
||||
'anrechnungenWurdenNichtEmpfohlen'
|
||||
),
|
||||
@@ -234,7 +235,7 @@ $this->load->view(
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span><?php echo $this->p->t('anrechnung', 'empfehlungNegativKenntnisseNichtGleichwertig'); ?></span> 
|
||||
<span><?php echo $this->p->t('anrechnung', 'empfehlungNegativKenntnisseNichtGleichwertigWeil'); ?></span> 
|
||||
<span class="btn-copyIntoTextarea pull-right" data-toggle="tooltip"
|
||||
data-placement="right"
|
||||
title="<?php echo $this->p->t('ui', 'textUebernehmen'); ?>">
|
||||
|
||||
@@ -133,6 +133,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();
|
||||
|
||||
@@ -241,8 +248,29 @@ var reviewAnrechnung = {
|
||||
// Find closest textarea
|
||||
let textarea = $(elem).closest('div').find('textarea');
|
||||
|
||||
// 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)
|
||||
{
|
||||
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($(elem).parent().find('span:first').text()));
|
||||
textarea.val($.trim(begruendung));
|
||||
|
||||
},
|
||||
formatEmpfehlungIsTrue: function(empfehlungAm, emfehlungVon, statusBezeichnung){
|
||||
$('#reviewAnrechnungDetail-status_kurzbz').text(statusBezeichnung);
|
||||
|
||||
Reference in New Issue
Block a user