Skip to content

Commit

Permalink
stacks for each form input #443
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed Aug 4, 2018
1 parent ab867e2 commit 7b206fb
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 0 deletions.
4 changes: 4 additions & 0 deletions resources/views/partials/form/checkbox_group.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@stack($name . '_input_start')

<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}">
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
<br/>
Expand All @@ -8,3 +10,5 @@
@endforeach
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
</div>

@stack($name . '_input_end')
4 changes: 4 additions & 0 deletions resources/views/partials/form/email_group.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@stack($name . '_input_start')

<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}">
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
<div class="input-group">
Expand All @@ -6,3 +8,5 @@
</div>
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
</div>

@stack($name . '_input_end')
4 changes: 4 additions & 0 deletions resources/views/partials/form/file_group.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
@stack($name . '_input_start')

<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}" style="min-height: 59px">
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
{!! Form::file($name, array_merge(['class' => 'form-control'], $attributes)) !!}
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
</div>

@stack($name . '_input_end')
4 changes: 4 additions & 0 deletions resources/views/partials/form/number_group.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@stack($name . '_input_start')

<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}">
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
<div class="input-group">
Expand All @@ -6,3 +8,5 @@
</div>
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
</div>

@stack($name . '_input_end')
4 changes: 4 additions & 0 deletions resources/views/partials/form/password_group.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@stack($name . '_input_start')

<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}">
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
<div class="input-group">
Expand All @@ -6,3 +8,5 @@
</div>
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
</div>

@stack($name . '_input_end')
4 changes: 4 additions & 0 deletions resources/views/partials/form/radio_group.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@stack($name . '_input_start')

<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}">
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
<div class="input-group">
Expand All @@ -14,3 +16,5 @@
</div>
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
</div>

@stack($name . '_input_end')
4 changes: 4 additions & 0 deletions resources/views/partials/form/save_buttons.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
@stack('save_buttons_start')

<div class="{{ $col }}">
<div class="form-group no-margin">
{!! Form::button('<span class="fa fa-save"></span> &nbsp;' . trans('general.save'), ['type' => 'submit', 'class' => 'btn btn-success']) !!}
<a href="{{ url($cancel) }}" class="btn btn-default"><span class="fa fa-times-circle"></span> &nbsp;{{ trans('general.cancel') }}</a>
</div>
</div>

@stack('save_buttons_end')
4 changes: 4 additions & 0 deletions resources/views/partials/form/select_group.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@stack($name . '_input_start')

<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : ''}}">
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
<div class="input-group">
Expand All @@ -6,3 +8,5 @@
</div>
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
</div>

@stack($name . '_input_end')
4 changes: 4 additions & 0 deletions resources/views/partials/form/text_group.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@stack($name . '_input_start')

<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}">
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
<div class="input-group">
Expand All @@ -6,3 +8,5 @@
</div>
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
</div>

@stack($name . '_input_end')
4 changes: 4 additions & 0 deletions resources/views/partials/form/textarea_group.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
@stack($name . '_input_start')

<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}">
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
{!! Form::textarea($name, $value, array_merge(['class' => 'form-control', 'placeholder' => trans('general.form.enter', ['field' => $text])], $attributes)) !!}
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
</div>

@stack($name . '_input_end')

0 comments on commit 7b206fb

Please sign in to comment.