FEATURE: move contactform into own repository
This commit is contained in:
+136
@@ -0,0 +1,136 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<input type="text" name="title" required class="form-control slug-source"
|
||||
placeholder="@lang('admin/contents.field_title')"
|
||||
value="{{old('title', $page->title)}}" />
|
||||
|
||||
@include('admin.snippets.hasError', ['field' => 'title'])
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
|
||||
<input type="text" name="url" required class="form-control slug-target"
|
||||
placeholder="@lang('admin/contents.field_url')"
|
||||
value="{{old('url', $page->url)}}" />
|
||||
|
||||
@include('admin.snippets.hasError', ['field' => 'url'])
|
||||
</div>
|
||||
<div class="col-lg-2 text-center">
|
||||
<div>
|
||||
<label class="label-control">
|
||||
<input class="checkbox" value="1" id="lockUrl"
|
||||
@if(old('lockUrl') || ($page->id > 0 && \Illuminate\Support\Str::slug($page->title) != $page->url)) checked
|
||||
@endif name="lockUrl" type="checkbox">
|
||||
<span>@lang('admin/contents.lockUrl')</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<select class="form-control" name="status">
|
||||
@foreach($contentStatuses as $status => $translation)
|
||||
<option value="{{$status}}" @if(old('status', $page->status) == $status) selected @endif>
|
||||
{{$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="categoryId">
|
||||
<option value="">@lang('admin/contents.noCategory')</option>
|
||||
@foreach($categories as $category)
|
||||
<option value="{{$category->id}}"
|
||||
@if($category->id == old('categoryId', $page->categoryId)) selected @endif>
|
||||
{{str_repeat(' - ', $category->real_depth)}} {{$category->name}}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<h2>@lang('contactform::admin/content.contactInformation')</h2>
|
||||
|
||||
<div class="row">
|
||||
<div class="column col-lg-6">
|
||||
|
||||
<label class="label-control">
|
||||
@lang('contactform::admin/content.email')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="email" name="email" value="{{$page->moduleSettings['email'] or ''}}" />
|
||||
|
||||
<label class="label-control">
|
||||
@lang('contactform::admin/content.phone')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="tel" name="phone" value="{{$page->moduleSettings['phone'] or ''}}" />
|
||||
|
||||
<label class="label-control">
|
||||
@lang('contactform::admin/content.compName')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="text" name="companyName"
|
||||
value="{{$page->moduleSettings['companyName'] or ''}}" />
|
||||
|
||||
<label class="label-control">
|
||||
@lang('contactform::admin/content.address')
|
||||
</label>
|
||||
|
||||
<textarea rows="3" class="form-control" name="address">{{$page->moduleSettings['address'] or ''}}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="column col-lg-6">
|
||||
<label class="label-control">
|
||||
@lang('contactform::admin/content.contactEmail')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="email" name="contactEmail"
|
||||
value="{{$page->moduleSettings['contactEmail'] or \Auth::user()->email}}" />
|
||||
|
||||
<label class="label-control">
|
||||
@lang('contactform::admin/content.subject')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="text" name="subject"
|
||||
value="{{$page->moduleSettings['subject'] or trans('contactform::admin/content.defaultSubject')}}" />
|
||||
|
||||
<div class="row">
|
||||
<div class="column col-lg-6">
|
||||
<label class="label-control">
|
||||
@lang('contactform::admin/content.gpsLat')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="text" value="{{$page->moduleSettings['gpsLat'] or ''}}"
|
||||
name="gpsLat" />
|
||||
</div>
|
||||
<div class="column col-lg-6">
|
||||
<label class="label-control">
|
||||
@lang('contactform::admin/content.gpsLng')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="text" value="{{$page->moduleSettings['gpsLng'] or ''}}"
|
||||
name="gpsLng" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
<textarea name="pageContent" id="pageContent" class="wysiwyg-editor">
|
||||
{{old('pageContent', $page->content)}}
|
||||
</textarea>
|
||||
+19
@@ -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-10">
|
||||
@include('contactform::admin.widgets.address.form', ['action' => route('widgets.postEdit', ['id' => $widget->id])])
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
@widgetPreview($widget)
|
||||
</div>
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
<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>
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', @trans('contactform::admin/widgets.address.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.address.form', ['action' => route('widgets.postNew', ['type' => $type])])
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
+19
@@ -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
|
||||
|
||||
+17
@@ -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>
|
||||
+14
@@ -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