mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-17 03:59:28 +00:00
Adapted STGL overview: info/begruendungsangabe when approving/rejecting
Signed-off-by: cris-technikum <hainberg@technikum-wien.at>
This commit is contained in:
@@ -115,9 +115,59 @@ $this->load->view(
|
||||
<?php $this->load->view('lehre/anrechnung/approveAnrechnungUebersichtData.php'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Genehmigen / Ablehnen Panel -->
|
||||
<div class="row">
|
||||
<div class="panel panel-default panel-body" style="display: none"
|
||||
id="approveAnrechnungUebersicht-begruendung-panel">
|
||||
<div>
|
||||
<div class="alert alert-danger"><b><?php echo $this->p->t('anrechnung', 'genehmigungenNegativ'); ?></b></div>
|
||||
<h4><?php echo $this->p->t('anrechnung', 'bitteBegruendungAngeben'); ?></h4><br>
|
||||
<ol>
|
||||
<li><?php echo $this->p->t('anrechnung', 'genehmigungNegativPruefungNichtMoeglich'); ?>
|
||||
<a class="btn-copyIntoTextarea" data-toggle="tooltip" data-placement="left"
|
||||
title="<?php echo $this->p->t('ui', 'textUebernehmen'); ?>">
|
||||
<i class="fa fa-clipboard" aria-hidden="true"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li><?php echo $this->p->t('anrechnung', 'genehmigungNegativKenntnisseNichtGleichwertig'); ?>
|
||||
<a class="btn-copyIntoTextarea" data-toggle="tooltip" data-placement="left"
|
||||
title="<?php echo $this->p->t('ui', 'textUebernehmen'); ?>">
|
||||
<i class="fa fa-clipboard" aria-hidden="true"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li><?php echo $this->p->t('anrechnung', 'andereBegruendung'); ?></li>
|
||||
</ol>
|
||||
<br>
|
||||
<span class="text-danger">
|
||||
<?php echo $this->p->t('anrechnung', 'begruendungWirdFuerAlleUebernommen'); ?>
|
||||
</span><br><br>
|
||||
<textarea class="form-control" name="begruendung" id="approveAnrechnungUebersicht-begruendung"
|
||||
rows="2" required></textarea>
|
||||
</div>
|
||||
<br>
|
||||
<!-- Action Button 'Abbrechen'-->
|
||||
<div class="pull-right">
|
||||
<button id="approveAnrechnungUebersicht-begruendung-abbrechen" class="btn btn-default btn-w200">
|
||||
<?php echo ucfirst($this->p->t('ui', 'abbrechen')); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default panel-body" style="display: none"
|
||||
id="approveAnrechnungUebersicht-empfehlung-panel">
|
||||
<div>
|
||||
<div class="alert alert-success"><b><?php echo $this->p->t('anrechnung', 'genehmigungenPositiv'); ?></b></div>
|
||||
</div>
|
||||
<br>
|
||||
<!-- Action Button 'Abbrechen'-->
|
||||
<div class="pull-right">
|
||||
<button id="approveAnrechnungUebersicht-empfehlung-abbrechen" class="btn btn-default btn-w200">
|
||||
<?php echo ucfirst($this->p->t('ui', 'abbrechen')); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Filter buttons / Submit buttons-->
|
||||
<div class="row">
|
||||
|
||||
<!-- Filter buttons -->
|
||||
<div class="col-xs-5 col-md-4">
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
@@ -141,7 +191,6 @@ $this->load->view(
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Action Buttons 'Genehmigen', 'Empfehlung anfordern'-->
|
||||
<div class="col-xs-7 col-md-8">
|
||||
<div class="pull-right">
|
||||
@@ -149,7 +198,7 @@ $this->load->view(
|
||||
<button id="reject-anrechnungen" class="btn btn-danger btn-w200"><?php echo ucfirst($this->p->t('global', 'ablehnen')); ?></button>
|
||||
<button id="approve-anrechnungen" class="btn btn-primary btn-w200"><?php echo ucfirst($this->p->t('global', 'genehmigen')); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -172,6 +172,18 @@ $(function(){
|
||||
|
||||
// Approve Anrechnungen
|
||||
$("#approve-anrechnungen").click(function(){
|
||||
let genehmigung_panel = $('#approveAnrechnungUebersicht-empfehlung-panel');
|
||||
let begruendung_panel = $('#approveAnrechnungUebersicht-begruendung-panel');
|
||||
|
||||
begruendung_panel.css('display', 'none');
|
||||
|
||||
if (genehmigung_panel.is(":hidden"))
|
||||
{
|
||||
// Show begruendung panel if is hidden
|
||||
genehmigung_panel.slideDown('slow');
|
||||
return;
|
||||
}
|
||||
|
||||
// Get selected rows data
|
||||
let selected_data = $('#tableWidgetTabulator').tabulator('getSelectedData')
|
||||
.map(function(data){
|
||||
@@ -188,12 +200,14 @@ $(function(){
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Prepare data object for ajax call
|
||||
let data = {
|
||||
'data': selected_data
|
||||
};
|
||||
|
||||
// Hide genehmigung panel again
|
||||
genehmigung_panel.slideUp('slow');
|
||||
|
||||
FHC_AjaxClient.ajaxCallPost(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.called_path + "/approve",
|
||||
data,
|
||||
@@ -225,6 +239,28 @@ $(function(){
|
||||
|
||||
// Reject Anrechnungen
|
||||
$("#reject-anrechnungen").click(function(){
|
||||
let begruendung_panel = $('#approveAnrechnungUebersicht-begruendung-panel');
|
||||
let begruendung = $('#approveAnrechnungUebersicht-begruendung').val();
|
||||
let genehmigung_panel = $('#approveAnrechnungUebersicht-empfehlung-panel');
|
||||
|
||||
genehmigung_panel.css('display', 'none');
|
||||
|
||||
if (begruendung_panel.is(":hidden"))
|
||||
{
|
||||
// Show begruendung panel if is hidden
|
||||
begruendung_panel.slideDown('slow');
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check if begruendung is given
|
||||
if (!begruendung.trim()) // empty or white spaces only
|
||||
{
|
||||
FHC_DialogLib.alertInfo('Bitte tragen Sie eine Begründung ein.');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Get selected rows data
|
||||
let selected_data = $('#tableWidgetTabulator').tabulator('getSelectedData')
|
||||
.map(function(data){
|
||||
@@ -252,6 +288,9 @@ $(function(){
|
||||
'data': selected_data
|
||||
};
|
||||
|
||||
// Hide begruendung panel again
|
||||
$(begruendung_panel).slideUp('slow');
|
||||
|
||||
FHC_AjaxClient.ajaxCallPost(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.called_path + "/reject",
|
||||
data,
|
||||
@@ -344,6 +383,24 @@ $(function(){
|
||||
);
|
||||
});
|
||||
|
||||
// Break Genehmigung abgeben
|
||||
$('#approveAnrechnungUebersicht-empfehlung-abbrechen').click(function(){
|
||||
$('#approveAnrechnungUebersicht-empfehlung-panel').slideUp('slow');
|
||||
|
||||
})
|
||||
|
||||
// Break Ablehnung abgeben
|
||||
$('#approveAnrechnungUebersicht-begruendung-abbrechen').click(function(){
|
||||
$('#approveAnrechnungUebersicht-begruendung').val('');
|
||||
$('#approveAnrechnungUebersicht-begruendung-panel').slideUp('slow');
|
||||
|
||||
})
|
||||
|
||||
// Copy Begruendung into textarea
|
||||
$(".btn-copyIntoTextarea").click(function(){
|
||||
approveAnrechnung.copyIntoTextarea(this);
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
var approveAnrechnung = {
|
||||
@@ -363,5 +420,13 @@ var approveAnrechnung = {
|
||||
default:
|
||||
$('#requestAnrechnung-status_kurzbz').closest('div').addClass('alert-warning');
|
||||
}
|
||||
},
|
||||
copyIntoTextarea: function(elem){
|
||||
|
||||
// Find closest textarea
|
||||
let textarea = $(elem).closest('div').find('textarea');
|
||||
|
||||
// Copy begruendung into textarea
|
||||
textarea.val($.trim($(elem).parent().text()));
|
||||
}
|
||||
}
|
||||
@@ -9068,7 +9068,128 @@ Any unusual occurrences
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'anrechnung',
|
||||
'phrase' => 'genehmigungNegativ',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Antrag wird nicht genehmigt.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => '',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'anrechnung',
|
||||
'phrase' => 'genehmigungenNegativ',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Anträge werden nicht genehmigt.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => '',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'anrechnung',
|
||||
'phrase' => 'genehmigungNegativPruefungNichtMoeglich',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Anrechnung wird nicht genehmigt, weil die Prüfung der Gleichwertigkeit aus formalen Gründen (z.B. mangelhafte Unterlagen) nicht möglich war.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => '',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'anrechnung',
|
||||
'phrase' => 'genehmigungNegativKenntnisseNichtGleichwertig',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Anrechnung wird nicht genehmigt, weil die Kenntnisse inhaltlich und umfangmäßig nicht gleichwertig sind.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => '',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'anrechnung',
|
||||
'phrase' => 'genehmigungenPositiv',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Anrechnungen werden genehmigt, weil die Kenntnisse inhaltlich und umfangmäßig gleichwertig sind.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => '',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'anrechnung',
|
||||
'phrase' => 'genehmigungPositiv',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Anrechnungen wird genehmigt, weil die Kenntnisse inhaltlich und umfangmäßig gleichwertig sind.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => '',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user