FEATURE: move contactform into own repository
This commit is contained in:
Executable
+9
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
return [
|
||||
"contactForm" => "Kontaktní formulář",
|
||||
"emails" => "E-mailové šablony",
|
||||
"new" => "Nový",
|
||||
"overview" => "Všechny formuláře",
|
||||
"sentMessages" => "Zprávy",
|
||||
"templatePath" => "Kontaktní formulář",
|
||||
];
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
return [
|
||||
"address" => "Adresa",
|
||||
"compName" => "Jméno zobrazené nad adresou",
|
||||
"contactEmail" => "E-mail, kam budou doručovány zprávy z tohoto formuláře",
|
||||
"contactInformation" => "Kontaktní informace",
|
||||
"content" => "Obsah kontaktního formuláře",
|
||||
"defaultSubject" => "Nová zpráva z kontaktního formuláře",
|
||||
"email" => "E-mail",
|
||||
"emailList" => "Odesílat zprávy na tyto adresy",
|
||||
"gpsLat" => "GPS šířka",
|
||||
"gpsLng" => "GPS délka",
|
||||
"phone" => "Kontaktní telefon",
|
||||
"subject" => "Předmět zprávy",
|
||||
];
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
return [
|
||||
"columnAddress" => "Adresa",
|
||||
"columnCompanyName" => "Jméno společnosti",
|
||||
"columnContactEmail" => "Kontaktní e-mail",
|
||||
"columnEmail" => "E-mail",
|
||||
"columnGpsLat" => "GPS šířka",
|
||||
"columnGpsLng" => "GPS délka",
|
||||
"columnPhone" => "Telefon",
|
||||
"columnSubject" => "Předmět",
|
||||
];
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
return [
|
||||
"address" => [
|
||||
"description" => "Malý widget určený pro zobrazení adresy, která byla uložena u vybraného kontaktního formuláře.",
|
||||
"edit" => "Upravuji blok s adresou",
|
||||
"name" => "Blok s adresou",
|
||||
"new" => "Nový blok s adresou",
|
||||
],
|
||||
"form" => [
|
||||
"description" => "Widget pro zobrazení kontaktního formuláře kdekoliv na webu - v obsahu stránky, menu, patičce, ...",
|
||||
"name" => "Kontaktní formulář",
|
||||
"new" => "Nový widget s kontaktním formulářem",
|
||||
],
|
||||
"noContactForms" => "Vypadá to, že v systému nebyl vytvořen žádný kontaktní formulář. Z toho důvodu není možné vytvořit ani tento widget. Vytvořte nejprve nějaký kontaktní formulář a pak opakujte tento pokus.",
|
||||
"selectContactForm" => "Vybrat kontaktní formulář",
|
||||
];
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
return [
|
||||
"allForms" => "Všechny formuláře",
|
||||
"description" => "Jednoduchý kontaktní formulář",
|
||||
"editForm" => "Upravuji formulář",
|
||||
"name" => "Kontaktní formulář",
|
||||
"newForm" => "Vytvořit nový kontaktní formulář",
|
||||
];
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
return [
|
||||
'contactForm' => 'Contact form',
|
||||
'new' => 'New',
|
||||
'overview' => 'All contact forms',
|
||||
'sentMessages' => 'Messages',
|
||||
'templatePath' => 'Contact form',
|
||||
'emails' => 'E-mail templates',
|
||||
];
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
return [
|
||||
'content' => 'Contact form content',
|
||||
'address' => 'Address',
|
||||
'emailList' => 'Send emails to these addresses',
|
||||
'gpsLat' => 'GPS latitude',
|
||||
'gpsLng' => 'GPS longitude',
|
||||
'compName' => 'Name displayed above address',
|
||||
'phone' => 'Contact phone',
|
||||
'email' => 'E-mail',
|
||||
'contactEmail' => 'E-mail, where messages from this form will be delivered',
|
||||
'contactInformation' => 'Contact information',
|
||||
'subject' => 'Subject',
|
||||
'defaultSubject' => 'New message from contact form'
|
||||
];
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
return [
|
||||
'columnPhone' => 'Phone',
|
||||
'columnAddress' => 'Address',
|
||||
'columnEmail' => 'E-mail',
|
||||
'columnContactEmail' => 'Contact E-mail',
|
||||
'columnSubject' => 'Subject',
|
||||
'columnCompanyName' => 'Company name',
|
||||
'columnGpsLat' => 'GPS Latitude',
|
||||
'columnGpsLng' => 'Gps Longitude',
|
||||
];
|
||||
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
return [
|
||||
'address' => [
|
||||
'name' => 'Address block',
|
||||
'description' => 'Small widget for displaying address saved in selected contact form.',
|
||||
'new' => 'New address block',
|
||||
'edit' => 'Editing address block'
|
||||
],
|
||||
'form' => [
|
||||
'name' => 'Contact form',
|
||||
'description' => 'Display small contact form anywhere on website.',
|
||||
'new' => 'New contact form widget'
|
||||
],
|
||||
'noContactForms' => 'You have not created any contact form. Try to create one before creating this widget.',
|
||||
'selectContactForm' => 'Select contact form'
|
||||
];
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
return [
|
||||
'name' => 'Contact form',
|
||||
'description' => 'Simple contact form',
|
||||
'allForms' => 'All contact forms',
|
||||
'newForm' => 'Create new contact form',
|
||||
'editForm' => 'Editing contact form'
|
||||
];
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
return [
|
||||
"contactForm" => "Kontaktný formulár",
|
||||
"new" => "Nový",
|
||||
"overview" => "Všetky formuláre",
|
||||
"sentMessages" => "Správy",
|
||||
"templatePath" => "Kontaktný formulár",
|
||||
];
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
return [
|
||||
"address" => "Adresa",
|
||||
"compName" => "Názov zobrazený nad adresou",
|
||||
"contactEmail" => "E-mail, kam budú doručované správy z tohoto formulára",
|
||||
"contactInformation" => "Kontaktné informácie",
|
||||
"content" => "Obsah kontaktného formulára",
|
||||
"defaultSubject" => "Nová správa z kontaktného formulára",
|
||||
"email" => "E-mail",
|
||||
"emailList" => "Odosielať správy na tieto adresy",
|
||||
"gpsLat" => "GPS šírka",
|
||||
"gpsLng" => "GPS dĺžka",
|
||||
"phone" => "Kontaktný telefón",
|
||||
"subject" => "Predmet správy",
|
||||
];
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
return [
|
||||
"columnAddress" => "Adresa",
|
||||
"columnCompanyName" => "Názov spoločnosti",
|
||||
"columnContactEmail" => "Kontaktný e-mail",
|
||||
"columnEmail" => "E-mail",
|
||||
"columnGpsLat" => "GPS šírka",
|
||||
"columnGpsLng" => "GPS dĺžka",
|
||||
"columnPhone" => "Telefón",
|
||||
"columnSubject" => "Predmet",
|
||||
];
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
return [
|
||||
"description" => "Jednoduchý kontaktný formulár",
|
||||
"name" => "Kontaktný formulár",
|
||||
];
|
||||
+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