This commit is contained in:
Neerholt 2020-09-10 10:39:16 +02:00
commit 201e2b5b35
21 changed files with 306 additions and 112 deletions

View File

@ -8,6 +8,7 @@
<file url="file://$PROJECT_DIR$/skolehjem/public/images/icons/location.svg" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/skolehjem/public/images/icons/location.svg" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/skolehjem/public/images/icons/phone.svg" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/skolehjem/public/images/icons/phone.svg" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/skolehjem/public/images/icons/print-hvid.svg" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/skolehjem/public/images/icons/print-hvid.svg" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/skolehjem/public/images/icons/questionmark.svg" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/skolehjem/public/images/icons/users-hvid.svg" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/skolehjem/public/images/icons/users-hvid.svg" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/skolehjem/public/images/icons/wash.svg" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/skolehjem/public/images/icons/wash.svg" charset="UTF-8" />
</component> </component>

View File

@ -27,6 +27,9 @@ class Helpers
} }
public static function sendNewsNotification(News $news, Collection $users){ public static function sendNewsNotification(News $news, Collection $users){
$headers = 'Content-Transfer-Encoding: 8bit'. "\r\n".
'Content-Type: text/html; charset="UTF-8"';
foreach ($users as $user) { foreach ($users as $user) {
$email = $user->email; $email = $user->email;
@ -35,10 +38,9 @@ class Helpers
else else
$subject = $news->subname; $subject = $news->subname;
$msg = "Hej " . $user->name_first . " ". $user->name_last . ".\n\nDer er kommet en ny nyhed i skolehjems appen! "; $msg = "Hej " . $user->name_first . " ". $user->name_last . ".\n\nDer er kommet en ny nyhed i skolehjems appen! ";
mail($email, $subject, $msg); mail($email, $subject, $msg, $headers);
} }
} }
} }

View File

@ -135,7 +135,7 @@ class FeedbackController extends Controller
"<th style='width: 6em;'>Dato</th>". "<th style='width: 6em;'>Dato</th>".
"<th>Feedback Besked</th>". "<th>Feedback Besked</th>".
"<th style='width: 5em;'>Ris el. Ros</th>". "<th style='width: 5em;'>Ris el. Ros</th>".
"<th style=\"width: 1em;\"><img class=\"w-100\" src=\"http://127.0.0.1:8000/images/icons/trashcan.svg\" alt=\"Delete\"></th>". "<th style=\"width: 1em;\"><img class=\"w-100\" src=".asset('/images/icons/trashcan.svg')." alt=\"Delete\"></th>".
"</tr>"; "</tr>";
//$value = Feedbacks::query('feedbacks')->select('suggestion_form ')->dump(); //$value = Feedbacks::query('feedbacks')->select('suggestion_form ')->dump();
@ -166,5 +166,15 @@ class FeedbackController extends Controller
} }
} }
public function storeajax(Request $request) {
$requestBody = $request->validate([
"message" => "required",
"suggestion_form" => "required|max:255"
]);
$feedbacks = new Feedbacks($requestBody);
$feedbacks->save();
}
} }

View File

@ -24,8 +24,8 @@ class UserController extends Controller
{ {
$this->middleware([ "auth" ])->only(["accountupdate", "accountedit", "accounteditpass", "account", "logout"]); $this->middleware([ "auth" ])->only(["accountupdate", "accountedit", "accounteditpass", "account", "logout"]);
$this->middleware([ "guest" ])->only(["login", "signup"]); $this->middleware([ "guest" ])->only(["login", "signup", "signupStore"]);
$this->middleware([ "lang" ])->except(["login", "showLogin", "showForgot", "forgot","signup"]); $this->middleware([ "lang" ])->except(["login", "showLogin", "showForgot", "forgot", "signup", "nameCheck", "signupStore"]);
$this->middleware([ "check.auth:user.show" ])->only("show", "index"); $this->middleware([ "check.auth:user.show" ])->only("show", "index");
$this->middleware([ "check.auth:user.create" ])->only("create"); $this->middleware([ "check.auth:user.create" ])->only("create");
@ -645,10 +645,27 @@ class UserController extends Controller
} }
} }
public function signup(){ public function signup(){
//return redirect()->route("users.signup"); //return redirect()->route("users.signup");
return Response::detect("users.signup"); return Response::detect("users.signup");
} }
public function signupStore(Request $request){
$data = $request->validate([
"name_first" => "required|max:255",
"name_last" => "required|max:255",
"email" => "required",
"password" => "required|max:60",
"phone" => "required|max:8|min:8",
]);
$user = new User($data);
$user->assignRole("Bruger");
$user->save();
return redirect()->route('users.login');
}
} }

View File

@ -211,7 +211,7 @@ class WashingReservationController extends Controller
"<th>Vaskemaskine</th>". "<th>Vaskemaskine</th>".
"<th>Tidspunkt</th>". "<th>Tidspunkt</th>".
"<th>Bruger</th>". "<th>Bruger</th>".
"<th style=\"width: 1em;\"><img class=\"w-100\" src=\"http://127.0.0.1:8000/images/icons/trashcan.svg\" alt=\"Delete\"></th>". "<th style=\"width: 1em;\"><img class=\"w-100\" src=".asset('/images/icons/trashcan.svg')." alt=\"Delete\"></th>".
"</tr>"; "</tr>";

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<style>#Capa_1{fill:#FFF;}</style>
<g>
<g>
<g>
<circle cx="256" cy="378.5" r="25"/>
<path d="M256,0C114.516,0,0,114.497,0,256c0,141.484,114.497,256,256,256c141.484,0,256-114.497,256-256
C512,114.516,397.503,0,256,0z M256,472c-119.377,0-216-96.607-216-216c0-119.377,96.607-216,216-216
c119.377,0,216,96.607,216,216C472,375.377,375.393,472,256,472z"/>
<path d="M256,128.5c-44.112,0-80,35.888-80,80c0,11.046,8.954,20,20,20s20-8.954,20-20c0-22.056,17.944-40,40-40
c22.056,0,40,17.944,40,40c0,22.056-17.944,40-40,40c-11.046,0-20,8.954-20,20v50c0,11.046,8.954,20,20,20
c11.046,0,20-8.954,20-20v-32.531c34.466-8.903,60-40.26,60-77.469C336,164.388,300.112,128.5,256,128.5z"/>
</g>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -65,10 +65,7 @@ return[
"error" => "Fejl", "error" => "Fejl",
"404" => "Denne side findes ikke.", "404" => "Denne side findes ikke.",
"403" => "Du har ikke rettigheder til denne side.", "403" => "Du har ikke rettigheder til denne side.",
"canceled" => "Aflyst" "canceled" => "Aflyst",
"feedbacksendt" => "Tak for din feedback!",
"feedbackerror" => "Du skal skrive en besked."
]; ];

View File

@ -71,5 +71,7 @@ return[
"error" => "Error", "error" => "Error",
"404" => "This page doesn't exist.", "404" => "This page doesn't exist.",
"403" => "You don't have permissions to access this page.", "403" => "You don't have permissions to access this page.",
"canceled" => "Canceled" "canceled" => "Canceled",
"feedbacksendt" => "Thank you for your feedback!",
"feedbackerror" => "You have to write a feedback message."
]; ];

View File

@ -32,7 +32,7 @@
<input class="checkbox-inline" type="checkbox" name="checkbox" id="tf" value="tf"> <input class="checkbox-inline" type="checkbox" name="checkbox" id="tf" value="tf">
<label for="efternavn">Telefon</label> <label for="efternavn">Telefon</label>
</div> </div>
<div id="showHideCheckboxs" style="margin-bottom: -38px"> <div id="showHideCheckboxs" style="margin-bottom: -36px">
</div> </div>
<table class="tbl mt-2"> <table class="tbl mt-2">
<tr> <tr>

View File

@ -26,6 +26,44 @@
.text-muted { .text-muted {
color: #6c757d !important; color: #6c757d !important;
} }
.question-mark, .question-mark-div {
float: right;
width: 24px;
vertical-align: sub;
}
.question-mark-div {
position: relative;
display: inline-block;
}
.question-mark-div .question-mark-tooltip {
visibility: hidden;
width: 150px;
background-color: black;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 6px 6px;
/* Position the tooltip */
position: absolute;
z-index: 1;
top: -5px;
right: 105%;
}
.question-mark-div:hover .question-mark-tooltip {
visibility: visible;
}
th {
overflow: visible !important;
text-overflow: unset !important;
white-space: unset !important;
word-break: break-word !important;
}
</style> </style>
<h1 id="errormesseages" >Opret Rolle:</h1> <h1 id="errormesseages" >Opret Rolle:</h1>
<form method="post" action="{{ route("roles.store") }}"> <form method="post" action="{{ route("roles.store") }}">
@ -48,56 +86,48 @@
<table class="tbl mb-2"> <table class="tbl mb-2">
<tr> <tr>
<th>App-side</th> <th>App-side</th>
<th>Beskrivelse kan fjernes?</th> <th>Opret/Tilmeld<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver tilladelse til at oprette el. tilmelde Reservationer, Aktiviteter & Feedback</span></div></th>
<th>Opret/Tilmeld</th> <th>Se<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver tilladelse til at se diverse sider</span></div></th>
<th>Se</th> <th>Slet/Afmeld<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver tilladelse til at slette el. afmelde Reservationer & Aktiviteter</span></div></th>
<th>Slet/Afmeld</th>
</tr> </tr>
<tr> <tr>
<td>Nyheder</td> <td>Nyheder</td>
<td><p>Empty</p></td>
<td></td> <td></td>
<td><input id="NewsRAccount" onclick="if ($('#NewsR').prop('checked') == false) $('#NewsR').prop('checked', true); else $('#NewsR').prop('checked', false);" type="checkbox" name="value[]" value="news.show"></td> <td><input id="NewsRAccount" onclick="if ($('#NewsR').prop('checked') == false) $('#NewsR').prop('checked', true); else $('#NewsR').prop('checked', false);" type="checkbox" name="value[]" value="news.show"></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>Menuplan</td> <td>Menuplan</td>
<td><p>Empty</p></td>
<td></td> <td></td>
<td><input id="MenuRAccount" onclick="if ($('#MenuR').prop('checked') == false) $('#MenuR').prop('checked', true); else $('#MenuR').prop('checked', false);" type="checkbox" name="value[]" value="menuplan.show"></td> <td><input id="MenuRAccount" onclick="if ($('#MenuR').prop('checked') == false) $('#MenuR').prop('checked', true); else $('#MenuR').prop('checked', false);" type="checkbox" name="value[]" value="menuplan.show"></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>Aktiviteter</td> <td>Aktiviteter</td>
<td><p>Empty</p></td>
<td><input id="EventParticipateAccount" type="checkbox" name="value[]" value="userevent.create"></td> <td><input id="EventParticipateAccount" type="checkbox" name="value[]" value="userevent.create"></td>
<td><input id="EventRAccount" onclick="if ($('#EventR').prop('checked') == false) $('#EventR').prop('checked', true); else $('#EventR').prop('checked', false);" type="checkbox" name="value[]" value="event.show"></td> <td><input id="EventRAccount" onclick="if ($('#EventR').prop('checked') == false) $('#EventR').prop('checked', true); else $('#EventR').prop('checked', false);" type="checkbox" name="value[]" value="event.show"></td>
<td><input id="EventStopParticipatingAccount" type="checkbox" name="value[]" value="userevent.delete"></td> <td><input id="EventStopParticipatingAccount" type="checkbox" name="value[]" value="userevent.delete"></td>
</tr> </tr>
<tr> <tr>
<td>Reservationer</td> <td>Reservationer</td>
<td>Empty</td>
<td><input id="ReservationCAccount" type="checkbox" name="value[]" value="washing.machine.reservation.create"></td> <td><input id="ReservationCAccount" type="checkbox" name="value[]" value="washing.machine.reservation.create"></td>
<td><input id="ReservationRAccount" onclick="if ($('#ReservationR').prop('checked') == false) $('#ReservationR').prop('checked', true); else $('#ReservationR').prop('checked', false);" type="checkbox" name="value[]" value="washing.machine.reservation.show"></td> <td><input id="ReservationRAccount" onclick="if ($('#ReservationR').prop('checked') == false) $('#ReservationR').prop('checked', true); else $('#ReservationR').prop('checked', false);" type="checkbox" name="value[]" value="washing.machine.reservation.show"></td>
<td><input id="ReservationDAccount" onclick="if ($('#ReservationD').prop('checked') == false) $('#ReservationD').prop('checked', true); else $('#ReservationD').prop('checked', false);" type="checkbox" name="value[]" value="washing.machine.reservation.delete"></td> <td><input id="ReservationDAccount" onclick="if ($('#ReservationD').prop('checked') == false) $('#ReservationD').prop('checked', true); else $('#ReservationD').prop('checked', false);" type="checkbox" name="value[]" value="washing.machine.reservation.delete"></td>
</tr> </tr>
<tr> <tr>
<td>Kontakter</td> <td>Kontakter</td>
<td><p>Empty</p></td>
<td></td> <td></td>
<td><input id="ContactRAccount" onclick="if ($('#ContactR').prop('checked') == false) $('#ContactR').prop('checked', true); else $('#ContactR').prop('checked', false);" type="checkbox" name="value[]" value="contact.show"></td> <td><input id="ContactRAccount" onclick="if ($('#ContactR').prop('checked') == false) $('#ContactR').prop('checked', true); else $('#ContactR').prop('checked', false);" type="checkbox" name="value[]" value="contact.show"></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>Vejledning</td> <td>Vejledning</td>
<td><p>Empty</p></td>
<td></td> <td></td>
<td><input id="GuideRAccount" onclick="if ($('#GuideR').prop('checked') == false) $('#GuideR').prop('checked', true); else $('#GuideR').prop('checked', false);" type="checkbox" name="value[]" value="guides.show"></td> <td><input id="GuideRAccount" onclick="if ($('#GuideR').prop('checked') == false) $('#GuideR').prop('checked', true); else $('#GuideR').prop('checked', false);" type="checkbox" name="value[]" value="guides.show"></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>Feedback</td> <td>Feedback</td>
<td>Empty</td>
<td><input id="FeedbackCAccount" type="checkbox" name="value[]" value="feedback.create"></td> <td><input id="FeedbackCAccount" type="checkbox" name="value[]" value="feedback.create"></td>
<td></td> <td></td>
<td></td> <td></td>
@ -112,22 +142,19 @@
<table class="tbl mb-2" > <table class="tbl mb-2" >
<tr><!--Header Start--> <tr><!--Header Start-->
<th>Admin-side</th> <th>Admin-side</th>
<th>Beskrivelse kan fjernes?</th> <th>Opret<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver tilladelse til at oprette Menuplaner, Aktiviteter, Brugere m.v.</span></div></th>
<th>Opret</th> <th>Se<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver tilladelse til at se alle Menuplaner, Aktiviteter, Brugere m.v.</span></div></th>
<th>Se</th> <th>Rediger<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver tilladelse til at kunne redigere Menuplaner, Aktiviteter, Brugere m.v.</span></div></th>
<th>Rediger</th> <th>Slet<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver tilladelse til at kunne slette Menuplaner, Aktiviteter, Brugere m.v.</span></div></th>
<th>Slet</th> <th>Fuld Kontrol<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver alle rettigheder som beskrevet i hhv. 'Opret', 'Se', 'Rediger' & 'Slet'</span></div></th>
<th>Fuld Kontrol</th>
</tr><!--Header Slut--> </tr><!--Header Slut-->
<tr> <tr>
<td>Admin Panel</td> <td>Admin Panel</td>
<td><p>Adgang til admin panelet</p></td>
<td></td> <td></td>
<td colspan="4"><input type="checkbox" name="value[]" value="admin.panel.show"></td> <td colspan="4"><input type="checkbox" name="value[]" value="admin.panel.show"></td>
</tr> </tr>
<tr><!--Bruger Start--> <tr><!--Bruger Start-->
<td>Brugere</td> <td>Brugere</td>
<td><p>Empty</p></td>
<td><input id="UserC" type="checkbox" name="value[]" value="user.create"></td> <td><input id="UserC" type="checkbox" name="value[]" value="user.create"></td>
<td><input id="UserR" type="checkbox" name="value[]" value="user.show"></td> <td><input id="UserR" type="checkbox" name="value[]" value="user.show"></td>
<td><input id="UserU" type="checkbox" name="value[]" value="user.edit"></td> <td><input id="UserU" type="checkbox" name="value[]" value="user.edit"></td>
@ -136,7 +163,6 @@
</tr><!--Bruger Start--> </tr><!--Bruger Start-->
<tr> <tr>
<td>Roller</td> <td>Roller</td>
<td><p>Empty</p></td>
<td><input id="RoleC" type="checkbox" name="value[]" value="roles.create"></td> <td><input id="RoleC" type="checkbox" name="value[]" value="roles.create"></td>
<td><input id="RoleR" type="checkbox" name="value[]" value="roles.show"></td> <td><input id="RoleR" type="checkbox" name="value[]" value="roles.show"></td>
<td><input id="RoleU" type="checkbox" name="value[]" value="roles.edit"></td> <td><input id="RoleU" type="checkbox" name="value[]" value="roles.edit"></td>
@ -145,7 +171,6 @@
</tr> </tr>
<tr> <tr>
<td>Nyheder</td> <td>Nyheder</td>
<td><p>Empty</p></td>
<td><input id="NewsC" type="checkbox" name="value[]" value="news.create"></td> <td><input id="NewsC" type="checkbox" name="value[]" value="news.create"></td>
<td><input id="NewsR" onclick="if ($('#NewsRAccount').prop('checked') == false) $('#NewsRAccount').prop('checked', true); else $('#NewsRAccount').prop('checked', false);" type="checkbox" name="value[]" value="news.show"></td> <td><input id="NewsR" onclick="if ($('#NewsRAccount').prop('checked') == false) $('#NewsRAccount').prop('checked', true); else $('#NewsRAccount').prop('checked', false);" type="checkbox" name="value[]" value="news.show"></td>
<td><input id="NewsU" type="checkbox" name="value[]" value="news.edit"></td> <td><input id="NewsU" type="checkbox" name="value[]" value="news.edit"></td>
@ -154,7 +179,6 @@
</tr> </tr>
<tr> <tr>
<td>Menuplan</td> <td>Menuplan</td>
<td><p>Empty</p></td>
<td><input id="MenuC" type="checkbox" name="value[]" value="menuplan.create"></td> <td><input id="MenuC" type="checkbox" name="value[]" value="menuplan.create"></td>
<td><input id="MenuR" onclick="if ($('#MenuRAccount').prop('checked') == false) $('#MenuRAccount').prop('checked', true); else $('#MenuRAccount').prop('checked', false);" type="checkbox" name="value[]" value="menuplan.show"></td> <td><input id="MenuR" onclick="if ($('#MenuRAccount').prop('checked') == false) $('#MenuRAccount').prop('checked', true); else $('#MenuRAccount').prop('checked', false);" type="checkbox" name="value[]" value="menuplan.show"></td>
<td><input id="MenuU" type="checkbox" name="value[]" value="menuplan.edit"></td> <td><input id="MenuU" type="checkbox" name="value[]" value="menuplan.edit"></td>
@ -163,7 +187,6 @@
</tr> </tr>
<tr> <tr>
<td>Aktiviteter</td> <td>Aktiviteter</td>
<td><p>Empty</p></td>
<td><input id="EventC" type="checkbox" name="value[]" value="event.create"></td> <td><input id="EventC" type="checkbox" name="value[]" value="event.create"></td>
<td><input id="EventR" onclick="if ($('#EventRAccount').prop('checked') == false) $('#EventRAccount').prop('checked', true); else $('#EventRAccount').prop('checked', false);" type="checkbox" name="value[]" value="event.show"></td> <td><input id="EventR" onclick="if ($('#EventRAccount').prop('checked') == false) $('#EventRAccount').prop('checked', true); else $('#EventRAccount').prop('checked', false);" type="checkbox" name="value[]" value="event.show"></td>
<td><input id="EventU" type="checkbox" name="value[]" value="event.edit"></td> <td><input id="EventU" type="checkbox" name="value[]" value="event.edit"></td>
@ -172,7 +195,6 @@
</tr> </tr>
<tr> <tr>
<td>Lokation</td> <td>Lokation</td>
<td><p>Empty</p></td>
<td><input id="LocationC" type="checkbox" name="value[]" value="locations.create"></td> <td><input id="LocationC" type="checkbox" name="value[]" value="locations.create"></td>
<td><input id="LocationR" type="checkbox" name="value[]" value="locations.show"></td> <td><input id="LocationR" type="checkbox" name="value[]" value="locations.show"></td>
<td><input id="LocationU" type="checkbox" name="value[]" value="locations.edit"></td> <td><input id="LocationU" type="checkbox" name="value[]" value="locations.edit"></td>
@ -181,7 +203,6 @@
</tr> </tr>
<tr> <tr>
<td>Vaskemaskiner</td> <td>Vaskemaskiner</td>
<td><p>Empty</p></td>
<td><input id="WashingMachineC" type="checkbox" name="value[]" value="washing.machine.create"></td> <td><input id="WashingMachineC" type="checkbox" name="value[]" value="washing.machine.create"></td>
<td><input id="WashingMachineR" type="checkbox" name="value[]" value="washing.machine.show"></td> <td><input id="WashingMachineR" type="checkbox" name="value[]" value="washing.machine.show"></td>
<td><input id="WashingMachineU" type="checkbox" name="value[]" value="washing.machine.edit"></td> <td><input id="WashingMachineU" type="checkbox" name="value[]" value="washing.machine.edit"></td>
@ -190,7 +211,6 @@
</tr> </tr>
<tr> <tr>
<td>Reservationer</td> <td>Reservationer</td>
<td>Empty</td>
<td></td> <td></td>
<td><input id="ReservationR" onclick="if ($('#ReservationRAccount').prop('checked') == false) $('#ReservationRAccount').prop('checked', true); else $('#ReservationRAccount').prop('checked', false);" type="checkbox" name="value[]" value="washing.machine.reservation.show"></td> <td><input id="ReservationR" onclick="if ($('#ReservationRAccount').prop('checked') == false) $('#ReservationRAccount').prop('checked', true); else $('#ReservationRAccount').prop('checked', false);" type="checkbox" name="value[]" value="washing.machine.reservation.show"></td>
<td></td> <td></td>
@ -199,7 +219,6 @@
</tr> </tr>
<tr> <tr>
<td>Kontakter</td> <td>Kontakter</td>
<td><p>Empty</p></td>
<td><input id="ContactC" type="checkbox" name="value[]" value="contact.create"></td> <td><input id="ContactC" type="checkbox" name="value[]" value="contact.create"></td>
<td><input id="ContactR" onclick="if ($('#ContactRAccount').prop('checked') == false) $('#ContactRAccount').prop('checked', true); else $('#ContactRAccount').prop('checked', false);" type="checkbox" name="value[]" value="contact.show"></td> <td><input id="ContactR" onclick="if ($('#ContactRAccount').prop('checked') == false) $('#ContactRAccount').prop('checked', true); else $('#ContactRAccount').prop('checked', false);" type="checkbox" name="value[]" value="contact.show"></td>
<td><input id="ContactU" type="checkbox" name="value[]" value="contact.edit"></td> <td><input id="ContactU" type="checkbox" name="value[]" value="contact.edit"></td>
@ -208,7 +227,6 @@
</tr> </tr>
<tr> <tr>
<td>Vejledning</td> <td>Vejledning</td>
<td><p>Empty</p></td>
<td><input id="GuideC" type="checkbox" name="value[]" value="guides.create"></td> <td><input id="GuideC" type="checkbox" name="value[]" value="guides.create"></td>
<td><input id="GuideR" onclick="if ($('#GuideRRAccount').prop('checked') == false) $('#GuideRAccount').prop('checked', true); else $('#GuideRAccount').prop('checked', false);" type="checkbox" name="value[]" value="guides.show"></td> <td><input id="GuideR" onclick="if ($('#GuideRRAccount').prop('checked') == false) $('#GuideRAccount').prop('checked', true); else $('#GuideRAccount').prop('checked', false);" type="checkbox" name="value[]" value="guides.show"></td>
<td><input id="GuideU" type="checkbox" name="value[]" value="guides.edit"></td> <td><input id="GuideU" type="checkbox" name="value[]" value="guides.edit"></td>
@ -217,7 +235,6 @@
</tr> </tr>
<tr> <tr>
<td>Feedback</td> <td>Feedback</td>
<td><p>Empty</p></td>
<td></td> <td></td>
<td><input id="FeedbackR" type="checkbox" name="value[]" value="feedback.show"></td> <td><input id="FeedbackR" type="checkbox" name="value[]" value="feedback.show"></td>
<td></td> <td></td>

View File

@ -26,6 +26,44 @@
.text-muted { .text-muted {
color: #6c757d !important; color: #6c757d !important;
} }
.question-mark, .question-mark-div {
float: right;
width: 24px;
vertical-align: sub;
}
.question-mark-div {
position: relative;
display: inline-block;
}
.question-mark-div .question-mark-tooltip {
visibility: hidden;
width: 150px;
background-color: black;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 6px 6px;
/* Position the tooltip */
position: absolute;
z-index: 1;
top: -5px;
right: 105%;
}
.question-mark-div:hover .question-mark-tooltip {
visibility: visible;
}
th {
overflow: visible !important;
text-overflow: unset !important;
white-space: unset !important;
word-break: break-word !important;
}
</style> </style>
<h1>Rediger Rolle:</h1> <h1>Rediger Rolle:</h1>
<form method="post" action="{{ route("roles.update", ['role' => $role]) }}"> <form method="post" action="{{ route("roles.update", ['role' => $role]) }}">
@ -48,56 +86,48 @@
<table class="tbl mb-2"> <table class="tbl mb-2">
<tr> <tr>
<th>App-side</th> <th>App-side</th>
<th>Beskrivelse kan fjernes?</th> <th>Opret/Tilmeld<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver tilladelse til at oprette el. tilmelde Reservationer, Aktiviteter & Feedback</span></div></th>
<th>Opret/Tilmeld</th> <th>Se<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver tilladelse til at se diverse sider</span></div></th>
<th>Se</th> <th>Slet/Afmeld<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver tilladelse til at slette el. afmelde Reservationer & Aktiviteter</span></div></th>
<th>Slet/Afmeld</th>
</tr> </tr>
<tr> <tr>
<td>Nyheder</td> <td>Nyheder</td>
<td><p>Empty</p></td>
<td></td> <td></td>
<td><input id="NewsRAccount" onclick="if ($('#NewsR').prop('checked') == false) $('#NewsR').prop('checked', true); else $('#NewsR').prop('checked', false);" type="checkbox" name="value[]" value="news.show" @if ($role->hasPermissionTo("news.show")) checked @endif></td> <td><input id="NewsRAccount" onclick="if ($('#NewsR').prop('checked') == false) $('#NewsR').prop('checked', true); else $('#NewsR').prop('checked', false);" type="checkbox" name="value[]" value="news.show" @if ($role->hasPermissionTo("news.show")) checked @endif></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>Menuplan</td> <td>Menuplan</td>
<td><p>Empty</p></td>
<td></td> <td></td>
<td><input id="MenuRAccount" onclick="if ($('#MenuR').prop('checked') == false) $('#MenuR').prop('checked', true); else $('#MenuR').prop('checked', false);" type="checkbox" name="value[]" value="menuplan.show" @if ($role->hasPermissionTo("menuplan.show")) checked @endif></td> <td><input id="MenuRAccount" onclick="if ($('#MenuR').prop('checked') == false) $('#MenuR').prop('checked', true); else $('#MenuR').prop('checked', false);" type="checkbox" name="value[]" value="menuplan.show" @if ($role->hasPermissionTo("menuplan.show")) checked @endif></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>Aktiviteter</td> <td>Aktiviteter</td>
<td><p>Empty</p></td>
<td><input id="EventParticipateAccount" type="checkbox" name="value[]" value="userevent.create" @if ($role->hasPermissionTo("userevent.create")) checked @endif></td> <td><input id="EventParticipateAccount" type="checkbox" name="value[]" value="userevent.create" @if ($role->hasPermissionTo("userevent.create")) checked @endif></td>
<td><input id="EventRAccount" onclick="if ($('#EventR').prop('checked') == false) $('#EventR').prop('checked', true); else $('#EventR').prop('checked', false);" type="checkbox" name="value[]" value="event.show" @if ($role->hasPermissionTo("event.show")) checked @endif></td> <td><input id="EventRAccount" onclick="if ($('#EventR').prop('checked') == false) $('#EventR').prop('checked', true); else $('#EventR').prop('checked', false);" type="checkbox" name="value[]" value="event.show" @if ($role->hasPermissionTo("event.show")) checked @endif></td>
<td><input id="EventStopParticipatingAccount" type="checkbox" name="value[]" value="userevent.delete" @if ($role->hasPermissionTo("userevent.delete")) checked @endif></td> <td><input id="EventStopParticipatingAccount" type="checkbox" name="value[]" value="userevent.delete" @if ($role->hasPermissionTo("userevent.delete")) checked @endif></td>
</tr> </tr>
<tr> <tr>
<td>Reservationer</td> <td>Reservationer</td>
<td>Empty</td>
<td><input id="ReservationCAccount" type="checkbox" name="value[]" value="washing.machine.reservation.create" @if ($role->hasPermissionTo("washing.machine.reservation.create")) checked @endif></td> <td><input id="ReservationCAccount" type="checkbox" name="value[]" value="washing.machine.reservation.create" @if ($role->hasPermissionTo("washing.machine.reservation.create")) checked @endif></td>
<td><input id="ReservationRAccount" onclick="if ($('#ReservationR').prop('checked') == false) $('#ReservationR').prop('checked', true); else $('#ReservationR').prop('checked', false);" type="checkbox" name="value[]" value="washing.machine.reservation.show" @if ($role->hasPermissionTo("washing.machine.reservation.show")) checked @endif></td> <td><input id="ReservationRAccount" onclick="if ($('#ReservationR').prop('checked') == false) $('#ReservationR').prop('checked', true); else $('#ReservationR').prop('checked', false);" type="checkbox" name="value[]" value="washing.machine.reservation.show" @if ($role->hasPermissionTo("washing.machine.reservation.show")) checked @endif></td>
<td><input id="ReservationDAccount" onclick="if ($('#ReservationD').prop('checked') == false) $('#ReservationD').prop('checked', true); else $('#ReservationD').prop('checked', false);" type="checkbox" name="value[]" value="washing.machine.reservation.delete" @if ($role->hasPermissionTo("washing.machine.reservation.delete")) checked @endif></td> <td><input id="ReservationDAccount" onclick="if ($('#ReservationD').prop('checked') == false) $('#ReservationD').prop('checked', true); else $('#ReservationD').prop('checked', false);" type="checkbox" name="value[]" value="washing.machine.reservation.delete" @if ($role->hasPermissionTo("washing.machine.reservation.delete")) checked @endif></td>
</tr> </tr>
<tr> <tr>
<td>Kontakter</td> <td>Kontakter</td>
<td><p>Empty</p></td>
<td></td> <td></td>
<td><input id="ContactRAccount" onclick="if ($('#ContactR').prop('checked') == false) $('#ContactR').prop('checked', true); else $('#ContactR').prop('checked', false);" type="checkbox" name="value[]" value="contact.show" @if ($role->hasPermissionTo("contact.show")) checked @endif></td> <td><input id="ContactRAccount" onclick="if ($('#ContactR').prop('checked') == false) $('#ContactR').prop('checked', true); else $('#ContactR').prop('checked', false);" type="checkbox" name="value[]" value="contact.show" @if ($role->hasPermissionTo("contact.show")) checked @endif></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>Vejledning</td> <td>Vejledning</td>
<td><p>Empty</p></td>
<td></td> <td></td>
<td><input id="GuideRAccount" onclick="if ($('#GuideR').prop('checked') == false) $('#GuideR').prop('checked', true); else $('#GuideR').prop('checked', false);" type="checkbox" name="value[]" value="guides.show" @if ($role->hasPermissionTo("guides.show")) checked @endif></td> <td><input id="GuideRAccount" onclick="if ($('#GuideR').prop('checked') == false) $('#GuideR').prop('checked', true); else $('#GuideR').prop('checked', false);" type="checkbox" name="value[]" value="guides.show" @if ($role->hasPermissionTo("guides.show")) checked @endif></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>Feedback</td> <td>Feedback</td>
<td>Empty</td>
<td><input id="FeedbackCAccount" type="checkbox" name="value[]" value="feedback.create" @if ($role->hasPermissionTo("feedback.create")) checked @endif></td> <td><input id="FeedbackCAccount" type="checkbox" name="value[]" value="feedback.create" @if ($role->hasPermissionTo("feedback.create")) checked @endif></td>
<td></td> <td></td>
<td></td> <td></td>
@ -112,22 +142,19 @@
<table class="tbl mb-2" > <table class="tbl mb-2" >
<tr> <tr>
<th>Admin-side</th> <th>Admin-side</th>
<th>Beskrivelse kan fjernes?</th> <th>Opret<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver tilladelse til at oprette Menuplaner, Aktiviteter, Brugere m.v.</span></div></th>
<th>Opret</th> <th>Se<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver tilladelse til at se alle Menuplaner, Aktiviteter, Brugere m.v.</span></div></th>
<th>Se</th> <th>Rediger<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver tilladelse til at kunne redigere Menuplaner, Aktiviteter, Brugere m.v.</span></div></th>
<th>Rediger</th> <th>Slet<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver tilladelse til at kunne slette Menuplaner, Aktiviteter, Brugere m.v.</span></div></th>
<th>Slet</th> <th>Fuld Kontrol<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver alle rettigheder som beskrevet i hhv. 'Opret', 'Se', 'Rediger' & 'Slet'</span></div></th>
<th>Fuld Kontrol</th>
</tr> </tr>
<tr> <tr>
<td>Admin Panel</td> <td>Admin Panel</td>
<td><p>Adgang til admin panelet</p></td>
<td></td> <td></td>
<td colspan="4"><input type="checkbox" name="value[]" value="admin.panel.show" @if ($role->hasPermissionTo("admin.panel.show")) checked @endif></td> <td colspan="4"><input type="checkbox" name="value[]" value="admin.panel.show" @if ($role->hasPermissionTo("admin.panel.show")) checked @endif></td>
</tr> </tr>
<tr> <tr>
<td>Brugere</td> <td>Brugere</td>
<td><p>Empty</p></td>
<td><input id="UserC" type="checkbox" name="value[]" value="user.create" @if ($role->hasPermissionTo("user.create")) checked @endif></td> <td><input id="UserC" type="checkbox" name="value[]" value="user.create" @if ($role->hasPermissionTo("user.create")) checked @endif></td>
<td><input id="UserR" type="checkbox" name="value[]" value="user.show" @if ($role->hasPermissionTo("user.show")) checked @endif></td> <td><input id="UserR" type="checkbox" name="value[]" value="user.show" @if ($role->hasPermissionTo("user.show")) checked @endif></td>
<td><input id="UserU" type="checkbox" name="value[]" value="user.edit" @if ($role->hasPermissionTo("user.edit")) checked @endif></td> <td><input id="UserU" type="checkbox" name="value[]" value="user.edit" @if ($role->hasPermissionTo("user.edit")) checked @endif></td>
@ -136,7 +163,6 @@
</tr> </tr>
<tr> <tr>
<td>Roller</td> <td>Roller</td>
<td><p>Empty</p></td>
<td><input id="RoleC" type="checkbox" name="value[]" value="roles.create" @if ($role->hasPermissionTo("roles.create")) checked @endif></td> <td><input id="RoleC" type="checkbox" name="value[]" value="roles.create" @if ($role->hasPermissionTo("roles.create")) checked @endif></td>
<td><input id="RoleR" type="checkbox" name="value[]" value="roles.show" @if ($role->hasPermissionTo("roles.show")) checked @endif></td> <td><input id="RoleR" type="checkbox" name="value[]" value="roles.show" @if ($role->hasPermissionTo("roles.show")) checked @endif></td>
<td><input id="RoleU" type="checkbox" name="value[]" value="roles.edit" @if ($role->hasPermissionTo("roles.edit")) checked @endif></td> <td><input id="RoleU" type="checkbox" name="value[]" value="roles.edit" @if ($role->hasPermissionTo("roles.edit")) checked @endif></td>
@ -145,7 +171,6 @@
</tr> </tr>
<tr> <tr>
<td>Nyheder</td> <td>Nyheder</td>
<td><p>Empty</p></td>
<td><input id="NewsC" type="checkbox" name="value[]" value="news.create" @if ($role->hasPermissionTo("news.create")) checked @endif></td> <td><input id="NewsC" type="checkbox" name="value[]" value="news.create" @if ($role->hasPermissionTo("news.create")) checked @endif></td>
<td><input id="NewsR" onclick="if ($('#NewsRAccount').prop('checked') == false) $('#NewsRAccount').prop('checked', true); else $('#NewsRAccount').prop('checked', false);" type="checkbox" name="value[]" value="news.show" @if ($role->hasPermissionTo("news.show")) checked @endif></td> <td><input id="NewsR" onclick="if ($('#NewsRAccount').prop('checked') == false) $('#NewsRAccount').prop('checked', true); else $('#NewsRAccount').prop('checked', false);" type="checkbox" name="value[]" value="news.show" @if ($role->hasPermissionTo("news.show")) checked @endif></td>
<td><input id="NewsU" type="checkbox" name="value[]" value="news.edit" @if ($role->hasPermissionTo("news.edit")) checked @endif></td> <td><input id="NewsU" type="checkbox" name="value[]" value="news.edit" @if ($role->hasPermissionTo("news.edit")) checked @endif></td>
@ -154,7 +179,6 @@
</tr> </tr>
<tr> <tr>
<td>Menuplan</td> <td>Menuplan</td>
<td><p>Empty</p></td>
<td><input id="MenuC" type="checkbox" name="value[]" value="menuplan.create" @if ($role->hasPermissionTo("menuplan.create")) checked @endif></td> <td><input id="MenuC" type="checkbox" name="value[]" value="menuplan.create" @if ($role->hasPermissionTo("menuplan.create")) checked @endif></td>
<td><input id="MenuR" onclick="if ($('#MenuRAccount').prop('checked') == false) $('#MenuRAccount').prop('checked', true); else $('#MenuRAccount').prop('checked', false);" type="checkbox" name="value[]" value="menuplan.show" @if ($role->hasPermissionTo("menuplan.show")) checked @endif></td> <td><input id="MenuR" onclick="if ($('#MenuRAccount').prop('checked') == false) $('#MenuRAccount').prop('checked', true); else $('#MenuRAccount').prop('checked', false);" type="checkbox" name="value[]" value="menuplan.show" @if ($role->hasPermissionTo("menuplan.show")) checked @endif></td>
<td><input id="MenuU" type="checkbox" name="value[]" value="menuplan.edit" @if ($role->hasPermissionTo("menuplan.edit")) checked @endif></td> <td><input id="MenuU" type="checkbox" name="value[]" value="menuplan.edit" @if ($role->hasPermissionTo("menuplan.edit")) checked @endif></td>
@ -163,7 +187,6 @@
</tr> </tr>
<tr> <tr>
<td>Aktiviteter</td> <td>Aktiviteter</td>
<td><p>Empty</p></td>
<td><input id="EventC" type="checkbox" name="value[]" value="event.create" @if ($role->hasPermissionTo("event.create")) checked @endif></td> <td><input id="EventC" type="checkbox" name="value[]" value="event.create" @if ($role->hasPermissionTo("event.create")) checked @endif></td>
<td><input id="EventR" onclick="if ($('#EventRAccount').prop('checked') == false) $('#EventRAccount').prop('checked', true); else $('#EventRAccount').prop('checked', false);" type="checkbox" name="value[]" value="event.show" @if ($role->hasPermissionTo("event.show")) checked @endif></td> <td><input id="EventR" onclick="if ($('#EventRAccount').prop('checked') == false) $('#EventRAccount').prop('checked', true); else $('#EventRAccount').prop('checked', false);" type="checkbox" name="value[]" value="event.show" @if ($role->hasPermissionTo("event.show")) checked @endif></td>
<td><input id="EventU" type="checkbox" name="value[]" value="event.edit" @if ($role->hasPermissionTo("event.edit")) checked @endif></td> <td><input id="EventU" type="checkbox" name="value[]" value="event.edit" @if ($role->hasPermissionTo("event.edit")) checked @endif></td>
@ -172,7 +195,6 @@
</tr> </tr>
<tr> <tr>
<td>Lokation</td> <td>Lokation</td>
<td><p>Empty</p></td>
<td><input id="LocationC" type="checkbox" name="value[]" value="locations.create" @if ($role->hasPermissionTo("locations.create")) checked @endif></td> <td><input id="LocationC" type="checkbox" name="value[]" value="locations.create" @if ($role->hasPermissionTo("locations.create")) checked @endif></td>
<td><input id="LocationR" type="checkbox" name="value[]" value="locations.show" @if ($role->hasPermissionTo("locations.show")) checked @endif></td> <td><input id="LocationR" type="checkbox" name="value[]" value="locations.show" @if ($role->hasPermissionTo("locations.show")) checked @endif></td>
<td><input id="LocationU" type="checkbox" name="value[]" value="locations.edit" @if ($role->hasPermissionTo("locations.edit")) checked @endif></td> <td><input id="LocationU" type="checkbox" name="value[]" value="locations.edit" @if ($role->hasPermissionTo("locations.edit")) checked @endif></td>
@ -181,7 +203,6 @@
</tr> </tr>
<tr> <tr>
<td>Vaskemaskiner</td> <td>Vaskemaskiner</td>
<td><p>Empty</p></td>
<td><input id="WashingMachineC" type="checkbox" name="value[]" value="washing.machine.create" @if ($role->hasPermissionTo("washing.machine.create")) checked @endif></td> <td><input id="WashingMachineC" type="checkbox" name="value[]" value="washing.machine.create" @if ($role->hasPermissionTo("washing.machine.create")) checked @endif></td>
<td><input id="WashingMachineR" type="checkbox" name="value[]" value="washing.machine.show" @if ($role->hasPermissionTo("washing.machine.show")) checked @endif></td> <td><input id="WashingMachineR" type="checkbox" name="value[]" value="washing.machine.show" @if ($role->hasPermissionTo("washing.machine.show")) checked @endif></td>
<td><input id="WashingMachineU" type="checkbox" name="value[]" value="washing.machine.edit" @if ($role->hasPermissionTo("washing.machine.edit")) checked @endif></td> <td><input id="WashingMachineU" type="checkbox" name="value[]" value="washing.machine.edit" @if ($role->hasPermissionTo("washing.machine.edit")) checked @endif></td>
@ -190,7 +211,6 @@
</tr> </tr>
<tr> <tr>
<td>Reservationer</td> <td>Reservationer</td>
<td>Empty</td>
<td></td> <td></td>
<td><input id="ReservationR" onclick="if ($('#ReservationRAccount').prop('checked') == false) $('#ReservationRAccount').prop('checked', true); else $('#ReservationRAccount').prop('checked', false);" type="checkbox" name="value[]" value="washing.machine.reservation.show" @if ($role->hasPermissionTo("washing.machine.reservation.show")) checked @endif></td> <td><input id="ReservationR" onclick="if ($('#ReservationRAccount').prop('checked') == false) $('#ReservationRAccount').prop('checked', true); else $('#ReservationRAccount').prop('checked', false);" type="checkbox" name="value[]" value="washing.machine.reservation.show" @if ($role->hasPermissionTo("washing.machine.reservation.show")) checked @endif></td>
<td></td> <td></td>
@ -199,7 +219,6 @@
</tr> </tr>
<tr> <tr>
<td>Kontakter</td> <td>Kontakter</td>
<td><p>Empty</p></td>
<td><input id="ContactC" type="checkbox" name="value[]" value="contact.create" @if ($role->hasPermissionTo("contact.create")) checked @endif></td> <td><input id="ContactC" type="checkbox" name="value[]" value="contact.create" @if ($role->hasPermissionTo("contact.create")) checked @endif></td>
<td><input id="ContactR" onclick="if ($('#ContactRAccount').prop('checked') == false) $('#ContactRAccount').prop('checked', true); else $('#ContactRAccount').prop('checked', false);" type="checkbox" name="value[]" value="contact.show" @if ($role->hasPermissionTo("contact.show")) checked @endif></td> <td><input id="ContactR" onclick="if ($('#ContactRAccount').prop('checked') == false) $('#ContactRAccount').prop('checked', true); else $('#ContactRAccount').prop('checked', false);" type="checkbox" name="value[]" value="contact.show" @if ($role->hasPermissionTo("contact.show")) checked @endif></td>
<td><input id="ContactU" type="checkbox" name="value[]" value="contact.edit" @if ($role->hasPermissionTo("contact.edit")) checked @endif></td> <td><input id="ContactU" type="checkbox" name="value[]" value="contact.edit" @if ($role->hasPermissionTo("contact.edit")) checked @endif></td>
@ -208,7 +227,6 @@
</tr> </tr>
<tr> <tr>
<td>Vejledning</td> <td>Vejledning</td>
<td><p>Empty</p></td>
<td><input id="GuideC" type="checkbox" name="value[]" value="guides.create" @if ($role->hasPermissionTo("guides.create")) checked @endif></td> <td><input id="GuideC" type="checkbox" name="value[]" value="guides.create" @if ($role->hasPermissionTo("guides.create")) checked @endif></td>
<td><input id="GuideR" onclick="if ($('#GuideRRAccount').prop('checked') == false) $('#GuideRAccount').prop('checked', true); else $('#GuideRAccount').prop('checked', false);" type="checkbox" name="value[]" value="guides.show" @if ($role->hasPermissionTo("guides.show")) checked @endif></td> <td><input id="GuideR" onclick="if ($('#GuideRRAccount').prop('checked') == false) $('#GuideRAccount').prop('checked', true); else $('#GuideRAccount').prop('checked', false);" type="checkbox" name="value[]" value="guides.show" @if ($role->hasPermissionTo("guides.show")) checked @endif></td>
<td><input id="GuideU" type="checkbox" name="value[]" value="guides.edit" @if ($role->hasPermissionTo("guides.edit")) checked @endif></td> <td><input id="GuideU" type="checkbox" name="value[]" value="guides.edit" @if ($role->hasPermissionTo("guides.edit")) checked @endif></td>
@ -217,7 +235,6 @@
</tr> </tr>
<tr> <tr>
<td>Feedback</td> <td>Feedback</td>
<td><p>Empty</p></td>
<td></td> <td></td>
<td><input id="FeedbackR" onclick="if ($('#FeedbackRAccount').prop('checked') == false) $('#FeedbackRAccount').prop('checked', true); else $('#FeedbackRAccount').prop('checked', false);" type="checkbox" name="value[]" value="feedback.show" @if ($role->hasPermissionTo("feedback.show")) checked @endif></td> <td><input id="FeedbackR" onclick="if ($('#FeedbackRAccount').prop('checked') == false) $('#FeedbackRAccount').prop('checked', true); else $('#FeedbackRAccount').prop('checked', false);" type="checkbox" name="value[]" value="feedback.show" @if ($role->hasPermissionTo("feedback.show")) checked @endif></td>
<td></td> <td></td>

View File

@ -21,7 +21,7 @@
<label hidden id="erroremail">Der findes allerede en bruger med denne email!</label> <label hidden id="erroremail">Der findes allerede en bruger med denne email!</label>
<input type="email" name="email" id="email" placeholder="x@y.z" required> <input type="email" name="email" id="email" placeholder="x@y.z" required>
<label for="password1">Adgangskode:</label> <label for="password1">Adgangskode:</label>
<label hidden id="errornotsamepass" for="errormesseages" >Der stod ikke det samme i `Adgangskode` & `Bekræft Adgangskode`!</label> <label hidden id="errornotsamepass" for="errormesseages" >Der stod ikke det samme i Adgangskode & Bekræft Adgangskode!</label>
<div class="input-group text-left"> <div class="input-group text-left">
<input type="password" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" title="Adgangskoden skal indeholde mindst et tal, et lille bogstav, et stort bogstav og have en minimumslængde på 8 karakterer" class="form-control" name="password" id="password1" placeholder="******" required> <input type="password" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" title="Adgangskoden skal indeholde mindst et tal, et lille bogstav, et stort bogstav og have en minimumslængde på 8 karakterer" class="form-control" name="password" id="password1" placeholder="******" required>
<span class="fa fa-fw fa-eye field-icon toggle-password" id="fa-new" onclick="show('password1', 'fa-new')"></span> <span class="fa fa-fw fa-eye field-icon toggle-password" id="fa-new" onclick="show('password1', 'fa-new')"></span>

View File

@ -12,7 +12,7 @@
<form action="{{ route("users.forgot") }}" method="post"> <form action="{{ route("users.forgot") }}" method="post">
@csrf @csrf
<input class="appinput" type="email" name="email" placeholder="Email" required> <input class="appinput" type="email" name="email" placeholder="Email" required>
<input class="btn btn-dark" type="submit" value="Send reset mail"> <input class="btn btn-dark" type="submit" value="Reset Password">
<button class="btn btn-dark" onclick="window.location.href = '{{ route("users.login") }}';">Tilbage</button> <button class="btn btn-dark" onclick="window.location.href = '{{ route("users.login") }}';">Tilbage</button>
</form> </form>
</main> </main>

View File

@ -73,7 +73,7 @@
<input class="checkbox-inline" type="checkbox" id="rolle" name="checkbox"value="rolle"> <input class="checkbox-inline" type="checkbox" id="rolle" name="checkbox"value="rolle">
<label for="rolle">Rolle</label> <label for="rolle">Rolle</label>
</div> </div>
<div id="showHideCheckboxs" style="margin-bottom: -38px"> <div id="showHideCheckboxs" style="margin-bottom: -36px">
</div> </div>
<table class="tbl mt-2"> <table class="tbl mt-2">

View File

@ -10,11 +10,11 @@
<p>1.0</p> <p>1.0</p>
<h4 class="mb-0 mt-1">{{__("msg.omappen")}}:</h4> <h4 class="mb-0 mt-1">{{__("msg.omappen")}}:</h4>
<p>{{__("msg.infoomappen")}}</p> <p>{{__("msg.infoomappen")}}</p>
<h4 class="mb-1 mt-1">{{__("msg.programmedby")}}:</h4> <!--<h4 class="mb-1 mt-1">{{__("msg.programmedby")}}:</h4>
<span style="margin-bottom: 0.2rem;"><span style="float: left;">Anders Rasmussen,</span><span style="float: right;">anders164a@gmail.com</span></span> <span style="margin-bottom: 0.2rem;"><span style="float: left;">Anders Rasmussen,</span><span style="float: right;">anders164a@gmail.com</span></span>
<span style="margin-bottom: 0.2rem;">Frederik Milling Pytlick,<span style="float: right;">frederikpyt@gmail.com</span></span> <span style="margin-bottom: 0.2rem;">Frederik Milling Pytlick,<span style="float: right;">frederikpyt@gmail.com</span></span>
<span style="margin-bottom: 0.2rem;">Vedran Zelen,<span style="float: right;">zelenvedran@gmail.com</span></span> <span style="margin-bottom: 0.2rem;">Vedran Zelen,<span style="float: right;">zelenvedran@gmail.com</span></span>
<span style="margin-bottom: 0.2rem;">Victor Neerholt,<span style="float: right;">victorneerholt@gmail.com</span></span> <span style="margin-bottom: 0.2rem;">Victor Neerholt,<span style="float: right;">victorneerholt@gmail.com</span></span>
<span style="margin-bottom: 0.2rem;">Sebastian Davaris,<span style="float: right;">sebastian@davaris.dk</span></span> <span style="margin-bottom: 0.2rem;">Sebastian Davaris,<span style="float: right;">sebastian@davaris.dk</span></span>-->
</main> </main>
@endsection @endsection

View File

@ -11,15 +11,49 @@
} }
</style> </style>
<main style="min-height: calc(100% - 61.34px)" class="text-center"> <main style="min-height: calc(100% - 61.34px)" class="text-center">
<form action="{{ action('FeedbackController@store') }}" method="post" style="margin-top: 4rem; margin-bottom: auto;"> <div method="post" style="margin-top: 4rem; margin-bottom: auto; max-width: 100%; padding: 0 0.45rem 0 0.45rem; display: flex; flex-direction: column; justify-content: center;">
@csrf @csrf
<span>Ris el. Ros?</span> <span>Ris el. Ros?</span>
<select name="suggestion_form" class="mb-2" required> <select id="suggestion_form" name="suggestion_form" class="mb-2" required>
<option selected>Ros</option> <option selected>Ros</option>
<option>Ris</option> <option>Ris</option>
</select> </select>
<textarea name="message" placeholder="Skriv Ris/Ros besked her" style="resize: vertical;" required></textarea> <span>Besked:</span>
<button type="submit" class="btn btn-sde-blue mt-2">Send Ris/Ros</button> <textarea id="message" name="message" placeholder="Skriv Ris/Ros besked her" style="resize: vertical;" required></textarea>
</form> <button onclick="ajaxCall(document.getElementById('suggestion_form'), document.getElementById('message'))" class="btn btn-sde-blue mt-2">Send Ris/Ros</button>
</div>
<div id="snackbar"></div>
</main> </main>
@endsection @endsection
@section("scripts")
<script type="text/javascript">
function snackbar(data) {
var x = document.getElementById("snackbar");
x.innerHTML = data;
x.className = "show";
setTimeout(function(){ x.className = x.className.replace("show", ""); }, 5000);
}
function ajaxCall(suggestion_form, message) {
var SF = suggestion_form.value
var M = message.value
if(SF != '' && M != '') {
axios.post("{{ route("feedbacks.storeajax") }}",
{
suggestion_form: SF,
message: M
}
).then(function (response) {
snackbar('{{__("msg.feedbacksendt")}}');
message.value = "";
}).catch(function (error) {
console.log(error);
});
} else {
snackbar('{{__("msg.feedbackerror")}}');
}
}
</script>
@endsection

View File

@ -76,7 +76,6 @@
@endif @endif
border-bottom: 1px solid rgba(0, 0, 0, .1); border-bottom: 1px solid rgba(0, 0, 0, .1);
width: 100%; width: 100%;
height: 25px;
} }
.information2{ .information2{
@ -87,7 +86,6 @@
background-color: rgba(240,240,240,0.8); background-color: rgba(240,240,240,0.8);
@endif @endif
width: 100%; width: 100%;
height: 25px;
} }
.card > .img > a > img, .card > .img > img { .card > .img > a > img, .card > .img > img {

View File

@ -12,8 +12,7 @@
<form action="{{ route('users.forgot') }}" method="post"> <form action="{{ route('users.forgot') }}" method="post">
@csrf @csrf
<input class="appinput" type="email" name="email" placeholder="Email" required> <input class="appinput" type="email" name="email" placeholder="Email" required>
{!! session()->get('errornosuchuser') !!} <input class="btn btn-dark" type="submit" value="Reset Password">
<input class="btn btn-dark" type="submit" value="Send reset mail">
<a class="btn btn-dark text-center" onclick="window.history.back()">Tilbage</a> <a class="btn btn-dark text-center" onclick="window.history.back()">Tilbage</a>
</form> </form>
</main> </main>

View File

@ -26,6 +26,7 @@
{!! session()->get('error#wrongcredentials') !!} {!! session()->get('error#wrongcredentials') !!}
{!! session()->get('success#loggedout') !!} {!! session()->get('success#loggedout') !!}
<input class="btn btn-dark" type="submit" value="Sign in"> <input class="btn btn-dark" type="submit" value="Sign in">
<button type="button" class="btn btn-dark" onclick="location.href = '{{ route("users.signup") }}'" style="line-height: 2rem;">Register</button>
</form> </form>
<a class="text-white text-center" href="{{ route('users.show-forgot') }}">Forgot password?</a> <a class="text-white text-center" href="{{ route('users.show-forgot') }}">Forgot password?</a>
</main> </main>

View File

@ -5,51 +5,99 @@
@endsection @endsection
@section("content") @section("content")
<style>
img{
margin-top: 30%;
}
</style>
<main style="background-color: #00788a; height: 100%;"> <main style="background-color: #00788a; height: 100%;">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<div class="brand"> <div class="brand">
<img src="{{URL::asset('/images/logos/Logo-hvid.svg')}}" alt="Syddansk Erhvervsskole"> <img src="{{URL::asset('/images/logos/Logo-hvid.svg')}}" alt="Syddansk Erhvervsskole">
</div> </div>
<form action="{{ route("users.store") }}" method="post"> <form action="{{ route("users.signupStore") }}" method="post" onsubmit="return checkInputs()">
@csrf @csrf
<label hidden id="erroremail">E-mail already exists</label>
<label hidden id="errornotsamepass" for="errormesseages">Password dosen't match</label>
<label hidden id="errorphone">Phone number already in use</label>
<input class="appinput" type="text" name="name_first" placeholder="Firstname" required> <input class="appinput" type="text" name="name_first" placeholder="Firstname" required>
<input class="appinput" type="text" name="name_last" placeholder="Lastname" required> <input class="appinput" type="text" name="name_last" placeholder="Lastname" required>
<input class="appinput" type="email" name="email" placeholder="E-mail" required> <input class="appinput" type="email" id="email" name="email" placeholder="E-mail" required>
<input class="appinput" type="password" name="password" id="password1" placeholder="Password" required> <input class="appinput" type="password" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" title="Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters" name="password" id="password1" placeholder="Password" required>
<label hidden id="errornotsamepass" for="errormesseages">Password dosen't match</label>
<input class="appinput" type="password" name="password2" id="password2" placeholder="Confirm password" required> <input class="appinput" type="password" name="password2" id="password2" placeholder="Confirm password" required>
<input class="appinput" type="tel" name="phone" placeholder="Phone number" required> <input class="appinput" type="tel" id="phone" name="phone" placeholder="Phone number" pattern="[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}" required style="margin-bottom: 1.5rem;">
<label style="color: white">Education end date:</label> <!--<label style="color: white">Education end date:</label>
<input class="appinput" type="date" name="eduenddate" placeholder="Education end date" required> <input class="appinput" type="date" name="eduenddate" placeholder="Education end date" required>-->
<!--Koncept--> <!--Koncept-->
<label style="color: white" for="edu">Education:</label> <!--<label style="color: white" for="edu">Education:</label>
<select style="color: white" name="edu" id="edu"> <select style="color: white" name="edu" id="edu">
<option value="datapro">Datatekniker med programmering</option> <option value="datapro">Datatekniker med programmering</option>
<option value="datainf">Datatekniker med infrastruktur</option> <option value="datainf">Datatekniker med infrastruktur</option>
<option value="dataits">Datatekniker med IT-Support</option> <option value="dataits">Datatekniker med IT-Support</option>-->
<!--<option value="saab">Murer</option> <!--<option value="saab">Murer</option>
<option value="opel">Tømmer</option> <option value="opel">Tømmer</option>
<option value="audi">Maler</option>--> <option value="audi">Maler</option>-->
</select> <!--</select>-->
<!--Koncept--> <!--Koncept-->
<input class="btn btn-dark" type="submit" id="disable" value="Sign up"> <input class="btn btn-dark" type="submit" id="disable" value="Sign up">
<input onclick="window.history.back()" class="btn btn-dark text-center " value="Back">
</form> </form>
<button onclick="window.history.back()" class="btn btn-dark" >Back</button>
</main> </main>
<script> <script>
$(function() {
$('form').areYouSure(
{
message: 'It looks like you have been editing something. '
+ 'If you leave before saving, your changes will be lost.'
}
);
});
function checkInputs() {
var save = true;
$mail = $('#email').val();
$phone = $('#phone').val();
$.ajax({
'async': false,
type: 'get',
url: '{{route('users.nameCheck')}}',
data: {'mailCheck':$mail, 'phoneCheck':$phone},
success:function (data) {
if (data == 'both') {
$("#erroremail").show(100);
$("#erroremail").css('color', 'red');
$("#errorphone").show(100);
$("#errorphone").css('color', 'red');
save = false;
} else if(data == 'email'){
$("#errorphone").hide();
$("#erroremail").show(100);
$("#erroremail").css('color', 'red');
save = false;
} else if (data == 'phone') {
$("#erroremail").hide();
$("#errorphone").show(100);
$("#errorphone").css('color', 'red');
save = false;
} else {
$("#errorphone").hide();
$("#erroremail").hide();
}
},
error:function (data) {
console.log(data);
}
});
// If passwords is not the same. Then show an error message and make save false
if ($('#password1').val() != $('#password2').val()) { if ($('#password1').val() != $('#password2').val()) {
$("#errornotsamepass").show(100); $("#errornotsamepass").show(100);
$("#errornotsamepass").css('color', 'red'); $("#errornotsamepass").css('color', 'red');
$("#disable").prop('disabled', true); save = false;
} else } else
$("#errornotsamepass").hide(); $("#errornotsamepass").hide();
if (save)
return true;
else
return false;
}
</script> </script>
@endsection @endsection

View File

@ -40,7 +40,9 @@ Route::get("/about", "AboutController@index")->name("about.index");
Route::post("/events/cancelsignup", "UserEventController@createajaxcancel")->name("userevents.createajaxcancel"); Route::post("/events/cancelsignup", "UserEventController@createajaxcancel")->name("userevents.createajaxcancel");
Route::post("/account/cancelmailwants", "UserController@createajaxcancel")->name("users.createajaxcancel"); Route::post("/account/cancelmailwants", "UserController@createajaxcancel")->name("users.createajaxcancel");
Route::delete("/notifications/delete", "EventController@deleteNotifications")->name("notifications.delete"); Route::delete("/notifications/delete", "EventController@deleteNotifications")->name("notifications.delete");
//Route::get("/signup", "UserController@signup")->name("users.signup"); Route::post("/feedbacks/store", "FeedbackController@storeajax")->name("feedbacks.storeajax");
Route::get("/signup", "UserController@signup")->name("users.signup");
Route::post("/signupStore", "UserController@signupStore")->name("users.signupStore");
//Search/Filter //Search/Filter
Route::get("/contactsapi", "ContactController@search")->name("contacts.search"); Route::get("/contactsapi", "ContactController@search")->name("contacts.search");