Added button to copy Empfehlungstext into reason textarea when rejecting

Signed-off-by: cris-technikum <hainberg@technikum-wien.at>
This commit is contained in:
Cris
2021-03-25 17:12:38 +01:00
committed by cris-technikum
parent f9cbd9caf5
commit 279157b920
3 changed files with 39 additions and 2 deletions
@@ -286,6 +286,14 @@ $this->load->view(
<i class="fa fa-clipboard" aria-hidden="true"></i>
</span>
</li>
<li>
<span><?php echo $this->p->t('anrechnung', 'genehmigungNegativEmpfehlungstextUebernehmen'); ?></span>
<span id="empfehlungstextUebernehmen" class="btn-copyIntoTextarea" data-toggle="tooltip"
data-placement="right"
title="<?php echo $this->p->t('ui', 'textUebernehmen'); ?>">
<i class="fa fa-clipboard" aria-hidden="true"></i>
</span>
</li>
<li><?php echo $this->p->t('anrechnung', 'andereBegruendung'); ?></li>
</ul>
<br>
@@ -351,8 +351,17 @@ var approveAnrechnungDetail = {
// Find closest textarea
let textarea = $(elem).closest('div').find('textarea');
// Copy begruendung into textarea
textarea.val($.trim($(elem).parent().find('span:first').text()));
if (elem.id.length && elem.id == 'empfehlungstextUebernehmen')
{
// Copy Empfehlungstext into textarea
textarea.val($('#approveAnrechnungDetail-empfehlungDetail-begruendung').text());
return;
}
else
{
// Copy begruendung into textarea
textarea.val($.trim($(elem).parent().find('span:first').text()));
}
},
formatEmpfehlungIsRequested: function(empfehlungAngefordertAm, statusBezeichnung) {
$('#approveAnrechnungDetail-empfehlungDetail').children().addClass('hidden');
+20
View File
@@ -10430,6 +10430,26 @@ array(
)
)
),
array(
'app' => 'core',
'category' => 'anrechnung',
'phrase' => 'genehmigungNegativEmpfehlungstextUebernehmen',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Empfehlungstext des Lektors als Begr&uuml;ndung &uuml;bernehmen.",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "Copy the lectors recommendation text as reason for the rejection.",
'description' => '',
'insertvon' => 'system'
)
)
),
);