FEATURE: rewrite contact form admin into new theme
This commit is contained in:
@@ -123,10 +123,11 @@ class ContactForm extends Handler
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'basicInfo' => 'contactform::admin.form.basicInfo',
|
'basicInfo' => 'contactform::admin.form.basicInfo',
|
||||||
|
'content' => 'contactform::admin.form.content',
|
||||||
'meta' => 'admin.content.formParts.metaInformation',
|
'meta' => 'admin.content.formParts.metaInformation',
|
||||||
'appearance' => 'admin.content.formParts.appearance',
|
'appearance' => 'admin.content.formParts.appearance',
|
||||||
'publication' => 'admin.content.formParts.publicationSetup',
|
'publication' => 'admin.content.formParts.publicationSetup',
|
||||||
'content' => 'contactform::admin.form.content',
|
'files' => 'admin.content.formParts.files',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,132 +1,135 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="columns large-6">
|
<div class="col-lg-6">
|
||||||
<label>
|
<input type="text" name="title" required class="form-control slug-source"
|
||||||
@lang('admin/contents.field_title')
|
placeholder="@lang('admin/contents.field_title')"
|
||||||
|
value="{{old('title', $page->title)}}" />
|
||||||
|
|
||||||
<input type="text" name="title" class="slug-source" placeholder="@lang('admin/contents.field_title')"
|
@include('admin.snippets.hasError', ['field' => 'title'])
|
||||||
value="{{old('title', $page->title)}}" />
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="columns large-4">
|
<div class="col-lg-4">
|
||||||
<label>
|
|
||||||
@lang('admin/contents.field_url')
|
|
||||||
|
|
||||||
<input type="text" name="url" class="slug-target" placeholder="@lang('admin/contents.field_url')"
|
<input type="text" name="url" required class="form-control slug-target"
|
||||||
value="{{old('url', $page->url)}}" />
|
placeholder="@lang('admin/contents.field_url')"
|
||||||
|
value="{{old('url', $page->url)}}" />
|
||||||
|
|
||||||
@if (isset($errors) && $errors->has('url'))
|
@include('admin.snippets.hasError', ['field' => 'url'])
|
||||||
<div class="callout alert">
|
|
||||||
{{ $errors->first('url') }}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="column large-2 text-center">
|
<div class="col-lg-2 text-center">
|
||||||
<label>
|
<div>
|
||||||
@lang('admin/contents.lockUrl')<br />
|
<label class="label-control">
|
||||||
|
<input class="checkbox" value="1" id="lockUrl"
|
||||||
<input type="checkbox" value="1" id="lockUrl" @if(old('lockUrl') || ($page->id > 0 && \Illuminate\Support\Str::slug($page->title) != $page->url)) checked @endif name="lockUrl" />
|
@if(old('lockUrl') || ($page->id > 0 && \Illuminate\Support\Str::slug($page->title) != $page->url)) checked
|
||||||
</label>
|
@endif name="lockUrl" type="checkbox">
|
||||||
|
<span>@lang('admin/contents.lockUrl')</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="columns large-6">
|
<div class="col-lg-6">
|
||||||
<label>
|
<select class="form-control" name="status">
|
||||||
<select name="status">
|
@foreach($contentStatuses as $status => $translation)
|
||||||
@foreach($contentStatuses as $status => $translation)
|
<option value="{{$status}}" @if(old('status', $page->status) == $status) selected @endif>
|
||||||
<option value="{{$status}}" @if(old('status', $page->status) == $status) selected @endif>
|
{{$translation}}
|
||||||
{{$translation}}
|
</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
|
||||||
|
@include('admin.snippets.hasError', ['field' => 'status'])
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<select class="form-control" name="parentPage">
|
||||||
|
<option value="">@lang('admin/contents.noParentPage')</option>
|
||||||
|
|
||||||
|
@foreach($rootPages as $rootPage)
|
||||||
|
<option value="{{$rootPage->id}}"
|
||||||
|
@if(old('parent_page', $page->parent_id) == $rootPage->id) selected @endif>
|
||||||
|
{{$rootPage->title}}
|
||||||
|
</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
|
||||||
|
@include('admin.snippets.hasError', ['field' => 'parentPage'])
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@if($module->support_categories && count($categories))
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<select class="form-control" name="category">
|
||||||
|
<option value="">@lang('admin/contents.noCategory')</option>
|
||||||
|
@foreach($categories as $category)
|
||||||
|
<option value="{{$category->id}}"
|
||||||
|
@if($category->id == old('category', $page->category_id)) selected @endif>
|
||||||
|
{{str_repeat(' - ', $category->real_depth)}} {{$category->name}}
|
||||||
</option>
|
</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</div>
|
||||||
|
@endif
|
||||||
@if (isset($errors) && $errors->has('status'))
|
|
||||||
<div class="callout alert">
|
|
||||||
{{ $errors->first('status') }}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
<div class="column large-6">
|
|
||||||
<label>
|
|
||||||
<select name="parentPage">
|
|
||||||
<option value="">@lang('admin/contents.noParentPage')</option>
|
|
||||||
|
|
||||||
@foreach($rootPages as $rootPage)
|
|
||||||
<option value="{{$rootPage->id}}"
|
|
||||||
@if(old('parent_page', $page->parent_id) == $rootPage->id) selected @endif>
|
|
||||||
{{$rootPage->title}}
|
|
||||||
</option>
|
|
||||||
@endforeach
|
|
||||||
</select>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
@if (isset($errors) && $errors->has('parentPage'))
|
|
||||||
<div class="callout alert">
|
|
||||||
{{ $errors->first('parentPage') }}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>@lang('contactform::admin/content.contactInformation')</h2>
|
<h2>@lang('contactform::admin/content.contactInformation')</h2>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="column large-6">
|
<div class="column col-lg-6">
|
||||||
|
|
||||||
<label>
|
<label class="label-control">
|
||||||
@lang('contactform::admin/content.email')
|
@lang('contactform::admin/content.email')
|
||||||
|
|
||||||
<input type="email" name="email" value="{{$page->module_settings->email or ""}}" />
|
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<input class="form-control" type="email" name="email" value="{{$page->module_settings->email or ""}}" />
|
||||||
|
|
||||||
|
<label class="label-control">
|
||||||
@lang('contactform::admin/content.phone')
|
@lang('contactform::admin/content.phone')
|
||||||
|
|
||||||
<input type="tel" name="phone" value="{{$page->module_settings->phone or ""}}" />
|
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<input class="form-control" type="tel" name="phone" value="{{$page->module_settings->phone or ""}}" />
|
||||||
|
|
||||||
|
<label class="label-control">
|
||||||
@lang('contactform::admin/content.compName')
|
@lang('contactform::admin/content.compName')
|
||||||
|
|
||||||
<input type="text" name="companyName" value="{{$page->module_settings->companyName or ""}}" />
|
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<input class="form-control" type="text" name="companyName"
|
||||||
|
value="{{$page->module_settings->companyName or ""}}" />
|
||||||
|
|
||||||
|
<label class="label-control">
|
||||||
@lang('contactform::admin/content.address')
|
@lang('contactform::admin/content.address')
|
||||||
|
|
||||||
<textarea rows="3" name="address">{{$page->module_settings->address or ""}}</textarea>
|
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
<textarea rows="3" class="form-control" name="address">{{$page->module_settings->address or ""}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="column large-6">
|
<div class="column col-lg-6">
|
||||||
<label>
|
<label class="label-control">
|
||||||
@lang('contactform::admin/content.contactEmail')
|
@lang('contactform::admin/content.contactEmail')
|
||||||
|
|
||||||
<input type="email" name="contactEmail" value="{{$page->module_settings->contactEmail or \Auth::user()->email}}" />
|
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<input class="form-control" type="email" name="contactEmail"
|
||||||
|
value="{{$page->module_settings->contactEmail or \Auth::user()->email}}" />
|
||||||
|
|
||||||
|
<label class="label-control">
|
||||||
@lang('contactform::admin/content.subject')
|
@lang('contactform::admin/content.subject')
|
||||||
|
|
||||||
<input type="text" name="subject" value="{{$page->module_settings->subject or trans('contactform::admin/content.defaultSubject')}}" />
|
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
<input class="form-control" type="text" name="subject"
|
||||||
|
value="{{$page->module_settings->subject or trans('contactform::admin/content.defaultSubject')}}" />
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="column large-6">
|
<div class="column col-lg-6">
|
||||||
<label>
|
<label class="label-control">
|
||||||
@lang('contactform::admin/content.gpsLat')
|
@lang('contactform::admin/content.gpsLat')
|
||||||
|
|
||||||
<input type="text" value="{{$page->module_settings->gpsLat or ""}}" name="gpsLat" />
|
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
<input class="form-control" type="text" value="{{$page->module_settings->gpsLat or ""}}"
|
||||||
|
name="gpsLat" />
|
||||||
</div>
|
</div>
|
||||||
<div class="column large-6">
|
<div class="column col-lg-6">
|
||||||
<label>
|
<label class="label-control">
|
||||||
@lang('contactform::admin/content.gpsLng')
|
@lang('contactform::admin/content.gpsLng')
|
||||||
|
|
||||||
<input type="text" value="{{$page->module_settings->gpsLng or ""}}" name="gpsLng" />
|
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
<input class="form-control" type="text" value="{{$page->module_settings->gpsLng or ""}}"
|
||||||
|
name="gpsLng" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,10 +1,3 @@
|
|||||||
<div class="row">
|
<textarea name="pageContent" id="pageContent" class="wysiwyg-editor">
|
||||||
<div class="columns large-12">
|
{{old('pageContent', $page->content)}}
|
||||||
<label>
|
</textarea>
|
||||||
<textarea name="pageContent" id="pageContent" class="wysiwyg-editor">
|
|
||||||
{{old('pageContent', $page->content)}}
|
|
||||||
</textarea>
|
|
||||||
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
Reference in New Issue
Block a user