FEATURE: add displaying errors
This commit is contained in:
@@ -42,17 +42,33 @@
|
||||
|
||||
<input type="text" name="url" placeholder="@lang('staticpages::admin.field_url')"
|
||||
value="{{old('url')}}" />
|
||||
|
||||
@if (isset($errors) && $errors->has('url'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('url') }}
|
||||
</div>
|
||||
@endif
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<select name="status">
|
||||
@foreach($contentStatuses as $status => $translation)
|
||||
<option value="{{$status}}" @if($selectedStatus == $status) selected @endif>{{$translation}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<label>
|
||||
<select name="status">
|
||||
@foreach($contentStatuses as $status => $translation)
|
||||
<option value="{{$status}}" @if($selectedStatus== $status) selected @endif>
|
||||
{{$translation}}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</label>
|
||||
|
||||
@if (isset($errors) && $errors->has('status'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('status') }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -60,8 +76,9 @@
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<label>
|
||||
<textarea placeholder="@lang('staticpages::admin.content')" name="pageContent" id="pageContent"
|
||||
class="wysiwyg-editor">{{old('pageContent')}}</textarea>
|
||||
<textarea name="pageContent" id="pageContent" class="wysiwyg-editor">
|
||||
{{old('pageContent')}}
|
||||
</textarea>
|
||||
|
||||
</label>
|
||||
</div>
|
||||
@@ -75,6 +92,12 @@
|
||||
|
||||
<input type="datetime" name="published_from" value="{{old('published_from')}}"
|
||||
placeholder="@lang('staticpages::admin.field_published_from')" />
|
||||
|
||||
@if (isset($errors) && $errors->has('published_from'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('published_from') }}
|
||||
</div>
|
||||
@endif
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@@ -84,6 +107,12 @@
|
||||
|
||||
<input type="datetime" name="published_to" value="{{old('published_to')}}"
|
||||
placeholder="@lang('staticpages::admin.field_published_to')" />
|
||||
|
||||
@if (isset($errors) && $errors->has('published_to'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('published_to') }}
|
||||
</div>
|
||||
@endif
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -129,8 +158,6 @@
|
||||
<script src="{{asset('../resources/assets/js/vendor/trumbowyg/trumbowyg.min.js')}}"></script>
|
||||
|
||||
<script type="application/javascript">
|
||||
$(document).ready(function () {
|
||||
$('#pageContent').trumbowyg();
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
Reference in New Issue
Block a user