Edit Ausbildungssemester if not Studentstatus

This commit is contained in:
ma0068
2024-05-15 15:28:51 +02:00
parent 458db654c2
commit 6bf22cfef6
3 changed files with 18 additions and 13 deletions
+2 -2
View File
@@ -2362,9 +2362,9 @@ function StudentRolleSpeichern(dialog, studiensemester_old, ausbildungssemester_
// ****
// * Update Statusgrund aus BearbeitenDialog
// * Update Statusgrund, Ausbildungssemester trotz Bismeldesperre
// ****
function StudentUpdateStatusgrund(dialog, studiensemester_old, ausbildungssemester_old)
function StudentEditSperre(dialog, studiensemester_old, ausbildungssemester_old)
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
prestudent_id = dialog.getElementById('student-rolle-textbox-prestudent_id').value;
+2 -2
View File
@@ -114,9 +114,9 @@ function StudentRolleSpeichern()
window.close();
}
function StudentUpdateStatusgrund()
function StudentEditSperre()
{
if(window.opener.StudentUpdateStatusgrund(document, StudentRolleStudiensemester_old, StudentRolleAusbildungssemester_old))
if(window.opener.StudentEditSperre(document, StudentRolleStudiensemester_old, StudentRolleAusbildungssemester_old))
window.close();
}
+14 -9
View File
@@ -86,6 +86,12 @@ if($prestudent_id!='')
$disabled = $bismeldestichtag->checkMeldestichtagErreicht($datum) && !$rechte->isBerechtigt('student/keine_studstatuspruefung', null, 'suid')
? ' disabled="true"'
: '';
$isStatusBeforeStudent = in_array($status_kurzbz, array('Student','Diplomand','Absovlent','Incoming','Abbrecher','Unterbrecher'))
? false
: true;
$disabledStudent = $isStatusBeforeStudent
? ' '
: ' disabled="true"';
}
?>
@@ -100,9 +106,12 @@ if($prestudent_id!='')
<vbox>
<textbox id="student-rolle-textbox-prestudent_id" value="" hidden="true" />
<groupbox id="student-rolle-groupbox" flex="1">
<?php if ($disabled): ?>
<?php if ($disabled && !$isStatusBeforeStudent): ?>
<label class="warning">Meldestichtag erreicht - ausschließlich Bearbeiten Statusgrund möglich</label>
<?php endif; ?>
<?php if ($disabled && $isStatusBeforeStudent): ?>
<label class="warning">Meldestichtag erreicht - Bearbeiten Ausbildungssemester und Statusgrund möglich</label>
<?php endif; ?>
<caption label="Details<?php echo ($nachname!=''?" $nachname $vorname":'');?>"/>
<grid id="student-rolle-grid-detail" style="margin:4px;" flex="1">
<columns >
@@ -144,7 +153,7 @@ if($prestudent_id!='')
</row>
<row>
<label value="Ausbildungssemester" control="student-rolle-menulist-ausbildungssemester"/>
<menulist id="student-rolle-menulist-ausbildungssemester"<?php echo $disabled ?> >
<menulist id="student-rolle-menulist-ausbildungssemester"<?php echo $disabledStudent ?> >
<menupopup>
<?php
@@ -268,16 +277,12 @@ if($prestudent_id!='')
</grid>
<hbox>
<spacer flex="1" />
<?php if ($disabled): ?>
<button id="student-statusgrund-button-speichern" oncommand="StudentEditSperre()" label="Edit trotz Sperre"/>
<?php endif; ?>
<button id="student-rolle-button-speichern" oncommand="StudentRolleSpeichern()" label="Speichern"<?php echo $disabled ?> />
</hbox>
<hbox>
<spacer flex="1" />
<?php if ($disabled): ?>
<button id="student-statusgrund-button-speichern" oncommand="StudentUpdateStatusgrund()" label="Statusgrund Bearbeiten"/>
<?php endif; ?>
</hbox>
</groupbox>
</vbox>
</window>