FEATURE #1431: add template edit
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
@if (session('success'))
|
||||
<div data-alert class="callout success">
|
||||
<strong>{{ session('success') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (session('error'))
|
||||
<div data-alert class="callout alert">
|
||||
<strong>{{ session('error') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (!$isWritable)
|
||||
<div data-alert class="callout warning">
|
||||
@lang('admin/templates.notWritable', ['file' => $path->path])
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form action="{{route('templates.postEdit', ['id' => $template->id])}}" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
<div class="row">
|
||||
<div class="column large-8">
|
||||
<div style="height: 30em">
|
||||
@include('admin.snippets.aceEditor', [
|
||||
'value' => old('templateContent', $templateContent),
|
||||
'theme' => 'xcode',
|
||||
'mode' => 'html',
|
||||
'name' => 'templateContent'
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="column large-4">
|
||||
<label>
|
||||
@lang('admin/templates.name')
|
||||
|
||||
<input type="text" name="name" value="{{old('name', $template->name)}}" />
|
||||
</label>
|
||||
|
||||
<label>
|
||||
@lang('admin/templates.description')
|
||||
|
||||
<textarea name="description" rows="3">{{old('description', $template->description)}}</textarea>
|
||||
</label>
|
||||
|
||||
<button type="submit" class="button success">
|
||||
@lang('admin/templates.edit', ['name' => $template->template_name])
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user