mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
submitting form after capturing/formatting fixes
This commit is contained in:
parent
734af87f2f
commit
f1cc2c8d8b
|
@ -9,6 +9,7 @@ class SavedReportsController extends Controller
|
||||||
//a method to the madness
|
//a method to the madness
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
dd($request->all());
|
dd($request->all());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -361,41 +361,47 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<a href="#" class="btn btn-primary">
|
<div style=padding-bottom:5px>
|
||||||
{{ trans('admin/reports/general.apply_and_generate') }}</a><br>
|
<a href="#" class="btn btn-primary">
|
||||||
<form method="post" id="savetemplateform" action="{{ route("savedreports/store") }}">
|
{{ trans('admin/reports/general.apply_and_generate') }}</a>
|
||||||
@csrf
|
</div>
|
||||||
<input type="hidden" id="savetemplateoptions">
|
<div style=padding-bottom:5px>
|
||||||
<button class = "btn btn-primary">
|
<form method="post" id="savetemplateform" action="{{ route("savedreports/store") }}">
|
||||||
{{ trans('admin/reports/general.save_template') }}
|
@csrf
|
||||||
</button>
|
<input type="hidden" id="savetemplateoptions" name="options">
|
||||||
</form>
|
<button class = "btn btn-primary">
|
||||||
<br>
|
{{ trans('admin/reports/general.save_template') }}
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" tabindex="-1">
|
</button>
|
||||||
{{ trans('admin/reports/general.select_template') }}
|
</form>
|
||||||
|
</div>
|
||||||
|
<div style=padding-bottom:5px>
|
||||||
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" tabindex="-1" style="border:1px solid black">
|
||||||
|
{{ trans('admin/reports/general.select_template') }}
|
||||||
<strong class="caret"></strong>
|
<strong class="caret"></strong>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
@foreach($saved_reports as $report)
|
@foreach($saved_reports as $report)
|
||||||
<li>
|
<li>
|
||||||
{{ $report->name }}
|
{{ $report->name }}
|
||||||
</li>
|
</li>
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</ul>
|
||||||
{{ $fieldname = $report->name }}
|
</div>
|
||||||
<select class="js-data-ajax" data-endpoint="locations" data-placeholder="{{ trans('admin/reports/general.select_template') }}" name="{{ $fieldname }}" style="width: 100%" id="{{ $fieldname }}_location_select" aria-label="{{ $fieldname }}" {!! ((isset($item)) && (Helper::checkIfRequired($item, $fieldname))) ? ' data-validation="required" required' : '' !!}{{ (isset($multiple) && ($multiple=='true')) ? " multiple='multiple'" : '' }}>
|
|
||||||
@if ($report->name!='')
|
{{-- {{ $fieldname = $report->name }}--}}
|
||||||
<option value="{{ $fieldname }}" selected="selected" role="option" aria-selected="true" role="option">
|
{{-- <select class="js-data-ajax" data-endpoint="locations" data-placeholder="{{ trans('admin/reports/general.select_template') }}" name="{{ $fieldname }}" style="width: 100%" id="{{ $fieldname }}_location_select" aria-label="{{ $fieldname }}" {!! ((isset($item)) && (Helper::checkIfRequired($item, $fieldname))) ? ' data-validation="required" required' : '' !!}{{ (isset($multiple) && ($multiple=='true')) ? " multiple='multiple'" : '' }}>--}}
|
||||||
@foreach($saved_reports as $report)
|
{{-- @if ($report->name!='')--}}
|
||||||
<li>
|
{{-- <option value="{{ $fieldname }}" selected="selected" role="option" aria-selected="true" role="option">--}}
|
||||||
{{ $report->name }}
|
{{-- @foreach($saved_reports as $report)--}}
|
||||||
</li>
|
{{-- <li>--}}
|
||||||
@endforeach
|
{{-- {{ $report->name }}--}}
|
||||||
</option>
|
{{-- </li>--}}
|
||||||
@else
|
{{-- @endforeach--}}
|
||||||
<option value="" role="option">{{ trans('admin/reports/general.select_template') }}</option>
|
{{-- </option>--}}
|
||||||
@endif
|
{{-- @else--}}
|
||||||
</select>
|
{{-- <option value="" role="option">{{ trans('admin/reports/general.select_template') }}</option>--}}
|
||||||
|
{{-- @endif--}}
|
||||||
|
{{-- </select>--}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -447,7 +453,7 @@
|
||||||
|
|
||||||
$("#savetemplateoptions").val(elements)
|
$("#savetemplateoptions").val(elements)
|
||||||
// set hidden input to variable
|
// set hidden input to variable
|
||||||
// submit the form
|
e.currentTarget.submit();
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue