mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-26 21:21:18 -08:00
hm ok this kind of works
This commit is contained in:
parent
21906d8c27
commit
f3ad89931f
|
@ -161,7 +161,7 @@ class AssetModelsController extends Controller
|
|||
if ($this->shouldAddDefaultValues($request->input())) {
|
||||
if (!$this->assignCustomFieldsDefaultValues($model, $request->input('default_values'))) {
|
||||
//return redirect()->back()->withInput()->with('error', trans('admin/custom_fields/message.fieldset_default_value.error'));
|
||||
return redirect()->back()->withErrors($this->validatorErrors);
|
||||
return redirect()->back()->withInput()->withErrors($this->validatorErrors);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -487,7 +487,8 @@ class AssetModelsController extends Controller
|
|||
$validator = Validator::make($data, $rules);
|
||||
|
||||
if($validator->fails()){
|
||||
$this->validatorErrors = $validator->messages();
|
||||
$this->validatorErrors = $validator->errors();
|
||||
dump($this->validatorErrors);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<span>
|
||||
@dump($errors)
|
||||
<div class="form-group{{ $errors->has('custom_fieldset') ? ' has-error' : '' }}">
|
||||
<label for="custom_fieldset" class="col-md-3 control-label">
|
||||
{{ trans('admin/models/general.fieldset') }}
|
||||
|
@ -17,11 +18,10 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
@if ($add_default_values)
|
||||
@if ($add_default_values || $errors->count() > 0)
|
||||
@if ($this->fields)
|
||||
|
||||
@foreach ($this->fields as $field)
|
||||
@dump($errors)
|
||||
@if($errors->has($field->db_column_name()))
|
||||
"poop"
|
||||
@endif
|
||||
|
|
Loading…
Reference in a new issue