<?php $__env->startSection('content'); ?>
    <div class="register">
        <div class="col-lg-12">
            <?php echo Form::open(array('id' => 'form-validation','route' => array('empresa.crear'))); ?>

            <h3 class="form-title" style="text-align: center;padding-bottom: 25px;"> Registro de empresa </h3>
            <div class="row">
                <div class="col-lg-4">
                    <div class="form-group">
                        <label class="control-label">Nombre Organización</label>
                        <?php echo Form::text('nombre_organizacion', null,['class'=>'form-control placeholder-no-fix', 'required'=>'true']); ?>

                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="form-group">
                        <label class="control-label">Ruc</label>
                        <?php echo Form::text('ruc', null,['class'=>'form-control placeholder-no-fix', 'required'=>'true']); ?>

                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="form-group">
                        <label class="control-label">Nombre usuario</label>
                        <?php echo Form::text('username', null,['class'=>'form-control placeholder-no-fix', 'required'=>'true']); ?>

                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <div class="form-group">
                        <label class="control-label">Descripción</label>
                        <?php echo Form::textarea('descripcion', null,['class'=>'form-control placeholder-no-fix', 'style'=>'height: 90px; resize: none;', 'required'=>'true']); ?>

                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-4">
                    <div class="form-group">
                        <label class="control-label">Rubro</label>
                        <?php echo Form::text('rubro', null,['class'=>'form-control placeholder-no-fix', 'required'=>'true']); ?>

                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="form-group">
                        <label class="control-label">Entidad</label>
                        <?php echo Form::text('entidad', null,['class'=>'form-control placeholder-no-fix', 'required'=>'true']); ?>

                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="form-group">
                        <label class="control-label" for="fecha_inicio">Formación Empresa</label>
                        <div id="formacion_empresa" class="input-group date date-picker col-lg-12" data-date-format="dd-mm-yyyy">
                            <span class="input-group-btn">
                                <button class="btn btn-default" type="button">
                                    <i class="fa fa-calendar"></i>
                                </button>
                            </span>
                            <?php echo Form::text('formacion_empresa', null, array('class' => 'form-control' , 'required' => 'required')); ?>

                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-4">
                    <div class="form-group">
                        <label class="control-label">Teléfono</label>
                        <?php echo Form::text('telefono', null,['class'=>'form-control placeholder-no-fix', 'required'=>'true']); ?>

                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="form-group">
                        <label class="control-label">Celular</label>
                        <?php echo Form::text('celular', null,['class'=>'form-control placeholder-no-fix', 'required'=>'true']); ?>

                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="form-group">
                        <label class="control-label">Fax</label>
                        <?php echo Form::text('fax', null,['class'=>'form-control placeholder-no-fix']); ?>

                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-4">
                    <div class="form-group">
                        <label class="control-label">Dirección</label>
                        <?php echo Form::text('direccion', null,['class'=>'form-control placeholder-no-fix', 'required'=>'true']); ?>

                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="form-group">
                        <label class="control-label">Email</label>
                        <?php echo Form::email('email', null,['class'=>'form-control placeholder-no-fix', 'required'=>'true']); ?>

                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="form-group">
                        <label class="control-label">Contraseña</label>
                        <?php echo Form::password('password',['class'=>'form-control placeholder-no-fix', 'required'=>'required','autocomplete'=>'off']); ?>

                    </div>
                </div>
            </div>
            <div class="row" style="padding: 30px;">
                <div class="form-actions col-lg-12" style="text-align: right;">
                    <a class="btn button-default" href="<?php echo e(url('/empresa/login')); ?>"> Cancelar</a>
                    <button type="submit" class="btn green"> Guardar</button>
                </div>
            </div>

            <?php echo Form::close(); ?>

            <?php echo $__env->make('alerts.index', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>


    <script>

        $("#form-validation").validate({
            rules: {
                fax:{
                    pattern: '^\+?[0-9]{6,8}$'
                },
                celular:{
                    required:true,
                    pattern: '^\s*-?[0-9]{9,12}\s*$'
                },
                ruc: {
                    required:true,
                    pattern: '^\s*-?[0-9]{9,11}\s*$'
                },
                telefono: {
                    required:true,
                    pattern: '^\s*-?[0-9]{7,10}\s*$'
                },
            }
        });

        $('#formacion_empresa').datepicker({
            language: 'es',
            autoclose: true,
            endDate: new Date()
        });
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('template.inscripcionmaster', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>