form.blade.php
1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<form {!! $attributes !!} name="my_form">
<div class="box-body fields-group">
@foreach($fields as $field)
{!! $field->render() !!}
@endforeach
</div>
@if ($method != 'GET')
<input type="hidden" name="_token" value="{{ csrf_token() }}">
@endif
<!-- /.box-body -->
@if(count($buttons) > 0)
<div class="box-footer">
<div class="col-md-{{$width['label']}}"></div>
<div class="col-md-{{$width['field']}}">
@if(in_array('reset', $buttons))
<div class="btn-group pull-left">
<button type="reset" class="btn btn-warning pull-right">{{ trans('admin.reset') }}</button>
</div>
@endif
@if(in_array('submit', $buttons))
<div class="btn-group pull-right">
<button type="submit" class="btn btn-info pull-right" onclick="submitForm()">{{ trans('admin.submit') }}</button>
</div>
@endif
</div>
</div>
@endif
</form>
<script>
function submitForm()
{
// document.my_form.submit();
// alert(1);
}
</script>