Guides - Fixed

Contact - Added phonetimes
This commit is contained in:
Anders 2020-08-05 09:43:53 +02:00
parent 91f7a4aa05
commit f988967c22
5 changed files with 14 additions and 52 deletions

View File

@ -61,13 +61,14 @@ class ContactController extends Controller
]); ]);
$contact = new Contact($requestContact); $contact = new Contact($requestContact);
$contact->phonetimes = $request->phonetimes;
$saved = $contact->save(); $saved = $contact->save();
if(!$saved){ if(!$saved){
return Response::detect("contacts.store"); return redirect()->route("contacts.store");
}else{ }else{
$contact = Contact::query()->paginate($request->input("limit", 20)); $contact = Contact::query()->paginate($request->input("limit", 20));
return Response::detect("contacts.index", ['contacts' => $contact]); return redirect()->route("contacts.index", ['contacts' => $contact]);
} }
} }
@ -112,10 +113,10 @@ class ContactController extends Controller
$saved = $contact->save(); $saved = $contact->save();
if(!$saved){ if(!$saved){
return Response::detect("contacts.update", [ "contacts" => $contact ]); return redirect()->route("contacts.update", [ "contacts" => $contact ]);
}else{ }else{
$contact = Contact::query()->paginate($request->input("limit", 20)); $contact = Contact::query()->paginate($request->input("limit", 20));
return Response::detect("contacts.index", ['contacts' => $contact]); return redirect()->route("contacts.index", ['contacts' => $contact]);
} }
} }

View File

@ -113,10 +113,10 @@ class GuideController extends Controller
$saved = $guidee->save(); $saved = $guidee->save();
if(!$saved){ if(!$saved){
return Response::detect("guides.update", [ "guide" => $guide ]); return redirect()->route("guides.update", [ "guide" => $guide ]);
}else{ }else{
$guide = Guide::query()->paginate($request->input("limit", 20)); $guide = Guide::query()->paginate($request->input("limit", 20));
return Response::detect("guides.index", ['guides' => $guide]); return redirect()->route("guides.index", ['guides' => $guide]);
} }
} }

View File

@ -28,7 +28,7 @@
<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="tel">Telefon nr:</label> <label for="tel">Telefon nr:</label>
<input type="tel" name="phone" id="tel" placeholder="12345678" pattern="[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}" required> <input type="tel" name="phone" id="tel" placeholder="12345678" pattern="[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}" required>
<label for="teltimes">Telefon tider: (Forblives blank, hvis der ikke er nogen bestemte tider)</label> <label for="teltimes">Telefon tider: (Forblives blank, hvis der ikke er nogen bestemte tider) - Brug Shift+Enter for at teksten vises lige neden under hinanden hjemmesiden</label>
<textarea name="phonetimes" id="editor"></textarea> <textarea name="phonetimes" id="editor"></textarea>
<input type="submit" class="btn btn-dark text-white" value="Opret"> <input type="submit" class="btn btn-dark text-white" value="Opret">
</form> </form>
@ -36,7 +36,7 @@
<script> <script>
ClassicEditor ClassicEditor
.create( document.querySelector( '#editor' ), { .create( document.querySelector( '#editor' ), {
toolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote' ], toolbar: [ 'heading', '|', 'bold', 'italic', 'link' ],
heading: { heading: {
options: [ options: [
{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' }, { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },

View File

@ -29,15 +29,15 @@
<input type="email" name="email" id="email" placeholder="x@y.z" value="{{ $contact->email }}" required> <input type="email" name="email" id="email" placeholder="x@y.z" value="{{ $contact->email }}" required>
<label for="tel">Telefon nr:</label> <label for="tel">Telefon nr:</label>
<input type="tel" name="phone" id="tel" placeholder="12345678" value="{{ $contact->phone }}" pattern="[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}" required> <input type="tel" name="phone" id="tel" placeholder="12345678" value="{{ $contact->phone }}" pattern="[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}" required>
<label for="teltimes">Telefon tider: (Forblives blank, hvis der ikke er nogen bestemte tider)</label> <label for="teltimes">Telefon tider: (Forblives blank, hvis der ikke er nogen bestemte tider) - Brug Shift+Enter for at teksten vises lige neden under hinanden hjemmesiden</label>
<textarea name="phonetimes" id="editor">{{ $contact->phonetimes }}</textarea> <textarea name="phonetimes" id="editor">{{ $contact->phonetimes }}</textarea>
<input type="submit" class="btn btn-dark text-white" value="Opret"> <input type="submit" class="btn btn-dark text-white" value="Rediger">
</form> </form>
<script> <script>
ClassicEditor ClassicEditor
.create( document.querySelector( '#editor' ), { .create( document.querySelector( '#editor' ), {
toolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote' ], toolbar: [ 'heading', '|', 'bold', 'italic', 'link' ],
heading: { heading: {
options: [ options: [
{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' }, { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },

View File

@ -5,10 +5,10 @@
@section("content") @section("content")
<main> <main>
<h1 class="text-center sde-blue mt-0">Kontakt</h1> <h1 class="text-center sde-blue mt-0 mb-0">Kontakt</h1>
@if(!$contacts->isEmpty()) @if(!$contacts->isEmpty())
@foreach($contacts as $contact) @foreach($contacts as $contact)
<h4 class="mt-0">Navn: {{ $contact->contactname }}</h4> <h4 class="mt-2">Navn: {{ $contact->contactname }}</h4>
<h4 class="mt-0">Email: {{ $contact->email }}</h4> <h4 class="mt-0">Email: {{ $contact->email }}</h4>
<h4 class="mt-0">{{ $contact->title }}</h4> <h4 class="mt-0">{{ $contact->title }}</h4>
@if($contact->phonetimes) @if($contact->phonetimes)
@ -21,45 +21,6 @@
@else @else
<p class="text-center">Der er ingen kontakter!</p> <p class="text-center">Der er ingen kontakter!</p>
@endif @endif
<h1 class="text-center sde-blue mt-0">Kontakt</h1>
<h4 class="mt-0">Navn: Claus Trasbo</h4>
<h4 class="mt-0">Email: ctr@sde.dk</h4>
<h4 class="mt-0">Forstander for Erhvervskollegiet</h4>
<span class="text-center sde-black-20 mt-1">+45 40 88 65 15 og +45 63 12 65 15</span>
<a class="btn text-center btn-sde-blue mt-1" href="tel:+4540886515">Ring</a>
<h4 class="mt-2">Navn: Birgitte True</h4>
<h4 class="mt-0">Email: bit@sde.dk</h4>
<h4 class="mt-0">Telefontid:</h4>
<h4 class="mt-0">Mandag-Torsdag kl. 8.00-15.00</h4>
<h4 class="mt-0">Fredag kl. 8.00-12.00</h4>
<span class="text-center sde-black-20 mt-1">+45 63 12 67 15</span>
<a class="btn text-center btn-sde-blue mt-1" href="tel:+4563126715">Ring</a>
<h4 class="mt-2">Navn: Thomas Thomsen</h4>
<h4 class="mt-0">Email: thth@sde.dk</h4>
<h4 class="mt-0">Kollegieassistent</h4>
<span class="text-center sde-black-20 mt-1">+45 24 62 94 50</span>
<a class="btn text-center btn-sde-blue mt-1" href="tel:+4524629450">Ring</a>
<h4 class="mt-2">Navn: Anja Holm Brix</h4>
<h4 class="mt-0">Email: ahb@sde.dk</h4>
<h4 class="mt-0">Kollegieassistent</h4>
<span class="text-center sde-black-20 mt-1">+45 24 62 94 50</span>
<a class="btn text-center btn-sde-blue mt-1" href="tel:+4524629450">Ring</a>
<h4 class="mt-2">Navn: Britta Overgaard Brink Olsen</h4>
<h4 class="mt-0">Email: brio@sde.dk</h4>
<h4 class="mt-0">Kollegieassistent</h4>
<span class="text-center sde-black-20 mt-1">+45 24 62 94 50</span>
<a class="btn text-center btn-sde-blue mt-1" href="tel:+4524629450">Ring</a>
<h4 class="mt-2">Navn: Jesper Sandberg</h4>
<h4 class="mt-0">Email: jesa@sde.dk</h4>
<h4 class="mt-0">Kollegieassistent</h4>
<span class="text-center sde-black-20 mt-1">+45 24 62 94 50</span>
<a class="btn text-center btn-sde-blue mt-1" href="tel:+4524629450">Ring</a>
<span class="text-center sde-black-20 mt-1">Send feedback omkring hvem el. hvad som helst</span> <span class="text-center sde-black-20 mt-1">Send feedback omkring hvem el. hvad som helst</span>
<a class="btn text-center btn-sde-blue mt-1" href="{{ route('feedbacks.create') }}">Giv Feedback</a> <a class="btn text-center btn-sde-blue mt-1" href="{{ route('feedbacks.create') }}">Giv Feedback</a>
</main> </main>