v0.10.15n - Added a functional Full Control button to roles.create
This commit is contained in:
parent
b6d819e5f8
commit
e0af87ba97
|
@ -138,101 +138,101 @@
|
||||||
<tr><!--Bruger Start-->
|
<tr><!--Bruger Start-->
|
||||||
<td>Brugere</td>
|
<td>Brugere</td>
|
||||||
<td><p>Empty</p></td>
|
<td><p>Empty</p></td>
|
||||||
<td><input type="checkbox" name="value[]" value="user.create"></td>
|
<td><input id="UserC" type="checkbox" name="value[]" value="user.create"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="user.show"></td>
|
<td><input id="UserR" type="checkbox" name="value[]" value="user.show"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="user.edit"></td>
|
<td><input id="UserU" type="checkbox" name="value[]" value="user.edit"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="user.delete"></td>
|
<td><input id="UserD" type="checkbox" name="value[]" value="user.delete"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="Bike"></td><!--Lave en rolle som give fuld adgang ligesom ownuser.edit-->
|
<td><input id="User" type="checkbox" onclick="FullControl(this)"></td>
|
||||||
</tr><!--Bruger Start-->
|
</tr><!--Bruger Start-->
|
||||||
<tr>
|
<tr>
|
||||||
<td>Roller</td>
|
<td>Roller</td>
|
||||||
<td><p>Empty</p></td>
|
<td><p>Empty</p></td>
|
||||||
<td><input type="checkbox" name="value[]" value="roles.create"></td>
|
<td><input id="RoleC" type="checkbox" name="value[]" value="roles.create"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="roles.show"></td>
|
<td><input id="RoleR" type="checkbox" name="value[]" value="roles.show"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="roles.edit"></td>
|
<td><input id="RoleU" type="checkbox" name="value[]" value="roles.edit"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="roles.delete"></td>
|
<td><input id="RoleD" type="checkbox" name="value[]" value="roles.delete"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="Bike"></td><!--Lave en rolle som give fuld adgang ligesom ownuser.edit-->
|
<td><input id="Role" type="checkbox" onclick="FullControl(this)"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Nyheder</td>
|
<td>Nyheder</td>
|
||||||
<td><p>Empty</p></td>
|
<td><p>Empty</p></td>
|
||||||
<td><input type="checkbox" name="value[]" value="Bike"></td>
|
<td><input id="NewsC" type="checkbox" name="value[]" value="Bike"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="Bike"></td>
|
<td><input id="NewsR" type="checkbox" name="value[]" value="Bike"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="Bike"></td>
|
<td><input id="NewsU" type="checkbox" name="value[]" value="Bike"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="Bike"></td>
|
<td><input id="NewsD" type="checkbox" name="value[]" value="Bike"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="Bike"></td>
|
<td><input id="News" type="checkbox" onclick="FullControl(this)"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Menuplan</td>
|
<td>Menuplan</td>
|
||||||
<td><p>Empty</p></td>
|
<td><p>Empty</p></td>
|
||||||
<td><input type="checkbox" name="value[]" value="news.create"></td>
|
<td><input id="MenuC" type="checkbox" name="value[]" value="news.create"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="news.show"></td>
|
<td><input id="MenuR" type="checkbox" name="value[]" value="news.show"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="news.edit"></td>
|
<td><input id="MenuU" type="checkbox" name="value[]" value="news.edit"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="news.delete"></td>
|
<td><input id="MenuD" type="checkbox" name="value[]" value="news.delete"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="Bike"></td><!--Lave en rolle som give fuld adgang ligesom ownuser.edit-->
|
<td><input id="Menu" type="checkbox" onclick="FullControl(this)"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Aktiviteter</td>
|
<td>Aktiviteter</td>
|
||||||
<td><p>Empty</p></td>
|
<td><p>Empty</p></td>
|
||||||
<td><input type="checkbox" name="value[]" value="events.create"></td>
|
<td><input id="EventC" type="checkbox" name="value[]" value="events.create"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="events.show"></td>
|
<td><input id="EventR" type="checkbox" name="value[]" value="events.show"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="events.edit"></td>
|
<td><input id="EventU" type="checkbox" name="value[]" value="events.edit"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="events.delete"></td>
|
<td><input id="EventD" type="checkbox" name="value[]" value="events.delete"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="Bike"></td><!--Lave en rolle som give fuld adgang ligesom ownuser.edit-->
|
<td><input id="Event" type="checkbox" onclick="FullControl(this)"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Lokation</td>
|
<td>Lokation</td>
|
||||||
<td><p>Empty</p></td>
|
<td><p>Empty</p></td>
|
||||||
<td><input type="checkbox" name="value[]" value="locations.create"></td>
|
<td><input id="LocationC" type="checkbox" name="value[]" value="locations.create"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="locations.show"></td>
|
<td><input id="LocationR" type="checkbox" name="value[]" value="locations.show"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="locations.edit"></td>
|
<td><input id="LocationU" type="checkbox" name="value[]" value="locations.edit"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="locations.delete"></td>
|
<td><input id="LocationD" type="checkbox" name="value[]" value="locations.delete"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="Bike"></td><!--Lave en rolle som give fuld adgang ligesom ownuser.edit-->
|
<td><input id="Location" type="checkbox" onclick="FullControl(this)"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Vaskemaskiner</td>
|
<td>Vaskemaskiner</td>
|
||||||
<td><p>Empty</p></td>
|
<td><p>Empty</p></td>
|
||||||
<td><input type="checkbox" name="value[]" value="washing.machine.create"></td>
|
<td><input id="WashingMachineC" type="checkbox" name="value[]" value="washing.machine.create"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="washing.machine.show"></td>
|
<td><input id="WashingMachineR" type="checkbox" name="value[]" value="washing.machine.show"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="washing.machine.edit"></td>
|
<td><input id="WashingMachineU" type="checkbox" name="value[]" value="washing.machine.edit"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="washing.machine.delete"></td>
|
<td><input id="WashingMachineD" type="checkbox" name="value[]" value="washing.machine.delete"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="Bike"></td><!--Lave en rolle som give fuld adgang ligesom ownuser.edit-->
|
<td><input id="WashingMachine" type="checkbox" onclick="FullControl(this)"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Reservationer</td>
|
<td>Reservationer</td>
|
||||||
<td>Empty</td>
|
<td>Empty</td>
|
||||||
<td><input type="checkbox" name="value[]" value="washing.machine.reservation.create"></td>
|
<td><input id="ReservationC" type="checkbox" name="value[]" value="washing.machine.reservation.create"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="washing.machine.reservation.show"></td>
|
<td><input id="ReservationR" type="checkbox" name="value[]" value="washing.machine.reservation.show"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="washing.machine.reservation.edit"></td>
|
<td><input id="ReservationU" type="checkbox" name="value[]" value="washing.machine.reservation.edit"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="washing.machine.reservation.delete"></td>
|
<td><input id="ReservationD" type="checkbox" name="value[]" value="washing.machine.reservation.delete"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="Bike"></td><!--Lave en rolle som give fuld adgang ligesom ownuser.edit-->
|
<td><input id="Reservation" type="checkbox" onclick="FullControl(this)"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Kontakter</td>
|
<td>Kontakter</td>
|
||||||
<td><p>Empty</p></td>
|
<td><p>Empty</p></td>
|
||||||
<td><input type="checkbox" name="value[]" value="contact.create"></td>
|
<td><input id="ContactC" type="checkbox" name="value[]" value="contact.create"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="contact.show"></td>
|
<td><input id="ContactR" type="checkbox" name="value[]" value="contact.show"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="contact.edit"></td>
|
<td><input id="ContactU" type="checkbox" name="value[]" value="contact.edit"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="contact.delete"></td>
|
<td><input id="ContactD" type="checkbox" name="value[]" value="contact.delete"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="Bike"></td><!--Lave en rolle som give fuld adgang ligesom ownuser.edit-->
|
<td><input id="Contact" type="checkbox" onclick="FullControl(this)"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Vejledning</td>
|
<td>Vejledning</td>
|
||||||
<td><p>Empty</p></td>
|
<td><p>Empty</p></td>
|
||||||
<td><input type="checkbox" name="value[]" value="guides.create"></td>
|
<td><input id="GuideC" type="checkbox" name="value[]" value="guides.create"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="guides.show"></td>
|
<td><input id="GuideR" type="checkbox" name="value[]" value="guides.show"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="guides.edit"></td>
|
<td><input id="GuideU" type="checkbox" name="value[]" value="guides.edit"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="guides.delete"></td>
|
<td><input id="GuideD" type="checkbox" name="value[]" value="guides.delete"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="Bike"></td><!--Lave en rolle som give fuld adgang ligesom ownuser.edit-->
|
<td><input id="Guide" type="checkbox" onclick="FullControl(this)"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Feedback</td>
|
<td>Feedback</td>
|
||||||
<td><p>Empty</p></td>
|
<td><p>Empty</p></td>
|
||||||
<td><input type="checkbox" name="value[]" value="feedback.create"></td>
|
<td><input id="FeedbackC" type="checkbox" name="value[]" value="feedback.create"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="feedback.show"></td>
|
<td><input id="FeedbackR" type="checkbox" name="value[]" value="feedback.show"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="feedback.edit"></td>
|
<td><input id="FeedbackU" type="checkbox" name="value[]" value="feedback.edit"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="feedback.delete"></td>
|
<td><input id="FeedbackD" type="checkbox" name="value[]" value="feedback.delete"></td>
|
||||||
<td><input type="checkbox" name="value[]" value="Bike"></td><!--Lave en rolle som give fuld adgang ligesom ownuser.edit-->
|
<td><input id="Feedback" type="checkbox" onclick="FullControl(this)"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -331,5 +331,26 @@
|
||||||
$('#adminButton').html('Admin rettigheder')
|
$('#adminButton').html('Admin rettigheder')
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function FullControl(FC) { //FC == Full Controll
|
||||||
|
var Create = $(FC).attr('id') + 'C'; // Takes FC's ID Name and puts C at the back of it
|
||||||
|
var Read = $(FC).attr('id') + 'R'; // Takes FC's ID Name and puts R at the back of it
|
||||||
|
var Update = $(FC).attr('id') + 'U'; // Takes FC's ID Name and puts U at the back of it
|
||||||
|
var Delete = $(FC).attr('id') + 'D'; // Takes FC's ID Name and puts D at the back of it
|
||||||
|
|
||||||
|
$(FC).prop('checked', false);
|
||||||
|
|
||||||
|
if ($('#' + Create).prop('checked') == true && $('#' + Read).prop('checked') == true && $('#' + Update).prop('checked') == true && $('#' + Delete).prop('checked') == true) {
|
||||||
|
$('#' + Create).prop('checked', false);
|
||||||
|
$('#' + Read).prop('checked', false);
|
||||||
|
$('#' + Update).prop('checked', false);
|
||||||
|
$('#' + Delete).prop('checked', false);
|
||||||
|
} else {
|
||||||
|
$('#' + Create).prop('checked', true);
|
||||||
|
$('#' + Read).prop('checked', true);
|
||||||
|
$('#' + Update).prop('checked', true);
|
||||||
|
$('#' + Delete).prop('checked', true);
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
Loading…
Reference in New Issue