Ekapp/skolehjem/resources/views/admin/contacts/create.blade.php

66 lines
2.4 KiB
PHP
Raw Normal View History

2020-06-29 08:31:24 +00:00
@extends("admin.layout.base")
@extends("admin.layout.header")
@section("title")
Kontakter - Opret
@endsection
@section("path")
2020-06-30 09:38:28 +00:00
<a href="{{ route('contacts.create') }}" class="text-white">Opret Kontakt</a> /
2020-06-29 08:31:24 +00:00
@endsection
@section("content")
<style>
.ck-editor__main {
margin-bottom: 1rem;
}
</style>
<script src="https://cdn.ckeditor.com/ckeditor5/21.0.0/classic/ckeditor.js"></script>
2020-06-29 08:31:24 +00:00
<h1>Opret Kontakt:</h1>
2020-08-11 08:39:22 +00:00
<form name="contact" method="post" action="{{ route("contacts.store") }}">
2020-06-29 08:31:24 +00:00
@csrf
2020-07-27 11:34:45 +00:00
<label for="contactname">Kontakt Navn:</label>
<input type="text" name="contactname" id="contactname" placeholder="Navn" required>
<label for="title">Titel:</label>
<input type="text" name="title" id="title" placeholder="Titel" required>
2020-06-29 08:31:24 +00:00
<label for="email">Email:</label>
<input type="email" name="email" id="email" placeholder="x@y.z" required>
<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}">
<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>
2020-06-29 08:31:24 +00:00
<input type="submit" class="btn btn-dark text-white" value="Opret">
</form>
<script>
ClassicEditor
.create( document.querySelector( '#editor' ), {
toolbar: [ 'heading', '|', 'bold', 'italic', 'link' ],
heading: {
options: [
{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
{ model: 'heading1', view: 'h3', title: 'Heading 1', class: 'sde-blue' },
{ model: 'heading2', view: 'h4', title: 'Heading 2', class: 'sde-blue' }
]
}
} )
.catch( error => {
console.log( error );
} );
</script>
2020-06-29 08:31:24 +00:00
@endsection
2020-08-11 08:39:22 +00:00
@section("scripts")
<script>
$(function() {
$('form').areYouSure(
2020-08-11 08:39:22 +00:00
{
message: 'It looks like you have been editing something. '
+ 'If you leave before saving, your changes will be lost.'
}
);
});
</script>
@endsection