FEATURE: add template for widget with contact form
This commit is contained in:
@@ -3,6 +3,7 @@ namespace Templates\DobrotyZPece\Providers;
|
||||
|
||||
use App\Helpers\Template;
|
||||
use Illuminate\Support\Facades\App;
|
||||
use Modules\ContactForm\Widgets\Form\Presenter as ContactFormWidgetPresenter;
|
||||
use Templates\Base\OnePage\Widgets\OnePageMenu\Presenter;
|
||||
use Templates\DobrotyZPece\Shortcodes\Column;
|
||||
use Webwizo\Shortcodes\Facades\Shortcode;
|
||||
@@ -15,7 +16,6 @@ class ServiceProvider extends \Illuminate\Support\ServiceProvider {
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function boot() {
|
||||
@@ -25,5 +25,6 @@ class ServiceProvider extends \Illuminate\Support\ServiceProvider {
|
||||
Shortcode::register('column', Column::class);
|
||||
|
||||
Presenter::$template = Template::name('snippets.menu');
|
||||
ContactFormWidgetPresenter::$template = Template::name('snippets.widgets.contactForm');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<div class="contact-form-widget {{$widget->container_class}}"
|
||||
@if($widget->container_id) id="{{$widget->container_id}}" @endif>
|
||||
<form action="{{route('email.send', ['id' => $form->id])}}" method="post" class="col s12">
|
||||
{!! csrf_field() !!}
|
||||
|
||||
<h5>Kontaktujte nás</h5>
|
||||
<div class="input-field s12">
|
||||
<input id="name" type="text" name="name" class="validate">
|
||||
<label for="name">Vaše jméno</label>
|
||||
</div>
|
||||
<div class="input-field s12">
|
||||
<input id="email" type="email" name="email" class="validate">
|
||||
<label for="email">Váš e-mail</label>
|
||||
</div>
|
||||
<div class="input-field s12">
|
||||
<textarea name="message" id="message" class="materialize-textarea validate"></textarea>
|
||||
<label for="message">Obsah vaší zprávy</label>
|
||||
</div>
|
||||
<button class="btn orange waves-effect waves-light" type="submit" name="action">Odeslat
|
||||
<i class="material-icons right"></i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
Reference in New Issue
Block a user