mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 17:02:19 +00:00
berechtigungrolle.php: Bereits zugeteilte Rechte werden im Dropdown disabled + Neuer Tablesorter.
personen_wartung.php: Checkbox des gleichen Datensatzes wird disabled.
This commit is contained in:
@@ -38,9 +38,24 @@
|
||||
<title>Berechtigungen Uebersicht</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="../../skin/vilesci.css" type="text/css">
|
||||
<link rel="stylesheet" href="../../include/js/tablesort/table.css" type="text/css">
|
||||
<script src="../../include/js/tablesort/table.js" type="text/javascript"></script>
|
||||
<link href="../../skin/tablesort.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="../../include/js/jquery1.9.min.js" type="text/javascript"></script>
|
||||
<script language="Javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#t1").tablesorter(
|
||||
{
|
||||
sortList: [[0,0]],
|
||||
widgets: ["zebra"],
|
||||
headers: {3:{sorter:false}}
|
||||
});
|
||||
$("#t2").tablesorter(
|
||||
{
|
||||
sortList: [[0,0]],
|
||||
widgets: ["zebra"],
|
||||
headers: {2:{sorter:false}}
|
||||
});
|
||||
});
|
||||
function confdel()
|
||||
{
|
||||
var value=prompt('Achtung! Sie sind dabei eine Rolle zu löschen. Die Zuordnungen gehen dadurch verloren! Um diese Rolle wirklich zu Löschen tippen Sie "LÖSCHEN" in das untenstehende Feld.');
|
||||
@@ -101,9 +116,17 @@ if(isset($_GET['rolle_kurzbz']))
|
||||
echo '<form action="'.$_SERVER['PHP_SELF'].'" method="GET">';
|
||||
echo '<input type="hidden" name="rolle_kurzbz" value="'.$rolle_kurzbz.'">';
|
||||
echo '<SELECT name="berechtigung_kurzbz">';
|
||||
|
||||
$berechtigungen = new berechtigung();
|
||||
$berechtigungen->getRolleBerechtigung($rolle_kurzbz);
|
||||
$berechtigungen_arr = array();
|
||||
foreach ($berechtigungen->result as $row)
|
||||
{
|
||||
$berechtigungen_arr[] = $row->berechtigung_kurzbz;
|
||||
}
|
||||
foreach ($berechtigung->result as $row)
|
||||
{
|
||||
echo '<OPTION value="',$row->berechtigung_kurzbz,'">',$row->berechtigung_kurzbz,'</OPTION>';
|
||||
echo '<OPTION value="',$row->berechtigung_kurzbz,'" '.(array_search($row->berechtigung_kurzbz,$berechtigungen_arr)!==false?'disabled':'').'>',$row->berechtigung_kurzbz,'</OPTION>';
|
||||
}
|
||||
echo '</SELECT>';
|
||||
echo ' <input type="text" value="suid" size="4" name="art">';
|
||||
@@ -111,21 +134,21 @@ if(isset($_GET['rolle_kurzbz']))
|
||||
echo '</form>';
|
||||
|
||||
|
||||
echo '<table class="liste table-autosort:0 table-stripeclass:alternate table-autostripe">
|
||||
echo '<table id="t1" class="tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="table-sortable:default">Kurzbz</th>
|
||||
<th class="table-sortable:default">Art</th>
|
||||
<th class="table-sortable:default">Beschreibung</th>
|
||||
<th>Kurzbz</th>
|
||||
<th>Art</th>
|
||||
<th>Beschreibung</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
|
||||
$berechtigung = new berechtigung();
|
||||
$berechtigung->getRolleBerechtigung($rolle_kurzbz);
|
||||
//$berechtigungen = new berechtigung();
|
||||
//$berechtigungen->getRolleBerechtigung($rolle_kurzbz);
|
||||
|
||||
foreach($berechtigung->result as $rolle)
|
||||
foreach($berechtigungen->result as $rolle)
|
||||
{
|
||||
echo '<tr>';
|
||||
echo '<td>',$rolle->berechtigung_kurzbz,'</td>';
|
||||
@@ -177,11 +200,11 @@ else
|
||||
$berechtigung->getRollen();
|
||||
|
||||
echo '<h3>Rollen:</h3>';
|
||||
echo '<table class="liste table-autosort:0 table-stripeclass:alternate table-autostripe">
|
||||
echo '<table id="t2" class="tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="table-sortable:default">Kurzbz</th>
|
||||
<th class="table-sortable:default">Beschreibung</th>
|
||||
<th>Kurzbz</th>
|
||||
<th>Beschreibung</th>
|
||||
<th colspan="2">Aktion</th></tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
|
||||
@@ -171,6 +171,20 @@ if((isset($radio_1) && !isset($radio_2))||(!isset($radio_1) && isset($radio_2))
|
||||
});
|
||||
|
||||
});
|
||||
function enable(id)
|
||||
{
|
||||
if (id == 'radio_1')
|
||||
var radios = document.getElementsByName('radio_2');
|
||||
else
|
||||
var radios = document.getElementsByName('radio_1');
|
||||
for (var i=0, iLen=radios.length; i<iLen; i++) {
|
||||
radios[i].disabled = false;
|
||||
}
|
||||
}
|
||||
function disable(id)
|
||||
{
|
||||
document.getElementById(id).disabled = true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<title>Personen-Zusammenlegung</title>
|
||||
@@ -219,7 +233,7 @@ echo '<br>
|
||||
echo "<td>$l->gebdatum</td>";
|
||||
echo "<td>$l->svnr</td>";
|
||||
echo "<td>$l->ersatzkennzeichen</td>";
|
||||
echo "<td><input type='radio' name='radio_1' value='$l->person_id' ".((isset($radio_1) && $radio_1==$l->person_id)?'checked':'')."></td>";
|
||||
echo "<td><input type='radio' name='radio_1' id='radio_1_$l->person_id' value='$l->person_id' ".((isset($radio_1) && $radio_1==$l->person_id)?'checked':'')." onclick='enable(\"radio_1\"); disable(\"radio_2_$l->person_id\")'></td>";
|
||||
echo "</tr>";
|
||||
$i++;
|
||||
}
|
||||
@@ -245,7 +259,7 @@ echo '<br>
|
||||
foreach($lf->personen as $l)
|
||||
{
|
||||
echo "<tr>";
|
||||
echo "<td><input type='radio' name='radio_2' value='$l->person_id' ".((isset($radio_2) && $radio_2==$l->person_id)?'checked':'')."></td>";
|
||||
echo "<td><input type='radio' name='radio_2' id='radio_2_$l->person_id' value='$l->person_id' ".((isset($radio_2) && $radio_2==$l->person_id)?'checked':'')." onclick='enable(\"radio_2\"); disable(\"radio_1_$l->person_id\")'></td>";
|
||||
echo "<td>$l->person_id</td>";
|
||||
echo "<td>$l->nachname</td>";
|
||||
echo "<td>$l->vorname</td>";
|
||||
|
||||
Reference in New Issue
Block a user