@extends('layouts.modal')

@section('modal_id'){{ 'modal-professor-edit' }}@overwrite
@section('modal_title'){{ 'Editando profesor' }}@overwrite

@section('modal_body')
    <form method="POST" action="/professor" enctype="multipart/form-data" id='modal-professor-edit-form'>
        @method('PATCH')
        @csrf
        <input type="hidden" name="id">
        <div class="form-group row">
            <div class="col-4">
                <label for="modal-professor-edit-fname-field">Nombre:</label>
                <input id="modal-professor-edit-fname-field" type="text" class="form-control" name="first_name" maxlength="255">
            </div>
            <div class="col-8">
                <label for="modal-professor-edit-lname-field">Apellido:</label>
                <input id="modal-professor-edit-lname-field" type="text" class="form-control" name="last_name" maxlength="255">
            </div>
        </div>
        <div class="row">
            <div class="form-group col-sm-8">
                <label for="modal-professor-edit-email-field">Email:</label>
                <input id="modal-professor-edit-email-field" type="email" name="email">
            </div>
            <div class="form-group col-4">
                <label for="modal-professor-edit-type-field">Tipo:</label>
                <select id="modal-professor-edit-type-field" class="form-control" name="type">
                    <option value="plantilla">Plantilla</option>
                    <option value="contrato">Contrato</option>
                    <option value="ta">T.A.</option>
                </select>
            </div>
        </div>
    </form>
@overwrite

@section('modal_submit_text'){{ 'Editar' }}@overwrite
@section('modal_submit')
    function(){document.getElementById('modal-professor-edit-form').submit()}
@overwrite
