Change validation to controllers and partial

This commit is contained in:
Joseph Cohen
2015-01-09 20:21:29 -06:00
parent 996aceadcf
commit f47fb9823e
22 changed files with 117 additions and 208 deletions
+1 -10
View File
@@ -13,16 +13,7 @@
<div class="content-wrapper">
<div class="row">
<div class="col-sm-12">
@if($savedComponent = Session::get('savedComponent'))
<div class="alert alert-{{ $savedComponent->isValid() ? 'success' : 'danger' }}">
@if($savedComponent->isValid())
{{ sprintf("<strong>%s</strong> %s", trans('dashboard.notifications.awesome'), trans('dashboard.components.edit.success')) }}
@else
{{ sprintf("<strong>%s</strong> %s", trans('dashboard.notifications.whoops'), trans('dashboard.components.edit.failure').' '.$component->getErrors()) }}
@endif
</div>
@endif
@include('partials.dashboard.errors')
<form name="EditComponentForm" class="form-vertical" role="form" action="/dashboard/components/{{ $component->id }}/edit" method="POST">
<fieldset>
<div class="form-group">