@extends('layouts.app')
@section('content')
<!--breadcrumb-->
<div class="page-breadcrumb d-none d-sm-flex align-items-center mb-3">
    <div class="breadcrumb-title pe-3">Bolts-MS-M create</div>
    <div class="ps-3">
        <nav aria-label="breadcrumb">
            <ol class="breadcrumb mb-0 p-0">
                <li class="breadcrumb-item"><a href="javascript:;">
                    {{-- <i class="bx bx-home-alt"></i> --}}
                </a>
                </li>
                <li class="breadcrumb-item active" aria-current="page">Bolts-MS-M</li>
            </ol>
        </nav>
    </div>
</div>
<!--end breadcrumb-->
<div class="row">
    <div class="col-lg-12 mx-auto">
        <div class="card">
            <div class="card-header px-4 py-3">
                <div class="row">
                    <div class="col-lg-10"></div>
                    <div class="col-lg-2"><button value="Back" type="Button" onclick="history.go(-1);" class="btn btn-grd btn-grd-branding px-5 btn-sm">Back</button></div>
                </div>
            </div>
            <div class="card-body p-4">
                <form id="jQueryValidationForm" action="{{ route('admin/bolts/msm/store') }}" method="post">
                    @csrf
                    <div class="row mb-3">
                        <label for="input39" class="col-sm-3 col-form-label">Length</label>
                        <div class="col-sm-9">
                            <select class="form-select" id="input39" name="length">
                                <option selected disabled value>Choose...</option>
                                {{-- <option selected="" disabled="" value="">Choose...</option> --}}
                                @foreach ($lengths as $length)
                                    <option value="{{ $length->id }}" {{ old('length')==$length->id ? 'selected' : ''  }}>{{ $length->name }}</option>
                                @endforeach
                            </select>
                            @error('length')
                                <span class="text-danger">{{ $message }}</span>
                            @enderror
                        </div>
                    </div>
                    <div class="row mb-3">
                        <label for="input39" class="col-sm-3 col-form-label">Diameter</label>
                        <div class="col-sm-9">
                            <select class="form-select" id="input39" name="diameter">
                                <option selected disabled value>Choose...</option>
                                {{-- <option selected="" disabled="" value="">Choose...</option> --}}
                                @foreach ($diameters as $diameter)
                                    <option value="{{ $diameter->id }}" {{ old('diameter')==$diameter->id ? 'selected' : ''  }}>{{ $diameter->name }}</option>
                                @endforeach
                            </select>
                            @error('diameter')
                                <span class="text-danger">{{ $message }}</span>
                            @enderror
                        </div>
                    </div>
                    <div class="row mb-3">
                        <label for="input35" class="col-sm-3 col-form-label">Enter Value</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="input35" name="value" value="{{ old('value') }}">
                            @error('value')
                                <span class="text-danger">{{ $message }}</span>
                            @enderror
                        </div>
                    </div>
                    <div class="row">
                        <label class="col-sm-3 col-form-label"></label>
                        <div class="col-sm-9">
                            <div class="d-md-flex d-grid align-items-center gap-3">
                                <button type="submit" class="btn btn-grd-primary px-4">Submit</button>
                            <button type="reset" class="btn btn-grd-info px-4">Reset</button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<!--end row-->
@endsection

