<form class="row g-3 auto-width edit_study_materials" id="edit_study_materials_form" enctype='multipart/form-data' action="{{route('study-materials-update' , $study_materials->id) }}">
    @csrf
    @method('PUT')
    <div class="col-md-6">
        <div>
            <label for="title" class="form-label">Study Material Name <span class="text-danger"><b>*</b></span></label>
                <input type="text" class="form-control" id="title" name="title" value="{{$study_materials->title}}">
        </div>
    </div>

    <div class="col-md-6">
        <div>
            <label for="semester_id" class="form-label">Class / Semesters </label>
        </div>
        <div class="input-group">
            <select class="form-control" name="semester_id" id="semester_id">
                <option value="">Select Class / Semesters</option>
                @foreach($semesters as $list)
                <option value="{{ $list->id }}" {{ $list->id == $study_materials->semester_id ? 'selected' : '' }}>
                {{ $list->class_name }}
                </option>
                @endforeach
            </select>
        </div>
    </div>
    
    <div class="col-md-12">
        <div>
            <label for="description" class="form-label">Description </label>
                <textarea type="text" class="form-control" id="description" name="description">{{$study_materials->description}}</textarea>
        </div>
    </div>
    <div class="col-md-6">
        <div>
            <label for="priority" class="form-label">Priority <span class="text-danger"><b>*</b></span></label>
                <input type="text" class="form-control" id="priority" name="priority" value="{{$study_materials->priority}}">
        </div>
    </div>
    <div class="col-md-6">
        <div>
            <label for="financial_year_id" class="form-label">Financial Year <span class="text-danger"><b></b></span></label>
                <select class="form-control" name="financial_year_id">
                    <option value=" ">Select Financial Year</option>
                    @foreach($financialYear as $row)
                        <option value="{!! $row->financialyearid !!}" {!! $study_materials->financial_year_id==$row->financialyearid ? 'selected':'' !!}>{!! $row->financial_year_name !!}</option>
                    @endforeach
                </select>
        </div>
    </div>

</form>

