@extends('template.layout')

@section('content')
    <h1 class="page-title">
        <a href="{{ url('alumno') }}"><i class="icon-action-undo"></i></a>
        Alumnos y Egresados
    </h1>

    <div class="portlet light portlet-fit portlet-datatable bordered" style="padding-top: 2 5px;">
        <div class="portlet-title">
            <div class="caption">
                <span class="caption-subject font-green sbold uppercase"> Editar Alumno </span>
            </div>
        </div>
        <div class="portlet-body">
            @include('alerts.index')
            {{ Form::model($Usuario, array('route' => array('alumno.actualizar', $Usuario->idAlumno), 'id'=>'frmEditUsuario', 'method' => 'POST', 'enctype' =>'multipart/form-data')) }}
            <div class="form-horizontal">
                <div class="form-group hidden">
                    {!! Form::label('id', 'id:', ['class' => 'control-label']) !!}
                    {!! Form::text('id', null, ['class' => 'form-control','required'=>'required']) !!}
                </div>
                <div class="row">
                    <div class="col-lg-12">
                        <div class="form-group col-lg-6 col-xs-6" style="margin-right: 10px;">
                            {!! Form::label('password', 'Contraseña:', ['class' => 'control-label']) !!}
                            {!! Form::text('password', null, ['class' => 'form-control']) !!}
                        </div>
                        <div class="form-group col-lg-6 col-xs-6" style="margin-right: 10px;">
                            {!! Form::label('estado_civil', 'Estado Civil:', ['class' => 'control-label']) !!}
                            {!! Form::select('estado_civil', config('constants.ESTADO_CIVIL'),null, ['class' => 'form-control','required'=>'required']) !!}
                        </div>
                        <div class="form-group col-lg-6 col-xs-6" style="margin-right: 10px;">
                            {!! Form::label('email', 'Correo Electronico:', ['class' => 'control-label']) !!}
                            {!! Form::text('email', null, ['class' => 'form-control','required'=>'required']) !!}
                        </div>
                        <div class="form-group col-lg-6 col-xs-6" style="margin-right: 10px;">
                            {!! Form::label('telefono', 'Telefono:', ['class' => 'control-label']) !!}
                            {!! Form::text('telefono', null, ['class' => 'form-control','required'=>'required']) !!}
                        </div>
                        <div class="form-group col-lg-6 col-xs-6" style="margin-right: 10px;">
                            {!! Form::label('direccion', 'Direccion:', ['class' => 'control-label']) !!}
                            {!! Form::text('direccion', null, ['class' => 'form-control','required'=>'required']) !!}
                        </div>
                        <div class="form-group col-lg-12 col-xs-12">
                            <label class="control-label col-md-3" style="text-align: left !important">Imagen</label>
                            <div class="col-md-9">
                                <div class="fileinput fileinput-new" data-provides="fileinput">
                                    <div class="fileinput-preview thumbnail" data-trigger="fileinput" style="width: 200px; height: 150px;">
                                        <img src="{{ asset($Usuario->urlimagen) }}"/>
                                    </div>
                                    <div>
                                        <span class="btn red btn-outline btn-file">
                                            <span class="fileinput-new"> Seleccionar imagen </span>
                                            <span class="fileinput-exists"> Cambiar </span>
                                            {!! Form::file('pathimagen', null ) !!}
                                        </span>
                                        <a href="javascript:;" class="btn red fileinput-exists" data-dismiss="fileinput"> Eliminar </a>
                                    </div>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
                <div class="form-actions" style="text-align: center; padding-top: 50px;">
                    <a class="btn dark btn-outline" href="{{ url('alumno')}}">Cancelar</a>
                    {!! Form::submit('Guardar', ['class' => 'btn green']) !!}
                </div>
            </div>
            {!! Form::close() !!}
        </div>
    </div>
@endsection

@section('scripts')
    <script>

    </script>
@endsection