mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
UHSTAT 1 form: correct authentification (from bewerbungstool or with permission), beautified success and error messages, added Rechtsbelehrung, simplified parameter checking
This commit is contained in:
@@ -4,6 +4,8 @@ if (! defined("BASEPATH")) exit("No direct script access allowed");
|
||||
|
||||
class UHSTAT1 extends FHC_Controller
|
||||
{
|
||||
const BERECHTIGUNG_UHSTAT_VERWALTEN = 'student/uhstat1daten_verwalten';
|
||||
const PERSON_ID_SESSION_INDEX = 'bewerbung/personId';
|
||||
const CODEX_OESTERREICH = 'A';
|
||||
const LOWER_BOUNDARY_YEARS = 160;
|
||||
const UPPER_BOUNDARY_YEARS = 20;
|
||||
@@ -12,12 +14,7 @@ class UHSTAT1 extends FHC_Controller
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(
|
||||
array(
|
||||
'index' => 'admin:r',
|
||||
'saveUHSTAT1Data' => 'admin:rw'
|
||||
)
|
||||
);
|
||||
parent::__construct();
|
||||
|
||||
// load ci libs
|
||||
$this->load->library('form_validation');
|
||||
@@ -25,6 +22,10 @@ class UHSTAT1 extends FHC_Controller
|
||||
// load ci helpers
|
||||
$this->load->helper(array('form', 'url'));
|
||||
|
||||
// load libraries
|
||||
$this->load->library('AuthLib');
|
||||
$this->load->library('PermissionLib');
|
||||
|
||||
// load models
|
||||
$this->load->model('codex/Oehbeitrag_model', 'OehbeitragModel');
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
@@ -93,9 +94,7 @@ class UHSTAT1 extends FHC_Controller
|
||||
*/
|
||||
public function saveUHSTAT1Data()
|
||||
{
|
||||
$person_id = $this->input->get('person_id');
|
||||
|
||||
if (!isset($person_id) || !is_numeric($person_id)) show_error("Person Id missing");
|
||||
$person_id = $this->_getValidPersonId();
|
||||
|
||||
$this->form_validation->set_error_delimiters('<span class="text-danger">', '</span>');
|
||||
|
||||
@@ -133,8 +132,10 @@ class UHSTAT1 extends FHC_Controller
|
||||
$uhstatData[$field] = $this->input->post($field);
|
||||
}
|
||||
|
||||
// check if entry already exists
|
||||
$uhstat1datenloadRes = $this->Uhstat1datenModel->loadWhere(array('person_id' => $person_id));
|
||||
|
||||
// if yes, update
|
||||
if (hasData($uhstat1datenloadRes))
|
||||
{
|
||||
$uhstat1datenRes = $this->Uhstat1datenModel->update(
|
||||
@@ -142,7 +143,7 @@ class UHSTAT1 extends FHC_Controller
|
||||
$uhstatData
|
||||
);
|
||||
}
|
||||
else
|
||||
else // otherwise insert
|
||||
{
|
||||
$uhstat1datenRes = $this->Uhstat1datenModel->insert(
|
||||
array_merge($uhstatData, array('person_id' => $person_id))
|
||||
@@ -210,9 +211,7 @@ class UHSTAT1 extends FHC_Controller
|
||||
*/
|
||||
private function _getFormMetaData()
|
||||
{
|
||||
$person_id = $this->input->get('person_id');
|
||||
|
||||
if (!isset($person_id) || !is_numeric($person_id)) return error("Person Id missing");
|
||||
$person_id = $this->_getValidPersonId();
|
||||
|
||||
$languageIdx = $this->_getLanguageIndex();
|
||||
|
||||
@@ -272,9 +271,7 @@ class UHSTAT1 extends FHC_Controller
|
||||
*/
|
||||
private function _getUHSTAT1Data()
|
||||
{
|
||||
$person_id = $this->input->get('person_id');
|
||||
|
||||
if (!isset($person_id) || !is_numeric($person_id)) return error("Person Id missing");
|
||||
$person_id = $this->_getValidPersonId();
|
||||
|
||||
$this->Uhstat1datenModel->addSelect(
|
||||
implode(', ', array_keys($this->_uhstat1Fields))
|
||||
@@ -303,4 +300,27 @@ class UHSTAT1 extends FHC_Controller
|
||||
|
||||
return $idx;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Id of person having permissions to manage UHSTAT1 data.
|
||||
* Can be passed as parameter or be in session.
|
||||
* @return int person_id
|
||||
*/
|
||||
private function _getValidPersonId()
|
||||
{
|
||||
// if coming from bewerbungstool - person id is in session (person must be logged in bewerbungstool)
|
||||
if (isset($_SESSION[self::PERSON_ID_SESSION_INDEX]) && is_numeric($_SESSION[self::PERSON_ID_SESSION_INDEX]))
|
||||
return $_SESSION[self::PERSON_ID_SESSION_INDEX];
|
||||
|
||||
// if person id passed directly...
|
||||
$person_id = $this->input->post('person_id');
|
||||
if (!isset($person_id)) $person_id = $this->input->get('person_id');
|
||||
|
||||
if (!isset($person_id) || !is_numeric($person_id)) show_error("invalid person id");
|
||||
|
||||
// ...check if there is a permission for editing UHSTAT1 data
|
||||
if ($this->permissionlib->isBerechtigt(self::BERECHTIGUNG_UHSTAT_VERWALTEN, 'suid')) return $person_id;
|
||||
|
||||
show_error("No permission for managing UHSTAT");
|
||||
}
|
||||
}
|
||||
|
||||
+213
-206
@@ -6,15 +6,17 @@ $this->load->view(
|
||||
'jquery3' => true,
|
||||
'bootstrap3' => true,
|
||||
'fontawesome4' => true,
|
||||
'dialoglib' => true,
|
||||
'phrases' => array(
|
||||
'ui' => array('speichern')
|
||||
)
|
||||
),
|
||||
'customCSSs' => array('public/css/codex/uhstat1.css'),
|
||||
'customJSs' => array('public/js/codex/uhstat1.js')
|
||||
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?php
|
||||
// init data
|
||||
// initialise form fields
|
||||
$mutter_geburtsjahr = isset($uhstatData->mutter_geburtsjahr) ? $uhstatData->mutter_geburtsjahr : set_value('mutter_geburtsjahr');
|
||||
$mutter_geburtsstaat = isset($uhstatData->mutter_geburtsstaat) ? $uhstatData->mutter_geburtsstaat : set_value('mutter_geburtsstaat');
|
||||
$mutter_bildungsstaat = isset($uhstatData->mutter_bildungsstaat) ? $uhstatData->mutter_bildungsstaat : set_value('mutter_bildungsstaat');
|
||||
@@ -25,219 +27,224 @@ $vater_bildungsstaat = isset($uhstatData->vater_bildungsstaat) ? $uhstatData->va
|
||||
$vater_bildungmax = isset($uhstatData->vater_bildungmax) ? $uhstatData->vater_bildungmax : set_value('vater_bildungmax');
|
||||
$disabled = $readonly === true ? ' disabled' : '';
|
||||
?>
|
||||
<div class="container">
|
||||
<div class="tab-content">
|
||||
<h3>
|
||||
<?php echo $this->p->t('uhstat', 'uhstat1AnmeldungUeberschrift') ?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php echo $this->p->t('uhstat', 'uhstat1AnmeldungEinleitungstext') ?>
|
||||
</p>
|
||||
<br>
|
||||
<form class="form-horizontal" method="POST" action="<?php echo site_url('codex/UHSTAT1/saveUHSTAT1Data').'?person_id='.$formMetaData['person_id'] ?>">
|
||||
<fieldset>
|
||||
<legend><?php echo $this->p->t('uhstat', 'angabenErziehungsberechtigte') ?></legend>
|
||||
<p>
|
||||
<?php echo $this->p->t('uhstat', 'angabenErziehungsberechtigteEinleitungstext') ?>
|
||||
</p>
|
||||
<br>
|
||||
<h4><?php echo $this->p->t('uhstat', 'erziehungsberechtigtePersonEins') ?></h4>
|
||||
<div class="form-group">
|
||||
<label for="mutter_geburtsjahr" class="col-sm-3 control-label"><?php echo ucfirst($this->p->t('uhstat', 'geburtsjahr')) ?></label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="mutter_geburtsjahr" id="mutter_geburtsjahr" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<?php foreach ($formMetaData['jahre'] as $jahr): ?>
|
||||
<option
|
||||
value="<?php echo $jahr ?>"
|
||||
<?php echo $jahr == $mutter_geburtsjahr ? " selected" : "" ?>>
|
||||
|
||||
<input type='hidden' id='uhstat1Saved' value='<?php echo isset($readonly) && $readonly == true ? 1 : 0 ?>' />
|
||||
<div class='container' id='uhstat1Container'>
|
||||
<h2><?php echo $this->p->t('uhstat', 'uhstat1AnmeldungUeberschrift') ?></h2>
|
||||
<p>
|
||||
<?php echo $this->p->t('uhstat', 'rechtsbelehrung') ?>
|
||||
</p>
|
||||
<p>
|
||||
<?php echo $this->p->t('uhstat', 'uhstat1AnmeldungEinleitungstext') ?>
|
||||
</p>
|
||||
<br>
|
||||
<form class="form-horizontal" method="POST" action="<?php echo site_url('codex/UHSTAT1/saveUHSTAT1Data') ?>" id="uhstat1Form">
|
||||
<input type='hidden' id='person_id' name='person_id' value='<?php echo $formMetaData['person_id'] ?>' />
|
||||
<fieldset>
|
||||
<legend><?php echo $this->p->t('uhstat', 'angabenErziehungsberechtigte') ?></legend>
|
||||
<p>
|
||||
<?php echo $this->p->t('uhstat', 'angabenErziehungsberechtigteEinleitungstext') ?>
|
||||
</p>
|
||||
<br>
|
||||
<h4><?php echo $this->p->t('uhstat', 'erziehungsberechtigtePersonEins') ?></h4>
|
||||
<div class="form-group">
|
||||
<label for="mutter_geburtsjahr" class="col-sm-3 control-label"><?php echo ucfirst($this->p->t('uhstat', 'geburtsjahr')) ?></label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="mutter_geburtsjahr" id="mutter_geburtsjahr" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<?php foreach ($formMetaData['jahre'] as $jahr): ?>
|
||||
<option
|
||||
value="<?php echo $jahr ?>"
|
||||
<?php echo $jahr == $mutter_geburtsjahr ? " selected" : "" ?>>
|
||||
<?php echo $jahr ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php echo form_error('mutter_geburtsjahr'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mutter_geburtsstaat" class="col-sm-3 control-label">
|
||||
<?php echo ucfirst($this->p->t('uhstat', 'geburtsstaat')) ?>
|
||||
<br>
|
||||
<?php echo '('.ucfirst($this->p->t('uhstat', 'inDenHeutigenGrenzen')).')' ?>
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="mutter_geburtsstaat" id="mutter_geburtsstaat" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<?php foreach ($formMetaData['nation'] as $nation): ?>
|
||||
<option
|
||||
value="<?php echo $nation->nation_code ?>"
|
||||
<?php echo $mutter_geburtsstaat == $nation->nation_code ? " selected" : "" ?>>
|
||||
<?php echo $nation->nation_text ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php echo form_error('mutter_geburtsstaat'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mutter_bildungsstaat" class="col-sm-3 control-label">
|
||||
<?php echo ucfirst($this->p->t('uhstat', 'hoechsterAbschlussStaat')) ?>
|
||||
<br>
|
||||
<?php echo '('.ucfirst($this->p->t('uhstat', 'inDenHeutigenGrenzen')).')' ?>
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="mutter_bildungsstaat" id="mutter_bildungsstaat" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<?php foreach ($formMetaData['nation'] as $nation): ?>
|
||||
<option
|
||||
value="<?php echo $nation->nation_code ?>"
|
||||
<?php echo $mutter_bildungsstaat == $nation->nation_code ? " selected" : "" ?>>
|
||||
<?php echo $nation->nation_text ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php echo form_error('mutter_bildungsstaat'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mutter_bildungmax" class="col-sm-3 control-label"><?php echo ucfirst($this->p->t('uhstat', 'hoechsterAbschluss')) ?></label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="mutter_bildungmax" id="mutter_bildungmax" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<optgroup label="<?php echo $this->p->t('uhstat', 'wennAbschlussInOesterreich') ?>">
|
||||
<?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?>
|
||||
<?php foreach ($formMetaData['abschluss_oesterreich'] as $abschluss): ?>
|
||||
<option
|
||||
value="<?php echo $abschluss->ausbildung_code ?>"
|
||||
<?php echo $mutter_bildungmax == $abschluss->ausbildung_code ? " selected" : "" ?>>
|
||||
<?php echo $abschluss->bezeichnung ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</optgroup>
|
||||
<optgroup label="<?php echo $this->p->t('uhstat', 'wennAbschlussNichtInOesterreich') ?>">
|
||||
<?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?>
|
||||
<?php foreach ($formMetaData['abschluss_nicht_oesterreich'] as $abschluss): ?>
|
||||
<option
|
||||
value="<?php echo $abschluss->ausbildung_code ?>"
|
||||
<?php echo $mutter_bildungmax == $abschluss->ausbildung_code ? " selected" : "" ?>>
|
||||
<?php echo $abschluss->bezeichnung ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</optgroup>
|
||||
</select>
|
||||
<?php echo form_error('mutter_bildungmax'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<h4><?php echo $this->p->t('uhstat', 'erziehungsberechtigtePersonZwei') ?></h4>
|
||||
<div class="form-group">
|
||||
<label for="vater_geburtsjahr" class="col-sm-3 control-label"><?php echo ucfirst($this->p->t('uhstat', 'geburtsjahr')) ?></label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="vater_geburtsjahr" id="vater_geburtsjahr" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<?php foreach ($formMetaData['jahre'] as $jahr): ?>
|
||||
<option
|
||||
value="<?php echo $jahr ?>"
|
||||
<?php echo $vater_geburtsjahr == $jahr ? " selected" : "" ?>>
|
||||
<?php echo $jahr ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php echo form_error('mutter_geburtsjahr'); ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php echo form_error('vater_geburtsjahr'); ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mutter_geburtsstaat" class="col-sm-3 control-label">
|
||||
<?php echo ucfirst($this->p->t('uhstat', 'geburtsstaat')) ?>
|
||||
<br>
|
||||
<?php echo '('.ucfirst($this->p->t('uhstat', 'inDenHeutigenGrenzen')).')' ?>
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="mutter_geburtsstaat" id="mutter_geburtsstaat" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<?php foreach ($formMetaData['nation'] as $nation): ?>
|
||||
<option
|
||||
value="<?php echo $nation->nation_code ?>"
|
||||
<?php echo $mutter_geburtsstaat == $nation->nation_code ? " selected" : "" ?>>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="vater_geburtsstaat" class="col-sm-3 control-label">
|
||||
<?php echo ucfirst($this->p->t('uhstat', 'geburtsstaat')) ?>
|
||||
<br>
|
||||
<?php echo '('.ucfirst($this->p->t('uhstat', 'inDenHeutigenGrenzen')).')' ?>
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="vater_geburtsstaat" id="vater_geburtsstaat" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<?php foreach ($formMetaData['nation'] as $nation): ?>
|
||||
<option
|
||||
value="<?php echo $nation->nation_code ?>"
|
||||
<?php echo $vater_geburtsstaat == $nation->nation_code ? " selected" : "" ?>>
|
||||
<?php echo $nation->nation_text ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php echo form_error('mutter_geburtsstaat'); ?>
|
||||
</div>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php echo form_error('vater_geburtsstaat'); ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mutter_bildungsstaat" class="col-sm-3 control-label">
|
||||
<?php echo ucfirst($this->p->t('uhstat', 'hoechsterAbschlussStaat')) ?>
|
||||
<br>
|
||||
<?php echo '('.ucfirst($this->p->t('uhstat', 'inDenHeutigenGrenzen')).')' ?>
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="mutter_bildungsstaat" id="mutter_bildungsstaat" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<?php foreach ($formMetaData['nation'] as $nation): ?>
|
||||
<option
|
||||
value="<?php echo $nation->nation_code ?>"
|
||||
<?php echo $mutter_bildungsstaat == $nation->nation_code ? " selected" : "" ?>>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="vater_bildungsstaat" class="col-sm-3 control-label">
|
||||
<?php echo $this->p->t('uhstat', 'hoechsterAbschlussStaat') ?>
|
||||
<br>
|
||||
<?php echo '('.ucfirst($this->p->t('uhstat', 'inDenHeutigenGrenzen')).')' ?>
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="vater_bildungsstaat" id="vater_bildungsstaat" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<?php foreach ($formMetaData['nation'] as $nation): ?>
|
||||
<option
|
||||
value="<?php echo $nation->nation_code ?>"
|
||||
<?php echo $vater_bildungsstaat == $nation->nation_code ? " selected" : "" ?>>
|
||||
<?php echo $nation->nation_text ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php echo form_error('mutter_bildungsstaat'); ?>
|
||||
</div>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php echo form_error('vater_bildungsstaat'); ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mutter_bildungmax" class="col-sm-3 control-label"><?php echo ucfirst($this->p->t('uhstat', 'hoechsterAbschluss')) ?></label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="mutter_bildungmax" id="mutter_bildungmax" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<optgroup label="<?php echo $this->p->t('uhstat', 'wennAbschlussInOesterreich') ?>">
|
||||
<?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?>
|
||||
</optgroup>
|
||||
<?php foreach ($formMetaData['abschluss_oesterreich'] as $abschluss): ?>
|
||||
<option
|
||||
value="<?php echo $abschluss->ausbildung_code ?>"
|
||||
<?php echo $mutter_bildungmax == $abschluss->ausbildung_code ? " selected" : "" ?>>
|
||||
<?php echo $abschluss->bezeichnung ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<optgroup label="<?php echo $this->p->t('uhstat', 'wennAbschlussNichtInOesterreich') ?>">
|
||||
<?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?>
|
||||
</optgroup>
|
||||
<?php foreach ($formMetaData['abschluss_nicht_oesterreich'] as $abschluss): ?>
|
||||
<option
|
||||
value="<?php echo $abschluss->ausbildung_code ?>"
|
||||
<?php echo $mutter_bildungmax == $abschluss->ausbildung_code ? " selected" : "" ?>>
|
||||
<?php echo $abschluss->bezeichnung ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php echo form_error('mutter_bildungmax'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="vater_bildungmax" class="col-sm-3 control-label">
|
||||
<?php echo ucfirst($this->p->t('uhstat', 'hoechsterAbschluss')) ?>
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="vater_bildungmax" id="vater_bildungmax" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<optgroup label="<?php echo $this->p->t('uhstat', 'wennAbschlussInOesterreich') ?>">
|
||||
<?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?>
|
||||
<?php foreach ($formMetaData['abschluss_oesterreich'] as $abschluss): ?>
|
||||
<option
|
||||
value="<?php echo $abschluss->ausbildung_code ?>"
|
||||
<?php echo $vater_bildungmax == $abschluss->ausbildung_code ? " selected" : "" ?>>
|
||||
<?php echo $abschluss->bezeichnung ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</optgroup>
|
||||
<optgroup label="<?php echo $this->p->t('uhstat', 'wennAbschlussNichtInOesterreich') ?>">
|
||||
<?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?>
|
||||
<?php foreach ($formMetaData['abschluss_nicht_oesterreich'] as $abschluss): ?>
|
||||
<option
|
||||
value="<?php echo $abschluss->ausbildung_code ?>"
|
||||
<?php echo $vater_bildungmax == $abschluss->ausbildung_code ? " selected" : "" ?>>
|
||||
<?php echo $abschluss->bezeichnung ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</optgroup>
|
||||
</select>
|
||||
<?php echo form_error('vater_bildungmax'); ?>
|
||||
</div>
|
||||
<br>
|
||||
<h4><?php echo $this->p->t('uhstat', 'erziehungsberechtigtePersonZwei') ?></h4>
|
||||
<div class="form-group">
|
||||
<label for="vater_geburtsjahr" class="col-sm-3 control-label"><?php echo ucfirst($this->p->t('uhstat', 'geburtsjahr')) ?></label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="vater_geburtsjahr" id="vater_geburtsjahr" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<?php foreach ($formMetaData['jahre'] as $jahr): ?>
|
||||
<option
|
||||
value="<?php echo $jahr ?>"
|
||||
<?php echo $vater_geburtsjahr == $jahr ? " selected" : "" ?>>
|
||||
<?php echo $jahr ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php echo form_error('vater_geburtsjahr'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<br>
|
||||
<fieldset>
|
||||
<?php if (isset($successMessage) && !isEmptyString($successMessage)): ?>
|
||||
<div class="alert alert-success" id="success-alert_uhstat1">
|
||||
<button type="button" class="close" data-dismiss="alert">x</button>
|
||||
<strong><?php echo $successMessage ?></strong>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="vater_geburtsstaat" class="col-sm-3 control-label">
|
||||
<?php echo ucfirst($this->p->t('uhstat', 'geburtsstaat')) ?>
|
||||
<br>
|
||||
<?php echo '('.ucfirst($this->p->t('uhstat', 'inDenHeutigenGrenzen')).')' ?>
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="vater_geburtsstaat" id="vater_geburtsstaat" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<?php foreach ($formMetaData['nation'] as $nation): ?>
|
||||
<option
|
||||
value="<?php echo $nation->nation_code ?>"
|
||||
<?php echo $vater_geburtsstaat == $nation->nation_code ? " selected" : "" ?>>
|
||||
<?php echo $nation->nation_text ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php echo form_error('vater_geburtsstaat'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($errorMessage) && !isEmptyString($errorMessage)): ?>
|
||||
<div class='alert alert-danger text-center'><?php echo $errorMessage ?></div>
|
||||
<?php endif; ?>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 text-right">
|
||||
<?php if (!$readonly): ?>
|
||||
|
||||
<button class="btn btn-success btn-md" type="submit" id="uhstat1Submit">
|
||||
<?php echo $this->p->t('uhstat', 'pruefenUndSpeichern') ?>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="vater_bildungsstaat" class="col-sm-3 control-label">
|
||||
<?php echo $this->p->t('uhstat', 'hoechsterAbschlussStaat') ?>
|
||||
<br>
|
||||
<?php echo '('.ucfirst($this->p->t('uhstat', 'inDenHeutigenGrenzen')).')' ?>
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="vater_bildungsstaat" id="vater_bildungsstaat" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<?php foreach ($formMetaData['nation'] as $nation): ?>
|
||||
<option
|
||||
value="<?php echo $nation->nation_code ?>"
|
||||
<?php echo $vater_bildungsstaat == $nation->nation_code ? " selected" : "" ?>>
|
||||
<?php echo $nation->nation_text ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php echo form_error('vater_bildungsstaat'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="vater_bildungmax" class="col-sm-3 control-label">
|
||||
<?php echo ucfirst($this->p->t('uhstat', 'hoechsterAbschluss')) ?>
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="vater_bildungmax" id="vater_bildungmax" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<optgroup label="<?php echo $this->p->t('uhstat', 'wennAbschlussInOesterreich') ?>">
|
||||
<?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?>
|
||||
</optgroup>
|
||||
<?php foreach ($formMetaData['abschluss_oesterreich'] as $abschluss): ?>
|
||||
<option
|
||||
value="<?php echo $abschluss->ausbildung_code ?>"
|
||||
<?php echo $vater_bildungmax == $abschluss->ausbildung_code ? " selected" : "" ?>>
|
||||
<?php echo $abschluss->bezeichnung ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<optgroup label="<?php echo $this->p->t('uhstat', 'wennAbschlussNichtInOesterreich') ?>">
|
||||
<?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?>
|
||||
</optgroup>
|
||||
<?php foreach ($formMetaData['abschluss_nicht_oesterreich'] as $abschluss): ?>
|
||||
<option
|
||||
value="<?php echo $abschluss->ausbildung_code ?>"
|
||||
<?php echo $vater_bildungmax == $abschluss->ausbildung_code ? " selected" : "" ?>>
|
||||
<?php echo $abschluss->bezeichnung ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php echo form_error('vater_bildungmax'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<br>
|
||||
<fieldset>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 text-right">
|
||||
<?php if (isset($successMessage) && !isEmptyString($successMessage)): ?>
|
||||
<div class='alert alert-success text-center' role='alert'><?php echo $successMessage ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($errorMessage) && !isEmptyString($errorMessage)): ?>
|
||||
<div class='alert alert-danger text-center'><?php echo $errorMessage ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if (!$readonly): ?>
|
||||
|
||||
<button class="btn btn-success btn-md" type="submit">
|
||||
<?php echo $this->p->t('uhstat', 'pruefenUndSpeichern') ?>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('templates/FHC-Footer'); ?>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
/* for removing horizontal scrollbar when form is embedded as i frame */
|
||||
#uhstat1Container {
|
||||
overflow-x:hidden;
|
||||
height: 100%;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* javascript file for UHSTAT1 GUI
|
||||
*/
|
||||
$(document).ready(function ()
|
||||
{
|
||||
window.setTimeout(function() {
|
||||
$("#success-alert_uhstat1").fadeTo(500, 0).slideUp(500, function(){
|
||||
$(this).remove();
|
||||
});
|
||||
}, 1000);
|
||||
});
|
||||
+14
@@ -120,3 +120,17 @@ if (!$result = @$db->db_query('SELECT 1 FROM bis.tbl_uhstat1daten LIMIT 1'))
|
||||
else
|
||||
echo ' bis.tbl_uhstat1daten: Tabelle hinzugefuegt<br>';
|
||||
}
|
||||
|
||||
// Add permission for managing UHSTAT1 data
|
||||
if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berechtigung_kurzbz = 'student/uhstat1daten_verwalten';"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung) VALUES('student/uhstat1daten_verwalten', 'UHSTAT1 Daten verwalten');";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>system.tbl_berechtigung '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo ' system.tbl_berechtigung: Added permission for student/uhstat1daten_verwalten<br>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18223,6 +18223,26 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'uhstat',
|
||||
'phrase' => 'rechtsbelehrung',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'gemäß § 18 Absätzen 6 und 7 Bildungsdokumentationsgesetz 2020, BGBl. I Nr. 20/2021, in der gültigen Fassung, sowie § 141 Absatz 3 Universitätsgesetz 2002, BGBl. I Nr. 120/2002, in der gültigen Fassung.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'according to section 18 subsections 6 and 7 of the Bildungsdokumentationsgesetz 2020, Federal Law Gazette I No. 20/2021, in the current version, and section 141 subsection 3 of the Universitätsgesetz 2002, Federal Law Gazette I No. 120/2002, in the current version.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'uhstat',
|
||||
|
||||
Reference in New Issue
Block a user