FEATURE: add widget for displaying contact form
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', @trans('contactform::admin/widgets.address.edit'))
|
||||
@section('pageDescription', $widget->description)
|
||||
|
||||
@section('content')
|
||||
|
||||
@if(!count($forms))
|
||||
<div class="alert alert-warning">@lang('contactform::admin/widgets.noContactForms')</div>
|
||||
@else
|
||||
<div class="col-md-8">
|
||||
@include('contactform::admin.widgets.form.form', ['action' => route('widgets.postEdit', ['id' => $widget->id])])
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
@widgetPreview($widget)
|
||||
</div>
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<form action="{{$action}}" method="POST">
|
||||
@include('admin.widgets.snippets.commonForm')
|
||||
|
||||
<label class="label-control">
|
||||
@lang('contactform::admin/widgets.selectContactForm')
|
||||
</label>
|
||||
|
||||
<select class="form-control" name="contactFormId">
|
||||
@foreach($forms as $form)
|
||||
<option @if(old('contactFormId', isset($widget->settings->contactFormId) ? $widget->settings->contactFormId : '') == $form->id) selected @endif value="{{$form->id}}">{{$form->title}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<button type="submit" class="btn btn-primary">
|
||||
@lang('widgets/htmlCode.save')
|
||||
</button>
|
||||
</form>
|
||||
@@ -0,0 +1,14 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', @trans('contactform::admin/widgets.form.new'))
|
||||
@section('pageDescription', @trans($type->description))
|
||||
|
||||
@section('content')
|
||||
|
||||
@if(!count($forms))
|
||||
<div class="alert alert-warning">@lang('contactform::admin/widgets.noContactForms')</div>
|
||||
@else
|
||||
@include('contactform::admin.widgets.form.form', ['action' => route('widgets.postNew', ['type' => $type])])
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user