mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Refactored Students View + Controller
. Now application is done via AJAX call. . Now messages are returned to user instead of hard exits. . Now formatting status on client side, not on serverside. Signed-off-by: cris-technikum <hainberg@technikum-wien.at>
This commit is contained in:
@@ -86,23 +86,13 @@ class requestAnrechnung extends Auth_Controller
|
||||
show_error(getError($anrechnungData));
|
||||
}
|
||||
|
||||
// Dont show who is progressing the application to the student
|
||||
if ($anrechnungData->status_kurzbz == self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL ||
|
||||
$anrechnungData->status_kurzbz == self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR ||
|
||||
$anrechnungData->status_kurzbz == self::ANRECHNUNGSTATUS_PROGRESSED_BY_KF)
|
||||
{
|
||||
$anrechnungData->status = getUserLanguage() == 'German' ? 'in Bearbeitung' : 'in process';
|
||||
}
|
||||
|
||||
// Get Antrag data
|
||||
$antragData = $this->anrechnunglib->getAntragData($this->_uid, $studiensemester_kurzbz, $lehrveranstaltung_id);
|
||||
|
||||
$viewData = array(
|
||||
'antragData' => $antragData,
|
||||
'anrechnungData' => $anrechnungData,
|
||||
'is_expired' => $is_expired,
|
||||
'disabled' => $is_expired && empty($anrechnungData->anrechnung_id) || !empty($anrechnungData->anrechnung_id)
|
||||
? 'disabled'
|
||||
: ''
|
||||
'is_expired' => $is_expired
|
||||
);
|
||||
|
||||
$this->load->view('lehre/anrechnung/requestAnrechnung.php', $viewData);
|
||||
@@ -127,26 +117,28 @@ class requestAnrechnung extends Auth_Controller
|
||||
{
|
||||
show_error('Missing correct parameter');
|
||||
}
|
||||
|
||||
$student = $this->StudentModel->load(array('student_uid' => $this->_uid));
|
||||
if (isSuccess($student) && hasData($student))
|
||||
|
||||
// Exit if user is not a student
|
||||
$result = $this->StudentModel->load(array('student_uid' => $this->_uid));
|
||||
|
||||
if (!hasData($result))
|
||||
{
|
||||
$prestudent_id = getData($student)[0]->prestudent_id;
|
||||
}
|
||||
else
|
||||
show_error('Cant load User');
|
||||
|
||||
$result = $this->_getAnrechnung($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id);
|
||||
if (hasData($result))
|
||||
{
|
||||
show_error('Der Antrag wurde bereits gestellt');
|
||||
return $this->outputJsonError('Cant load user');
|
||||
}
|
||||
|
||||
// Exit, if application is not for actual studysemester
|
||||
// Get Prestudent ID
|
||||
$prestudent_id = getData($result)[0]->prestudent_id;
|
||||
|
||||
// Exit if application already exists
|
||||
if (self::_applicationExists($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id))
|
||||
{
|
||||
return $this->outputJsonError($this->p->t('anrechnung', 'antragBereitsGestellt'));
|
||||
}
|
||||
|
||||
// Exit if application is not for actual studysemester
|
||||
if (!self::_applicationIsForActualSS($studiensemester_kurzbz))
|
||||
{
|
||||
show_error ($this->p->t('anrechnung', 'antragNurImAktSS'));
|
||||
|
||||
return $this->outputJsonError($this->p->t('anrechnung', 'antragNurImAktSS'));
|
||||
}
|
||||
|
||||
// Start DB transaction
|
||||
@@ -208,7 +200,10 @@ class requestAnrechnung extends Auth_Controller
|
||||
show_error($result->msg, EXIT_ERROR);
|
||||
}
|
||||
|
||||
redirect(site_url(). self::REQUEST_ANRECHNUNG_URI. '?studiensemester='. $studiensemester_kurzbz. '&lv_id='. $lehrveranstaltung_id);
|
||||
// Output to AJAX
|
||||
return $this->outputJsonSuccess(array(
|
||||
'antragdatum' => (new DateTime())->format('d.m.Y')
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -309,7 +304,7 @@ class requestAnrechnung extends Auth_Controller
|
||||
* @param $lehrveranstaltung_id
|
||||
* @return mixed
|
||||
*/
|
||||
private function _getAnrechnung($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id)
|
||||
private function _applicationExists($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id)
|
||||
{
|
||||
$result = $this->AnrechnungModel->loadWhere(array(
|
||||
'lehrveranstaltung_id' => $lehrveranstaltung_id,
|
||||
@@ -321,8 +316,8 @@ class requestAnrechnung extends Auth_Controller
|
||||
{
|
||||
show_error(getError($result));
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
return hasData($result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,6 +4,7 @@ $this->load->view(
|
||||
array(
|
||||
'title' => $this->p->t('anrechnung', 'antragStellen'),
|
||||
'jquery' => true,
|
||||
'jqueryui' => true,
|
||||
'bootstrap' => true,
|
||||
'fontawesome' => true,
|
||||
'ajaxlib' => true,
|
||||
@@ -11,11 +12,15 @@ $this->load->view(
|
||||
'phrases' => array(
|
||||
'global' => array(
|
||||
'anerkennungNachgewiesenerKenntnisse',
|
||||
'antragStellen'
|
||||
'antragStellen',
|
||||
'antragWurdeGestellt',
|
||||
'antragBereitsGestellt'
|
||||
),
|
||||
'ui' => array(
|
||||
'hilfeZuDieserSeite',
|
||||
'hochladen'
|
||||
'hochladen',
|
||||
'inBearbeitung',
|
||||
'neu'
|
||||
),
|
||||
'person' => array(
|
||||
'student',
|
||||
@@ -56,11 +61,6 @@ $this->load->view(
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo form_open_multipart(current_url() . '/apply',
|
||||
['id' => 'requestAnrechnung-form'],
|
||||
['lv_id' => $antragData->lv_id, 'studiensemester' => $antragData->studiensemester_kurzbz]
|
||||
); ?>
|
||||
<div class="row">
|
||||
<div class="col-xs-8">
|
||||
<div class="panel panel-default">
|
||||
@@ -68,149 +68,151 @@ $this->load->view(
|
||||
<!-- Antragsdaten, Dokument Upload, Notiz-->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<!-- Antragsdaten -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<span class="text-uppercase"><b><?php echo $this->p->t('anrechnung', 'antrag'); ?></b></span> 
|
||||
<span class="requestAnrechnung-anrechnungInfoTooltip" data-toggle="tooltip" data-placement="right"
|
||||
title="<?php echo $this->p->t('anrechnung', 'anrechnungInfoTooltipText'); ?>">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="pull-right"><?php echo $this->p->t('anrechnung', 'antragdatum'); ?>: <span
|
||||
id="requestAnrechnung-status"><?php echo !empty($anrechnungData->anrechnung_id) ? $anrechnungData->insertamum : '-' ?></span></span>
|
||||
</div>
|
||||
<table class="panel-body table table-bordered table-condensed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php echo ucfirst($this->p->t('person', 'student')); ?></td>
|
||||
<td><?php echo $antragData->vorname . ' ' . $antragData->nachname; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $this->p->t('person', 'personenkennzeichen'); ?></td>
|
||||
<td><?php echo $antragData->matrikelnr ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo ucfirst($this->p->t('lehre', 'studiensemester')); ?></td>
|
||||
<td><?php echo $antragData->studiensemester_kurzbz ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo ucfirst($this->p->t('lehre', 'studiengang')); ?></td>
|
||||
<td><?php echo $antragData->stg_bezeichnung ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $this->p->t('lehre', 'lehrveranstaltung'); ?></td>
|
||||
<td><?php echo $antragData->lv_bezeichnung ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $this->p->t('lehre', 'ects'); ?></td>
|
||||
<td><?php echo $antragData->ects ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo ucfirst($this->p->t('lehre', 'lektor')); ?></td>
|
||||
<td>
|
||||
<?php $len = count($antragData->lektoren) - 1 ?>
|
||||
<?php foreach ($antragData->lektoren as $key => $lektor): ?>
|
||||
<?php echo $lektor->vorname . ' ' . $lektor->nachname;
|
||||
echo $key === $len ? '' : ', ' ?>
|
||||
<?php endforeach; ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Antrag mit Checkboxen -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="well" style="border:solid black 3px">
|
||||
<span><?php echo $this->p->t('anrechnung', 'antragStellenText'); ?></span> 
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="radio" name="begruendung" value="1" required
|
||||
<?php echo $anrechnungData->begruendung_id == '1' ? 'checked' : ''; ?>
|
||||
<?php echo $disabled; ?>>
|
||||
<?php echo $this->p->t('anrechnung', 'antragStellenWegenZeugnis'); ?> 
|
||||
<span id="requestAnrechnung-anrechnungGrundZeugnisTooltip" data-toggle="tooltip" data-placement="right"
|
||||
title="<?php echo $this->p->t('anrechnung', 'anrechnungGrundZeugnisTooltipText'); ?>">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="radio" name="begruendung" value="4" required
|
||||
<?php echo $anrechnungData->begruendung_id == '4' ? 'checked' : ''; ?>
|
||||
<?php echo $disabled; ?>>
|
||||
<?php echo $this->p->t('anrechnung', 'antragStellenWegenPraxis'); ?> 
|
||||
<span id="requestAnrechnung-anrechnungGrundBerufTooltip" data-toggle="tooltip" data-placement="right"
|
||||
title="<?php echo $this->p->t('anrechnung', 'anrechnungGrundBerufTooltipText'); ?>">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Dokument Upload-->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<b><?php echo $this->p->t('anrechnung', 'nachweisdokumente'); ?></b> 
|
||||
<span class="requestAnrechnung-anrechnungInfoTooltip" data-toggle="tooltip" data-placement="right"
|
||||
title="<?php echo $this->p->t('anrechnung', 'anrechnungGrundAllgemeinTooltipText'); ?>">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-inline panel-body">
|
||||
<div class="form-group">
|
||||
<input type="file" id="requestAnrechnung-uploadfile"
|
||||
name="uploadfile" accept=".pdf" size="50"
|
||||
required <?php echo $disabled; ?>>
|
||||
<form id="requestAnrechnung-form">
|
||||
<input type="hidden" name="lv_id" value="<?php echo $antragData->lv_id ?>">
|
||||
<input type="hidden" name="studiensemester" value="<?php echo $antragData->studiensemester_kurzbz ?>">
|
||||
<!-- Antragsdaten -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<span class="text-uppercase"><b><?php echo $this->p->t('anrechnung', 'antrag'); ?></b></span> 
|
||||
<span class="requestAnrechnung-anrechnungInfoTooltip" data-toggle="tooltip" data-placement="right"
|
||||
title="<?php echo $this->p->t('anrechnung', 'anrechnungInfoTooltipText'); ?>">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="pull-right"><?php echo $this->p->t('anrechnung', 'antragdatum'); ?>: <span
|
||||
id="requestAnrechnung-antragdatum"><?php echo !empty($anrechnungData->anrechnung_id) ? $anrechnungData->insertamum : '-' ?></span></span>
|
||||
</div>
|
||||
<span id="requestAnrechnung-uploadTooltip" data-toggle="tooltip" data-placement="right"
|
||||
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; ?>
|
||||
<table class="panel-body table table-bordered table-condensed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php echo ucfirst($this->p->t('person', 'student')); ?></td>
|
||||
<td><?php echo $antragData->vorname . ' ' . $antragData->nachname; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $this->p->t('person', 'personenkennzeichen'); ?></td>
|
||||
<td><?php echo $antragData->matrikelnr ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo ucfirst($this->p->t('lehre', 'studiensemester')); ?></td>
|
||||
<td><?php echo $antragData->studiensemester_kurzbz ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo ucfirst($this->p->t('lehre', 'studiengang')); ?></td>
|
||||
<td><?php echo $antragData->stg_bezeichnung ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $this->p->t('lehre', 'lehrveranstaltung'); ?></td>
|
||||
<td><?php echo $antragData->lv_bezeichnung ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $this->p->t('lehre', 'ects'); ?></td>
|
||||
<td><?php echo $antragData->ects ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo ucfirst($this->p->t('lehre', 'lektor')); ?></td>
|
||||
<td>
|
||||
<?php $len = count($antragData->lektoren) - 1 ?>
|
||||
<?php foreach ($antragData->lektoren as $key => $lektor): ?>
|
||||
<?php echo $lektor->vorname . ' ' . $lektor->nachname;
|
||||
echo $key === $len ? '' : ', ' ?>
|
||||
<?php endforeach; ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Notiz -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<b><?php echo $this->p->t('anrechnung', 'herkunftDerKenntnisse'); ?></b> 
|
||||
<span class="requestAnrechnung-anrechnungInfoTooltip" data-toggle="tooltip" data-placement="right"
|
||||
title="<?php echo $this->p->t('anrechnung', 'anrechnungInfoTooltipText'); ?>">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
<!-- Antrag mit Checkboxen -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="well" style="border:solid black 3px">
|
||||
<span><?php echo $this->p->t('anrechnung', 'antragStellenText'); ?></span> 
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="radio" name="begruendung" value="1" required
|
||||
<?php echo $anrechnungData->begruendung_id == '1' ? 'checked' : ''; ?>>
|
||||
<?php echo $this->p->t('anrechnung', 'antragStellenWegenZeugnis'); ?> 
|
||||
<span id="requestAnrechnung-anrechnungGrundZeugnisTooltip" data-toggle="tooltip" data-placement="right"
|
||||
title="<?php echo $this->p->t('anrechnung', 'anrechnungGrundZeugnisTooltipText'); ?>">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="radio" name="begruendung" value="4" required
|
||||
<?php echo $anrechnungData->begruendung_id == '4' ? 'checked' : ''; ?>>
|
||||
<?php echo $this->p->t('anrechnung', 'antragStellenWegenPraxis'); ?> 
|
||||
<span id="requestAnrechnung-anrechnungGrundBerufTooltip" data-toggle="tooltip" data-placement="right"
|
||||
title="<?php echo $this->p->t('anrechnung', 'anrechnungGrundBerufTooltipText'); ?>">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Dokument Upload-->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<b><?php echo $this->p->t('anrechnung', 'nachweisdokumente'); ?></b> 
|
||||
<span class="requestAnrechnung-anrechnungInfoTooltip" data-toggle="tooltip" data-placement="right"
|
||||
title="<?php echo $this->p->t('anrechnung', 'anrechnungGrundAllgemeinTooltipText'); ?>">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-inline panel-body">
|
||||
<div class="form-group">
|
||||
<input type="file" id="requestAnrechnung-uploadfile"
|
||||
name="uploadfile" accept=".pdf" size="50"
|
||||
required>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<textarea class="form-control" name="anmerkung" rows="2"
|
||||
required <?php echo $disabled; ?>><?php echo $anrechnungData->anmerkung; ?></textarea>
|
||||
<span id="requestAnrechnung-uploadTooltip" data-toggle="tooltip" data-placement="right"
|
||||
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; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Notiz -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<b><?php echo $this->p->t('anrechnung', 'herkunftDerKenntnisse'); ?></b> 
|
||||
<span class="requestAnrechnung-anrechnungInfoTooltip" data-toggle="tooltip" data-placement="right"
|
||||
title="<?php echo $this->p->t('anrechnung', 'anrechnungInfoTooltipText'); ?>">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<textarea class="form-control" name="anmerkung" rows="2"
|
||||
required><?php echo $anrechnungData->anmerkung; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Submit button 'Anrechnung beantragen'-->
|
||||
<div class="pull-right">
|
||||
<input type="submit" id="requestAnrechnung-submit" class="btn btn-primary"
|
||||
value="<?php echo $this->p->t('anrechnung', 'anrechnungBeantragen'); ?>" <?php echo $disabled; ?>>
|
||||
</div>
|
||||
<!-- Submit button 'Anrechnung beantragen'-->
|
||||
<div class="pull-right">
|
||||
<input type="submit" id="requestAnrechnung-apply-anrechnung" class="btn btn-primary"
|
||||
value="<?php echo $this->p->t('anrechnung', 'anrechnungBeantragen'); ?>">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -234,7 +236,6 @@ $this->load->view(
|
||||
<?php $this->load->view('lehre/anrechnung/requestAnrechnungImportant'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo form_close(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -5,10 +5,46 @@ $(function(){
|
||||
// Set status alert color
|
||||
requestAnrechnung.setStatusAlertColor();
|
||||
|
||||
// Disable Form fields if Anrechnung was already applied
|
||||
requestAnrechnung.disableFormFieldsIfAntragIsApplied();
|
||||
|
||||
// Init tooltips
|
||||
requestAnrechnung.initTooltips();
|
||||
|
||||
$('#requestAnrechnung-apply-anrechnung').click(function(e){
|
||||
|
||||
// Avoid form redirecting automatically
|
||||
e.preventDefault();
|
||||
|
||||
// Get form data
|
||||
let formdata = new FormData($('#requestAnrechnung-form')[0]);
|
||||
|
||||
$.ajax({
|
||||
url : "RequestAnrechnung/apply",
|
||||
type: "POST",
|
||||
data : formdata,
|
||||
processData: false, // needed to pass uploaded file with FormData
|
||||
contentType: false, // needed to pass uploaded file with FormData
|
||||
success:function(data, textStatus, jqXHR){
|
||||
if (data.error && data.retval != null)
|
||||
{
|
||||
FHC_DialogLib.alertWarning(data.retval);
|
||||
}
|
||||
|
||||
if (!data.error && data.retval != null)
|
||||
{
|
||||
requestAnrechnung.formatAnrechnungIsApplied(
|
||||
data.retval.antragdatum
|
||||
);
|
||||
|
||||
FHC_DialogLib.alertSuccess(FHC_PhrasesLib.t("global", "antragWurdeGestellt"));
|
||||
}
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown){
|
||||
FHC_DialogLib.alertWarning(FHC_PhrasesLib.t("ui", "systemfehler"));
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
var requestAnrechnung = {
|
||||
@@ -24,9 +60,20 @@ var requestAnrechnung = {
|
||||
break;
|
||||
case '':
|
||||
$('#requestAnrechnung-status_kurzbz').closest('div').addClass('alert-info');
|
||||
$('#requestAnrechnung-status_kurzbz').text(FHC_PhrasesLib.t("ui", "neu"));
|
||||
break;
|
||||
default:
|
||||
$('#requestAnrechnung-status_kurzbz').closest('div').addClass('alert-warning');
|
||||
$('#requestAnrechnung-status_kurzbz').text(FHC_PhrasesLib.t("ui", "inBearbeitung"));
|
||||
}
|
||||
},
|
||||
disableFormFieldsIfAntragIsApplied: function(){
|
||||
let status_kurzbz = $('#requestAnrechnung-status_kurzbz').data('status_kurzbz');
|
||||
|
||||
if (status_kurzbz != '')
|
||||
{
|
||||
// Disable all form elements
|
||||
$("#requestAnrechnung-form :input").prop("disabled", true);
|
||||
}
|
||||
},
|
||||
initTooltips: function (){
|
||||
@@ -35,5 +82,13 @@ var requestAnrechnung = {
|
||||
html: true
|
||||
}
|
||||
);
|
||||
},
|
||||
formatAnrechnungIsApplied: function (antragdatum){
|
||||
$('#requestAnrechnung-antragdatum').text(antragdatum);
|
||||
$('#requestAnrechnung-status_kurzbz').text(FHC_PhrasesLib.t("ui", "inBearbeitung"));
|
||||
$('#requestAnrechnung-status_kurzbz').closest('div').addClass('alert-warning');
|
||||
|
||||
// Disable all form elements
|
||||
$("#requestAnrechnung-form :input").prop("disabled", true);
|
||||
}
|
||||
}
|
||||
@@ -10350,7 +10350,87 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'neu',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Neu",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "New",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'inBearbeitung',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "in Bearbeitung",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "in process",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'global',
|
||||
'phrase' => 'antragWurdeGestellt',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Antrag wurde gestellt.",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "Application was submitted successfully.",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'global',
|
||||
'phrase' => 'antragBereitsGestellt',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Der Antrag wurde bereits gestellt.",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "Application has already been submitted.",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user