mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
- rueckstelldatum default zwei wochen
This commit is contained in:
@@ -104,26 +104,7 @@ class Rueckstellung extends Auth_Controller
|
||||
|
||||
$this->outputJsonSuccess(getData($result));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the End date of the current Studienjahr
|
||||
*/
|
||||
public function getStudienjahrEnd()
|
||||
{
|
||||
$this->load->model('organisation/studienjahr_model', 'StudienjahrModel');
|
||||
|
||||
$result = $this->_ci->StudienjahrModel->getCurrStudienjahr();
|
||||
|
||||
$json = null;
|
||||
|
||||
if (hasData($result))
|
||||
{
|
||||
$json = $result->retval[0]->ende;
|
||||
}
|
||||
|
||||
$this->outputJsonSuccess(array($json));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve the UID of the logged user and checks if it is valid
|
||||
*/
|
||||
|
||||
@@ -111,33 +111,6 @@ var Rueckstellung = {
|
||||
}
|
||||
);
|
||||
},
|
||||
getStudienjahrEnd: function()
|
||||
{
|
||||
FHC_AjaxClient.ajaxCallGet(
|
||||
CONTROLLER_RUECKSTELLUNG_URL + "/getStudienjahrEnd",
|
||||
null,
|
||||
{
|
||||
successCallback: function(data, textStatus, jqXHR) {
|
||||
if (FHC_AjaxClient.hasData(data))
|
||||
{
|
||||
var engdate = $.datepicker.parseDate("yy-mm-dd", FHC_AjaxClient.getData(data)[0]);
|
||||
|
||||
if (engdate.getDate() === 31)
|
||||
engdate.setDate(engdate.getDate() - 1);
|
||||
engdate.setMonth(engdate.getMonth() + 3);
|
||||
|
||||
var gerdate = $.datepicker.formatDate("dd.mm.yy", engdate);
|
||||
$("#rueckstellungdate").val(gerdate);
|
||||
}
|
||||
},
|
||||
errorCallback: function()
|
||||
{
|
||||
FHC_DialogLib.alertError("error when getting Studienjahr end");
|
||||
},
|
||||
veilTimeout: 0
|
||||
}
|
||||
);
|
||||
},
|
||||
_refreshRueckstellung: function(rueckstellungobj)
|
||||
{
|
||||
var personid = $("#hiddenpersonid").val();
|
||||
@@ -189,7 +162,10 @@ var Rueckstellung = {
|
||||
'</div>');
|
||||
|
||||
Rueckstellung.getStatus();
|
||||
Rueckstellung.getStudienjahrEnd();
|
||||
|
||||
var rueckstelldate = new Date();
|
||||
rueckstelldate.setDate(rueckstelldate.getDate() + 14);
|
||||
$('#rueckstellungdate').attr("value", $.datepicker.formatDate("dd.mm.yy", rueckstelldate));
|
||||
|
||||
$("#rueckstellungdate").datepicker({
|
||||
"dateFormat": "dd.mm.yy",
|
||||
|
||||
Reference in New Issue
Block a user