From 44ade932404deb40724612074b0a8ab368a86279 Mon Sep 17 00:00:00 2001
From: frederikpyt <frederikpyt@gmail.com>
Date: Tue, 18 Aug 2020 07:49:00 +0200
Subject: [PATCH] v0.10.3 - Fixed darkmode css on
 app/washing-reservations/create.blade.php. Fixed frontend file upload
 valdiation. Fixed analytics

---
 .../views/admin/events/create.blade.php       |  2 +-
 .../views/admin/guides/create.blade.php       |  2 +-
 .../resources/views/admin/index.blade.php     | 41 ++++++++-----------
 .../views/admin/menuplans/create.blade.php    |  2 +-
 .../views/app/users/editpic.blade.php         |  2 +-
 .../app/washing-reservations/create.blade.php |  6 +++
 6 files changed, 26 insertions(+), 29 deletions(-)

diff --git a/skolehjem/resources/views/admin/events/create.blade.php b/skolehjem/resources/views/admin/events/create.blade.php
index fcb8e7f..f393f50 100644
--- a/skolehjem/resources/views/admin/events/create.blade.php
+++ b/skolehjem/resources/views/admin/events/create.blade.php
@@ -43,7 +43,7 @@
                 </span>
         </label>
         <label id="fileuploadee"for="fileuploade">Baggrundsbillede til nyheden (Valgfri):</label>
-        <input id="fileuploade" type="file" name="resource">
+        <input id="fileuploade" type="file" name="resource" accept="image/*">
 
         <input id="disable" type="submit" class="btn btn-dark text-white" value="Opret">
     </form>
diff --git a/skolehjem/resources/views/admin/guides/create.blade.php b/skolehjem/resources/views/admin/guides/create.blade.php
index 9a24b23..8a6ccda 100644
--- a/skolehjem/resources/views/admin/guides/create.blade.php
+++ b/skolehjem/resources/views/admin/guides/create.blade.php
@@ -38,7 +38,7 @@
                 </span>
         </label>
         <label id="fileuploadee"for="fileuploade">Baggrundsbillede til nyheden (Valgfri):</label>
-        <input id="fileuploade" type="file" name="resource">
+        <input id="fileuploade" type="file" name="resource" accept="image/*">
         <input type="submit" id="disable" class="btn btn-dark text-white" value="Opret">
     </form>
 
diff --git a/skolehjem/resources/views/admin/index.blade.php b/skolehjem/resources/views/admin/index.blade.php
index 6ba6fc4..e1d6683 100644
--- a/skolehjem/resources/views/admin/index.blade.php
+++ b/skolehjem/resources/views/admin/index.blade.php
@@ -82,31 +82,22 @@
         </table>
         @if(\App\Event::query()->orderByDesc("date")->first() !== null)
             <div class="event_card">
-                @if(\App\Event::query()->orderByDesc("date")->first()->resource_id !== null)
-                    <div class="header" style="padding-top: 0">
-                        <table class="tbl mt-0">
-                            <tr>
-                                <td><label>Event navn</label></td>
-                                <td>{{ \App\Event::query()->orderByDesc("date")->first()->name }}</td>
-                            </tr>
-                            <tr>
-                                <td><label>Event ansvarlig</label></td>
-                                <td>{{__('msg.af')}}: {{ \App\Event::query()->orderByDesc("date")->first()->accountable }}</td>
-                            </tr>
-                            <tr>
-                                <td><label>Tidspunkt</label></td>
-                                <td>{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime(\App\Event::query()->orderByDesc("date")->first()->date))->format('d/m/Y \k\l\. H:i') }}</td>
-                            </tr>
-                        </table>
-                    </div>
-                @else
-                    <div class="header">
-                        <h3>{{ \App\Event::query()->orderByDesc("date")->first()->name }}</h3>
-                        <p class="text-center mt-0">Af: {{ \App\Event::query()->orderByDesc("date")->first()->accountable }}</p>
-                        <p class="text-center mt-0">{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime(\App\Event::query()->orderByDesc("date")->first()->date))->format('d/m/Y \k\l\. H:i') }}</p>
-                    </div>
-                @endif
-
+                <div class="header" style="padding-top: 0">
+                    <table class="tbl mt-0">
+                        <tr>
+                            <td><label>Event navn</label></td>
+                            <td>{{ \App\Event::query()->orderByDesc("date")->first()->name }}</td>
+                        </tr>
+                        <tr>
+                            <td><label>Event ansvarlig</label></td>
+                            <td>{{__('msg.af')}}: {{ \App\Event::query()->orderByDesc("date")->first()->accountable }}</td>
+                        </tr>
+                        <tr>
+                            <td><label>Tidspunkt</label></td>
+                            <td>{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime(\App\Event::query()->orderByDesc("date")->first()->date))->format('d/m/Y \k\l\. H:i') }}</td>
+                        </tr>
+                    </table>
+                </div>
                 <div class="container" style="margin-top: 8px;">
                      <table style="border: 1px solid lightgrey; width: 100%;">
                          <tr>
diff --git a/skolehjem/resources/views/admin/menuplans/create.blade.php b/skolehjem/resources/views/admin/menuplans/create.blade.php
index 64f2600..7f73e28 100644
--- a/skolehjem/resources/views/admin/menuplans/create.blade.php
+++ b/skolehjem/resources/views/admin/menuplans/create.blade.php
@@ -45,7 +45,7 @@
         </label>
 
         <label id="fileuploadee"for="fileuploade">Baggrundsbillede til nyheden (Valgfri):</label>
-        <input id="fileuploade" type="file" name="resource">
+        <input id="fileuploade" type="file" name="resource" accept="image/*">
 
 
         <input type="submit" id="disable" class="btn btn-dark text-white" value="Opret Menuplan">
diff --git a/skolehjem/resources/views/app/users/editpic.blade.php b/skolehjem/resources/views/app/users/editpic.blade.php
index ad1f2b5..a4ddefa 100644
--- a/skolehjem/resources/views/app/users/editpic.blade.php
+++ b/skolehjem/resources/views/app/users/editpic.blade.php
@@ -22,7 +22,7 @@
             @endif
 
             <span>{{__('msg.profilbillede')}}:</span>
-            <input type="file" name="resource">
+            <input type="file" name="resource" accept="image/*">
             <button type="submit" class="btn text-center btn-sde-blue mt-1">{{__('msg.ændrer')}}</button>
             <a onclick="window.history.back()" class="btn text-center btn-sde-blue mt-1">{{__('msg.tilbage')}}</a>
         </form>
diff --git a/skolehjem/resources/views/app/washing-reservations/create.blade.php b/skolehjem/resources/views/app/washing-reservations/create.blade.php
index 9eb9f85..965fe64 100644
--- a/skolehjem/resources/views/app/washing-reservations/create.blade.php
+++ b/skolehjem/resources/views/app/washing-reservations/create.blade.php
@@ -5,6 +5,11 @@
 @endsection
 
 @section("content")
+    <style>
+        option {
+            color: black;
+        }
+    </style>
     <main style="justify-content: unset">
         <h1 class="text-center sde-blue mb-0">{{__('msg.bookingliste')}}</h1>
         {!! session()->get('ReservationExists') !!}
@@ -200,6 +205,7 @@
 
                     button.id = "create-reservation";
                     button.innerText = "{{__('msg.reserver')}}";
+                    button.classList.add("btn", "btn-sde-blue")
                     button.type = "submit";
 
                     container.appendChild(button);