<div class="panel panel-default">
    <div class="panel-heading">
        <h4><?php echo e(trans('general.personales')); ?></h4>
    </div>
    <div class="panel-body">
        
    <div class="form-group<?php echo e($errors->has('customer_id') ? ' has-error' : ''); ?>">
    	<?php echo Form::label('customer_id', 'Cliente'); ?>

    	<?php echo Form::select('customer_id', $customers, null, ['class' => 'form-control']); ?>

    	<?php if($errors->has('customer_id')): ?>
    		<span class="help-block">
    			<strong><?php echo e($errors->first('customer_id')); ?></strong>
    		</span>
    	<?php endif; ?>
    </div>
        
        <div class="form-group<?php echo e($errors->has('first_name') ? ' has-error' : ''); ?>">
        	<?php echo Form::label('first_name', trans('general.nombre')); ?>

        	<?php echo Form::text('first_name', null, ['class' => 'form-control']); ?>

        	<?php if($errors->has('first_name')): ?>
        		<span class="help-block">
        			<strong><?php echo e($errors->first('first_name')); ?></strong>
        		</span>
        	<?php endif; ?>
        </div>
        <div class="form-group<?php echo e($errors->has('last_name') ? ' has-error' : ''); ?>">
        	<?php echo Form::label('last_name', trans('general.apellido')); ?>

        	<?php echo Form::text('last_name', null, ['class' => 'form-control']); ?>

        	<?php if($errors->has('last_name')): ?>
        		<span class="help-block">
        			<strong><?php echo e($errors->first('last_name')); ?></strong>
        		</span>
        	<?php endif; ?>
        </div>
        <div class="form-group<?php echo e($errors->has('email') ? ' has-error' : ''); ?>">
        	<?php echo Form::label('email', 'Email'); ?>

        	<?php echo Form::text('email', null, ['class' => 'form-control']); ?>

        	<?php if($errors->has('email')): ?>
        		<span class="help-block">
        			<strong><?php echo e($errors->first('email')); ?></strong>
        		</span>
        	<?php endif; ?>
        </div>
        <div class="form-group<?php echo e($errors->has('local_address') ? ' has-error' : ''); ?>">
        	<?php echo Form::label('local_address', trans('general.direccion')); ?>

        	<?php echo Form::text('local_address', null, ['class' => 'form-control']); ?>

        	<?php if($errors->has('local_address')): ?>
        		<span class="help-block">
        			<strong><?php echo e($errors->first('local_address')); ?></strong>
        		</span>
        	<?php endif; ?>
        </div>
        <div class="form-group<?php echo e($errors->has('telephone') ? ' has-error' : ''); ?>">
        	<?php echo Form::label('telephone', trans('general.movil')); ?>

        	<?php echo Form::text('telephone', null, ['class' => 'form-control']); ?>

        	<?php if($errors->has('telephone')): ?>
        		<span class="help-block">
        			<strong><?php echo e($errors->first('telephone')); ?></strong>
        		</span>
        	<?php endif; ?>
        </div>
        <div class="form-group<?php echo e($errors->has('birthday') ? ' has-error' : ''); ?>">
        	<?php echo Form::label('birthday', trans('general.birthday')); ?>

        	<div class="input-group">
        		<div class="input-group-addon">
        		<i class="fa fa-calendar"></i>
        		</div>
        		<?php echo Form::text('birthday', null, ['class' => 'form-control datepicker', 'data-inputmask' => "'alias': 'mm/dd/yyyy'", 'data-mask' => '']); ?>

        	</div>
        	<?php if($errors->has('birthday')): ?>
        		<span class="help-block">
        			<strong><?php echo e($errors->first('birthday')); ?></strong>
        		</span>
        	<?php endif; ?>
        </div>
        <div class="form-group">
        	<?php echo Form::radio('gender', 'M', true); ?>

        	<?php echo Form::label('gender', trans('general.masculino'), ['class' => 'margin']); ?>

        	<?php echo Form::radio('gender', 'F'); ?>

        	<?php echo Form::label('gender', trans('general.femenino'), ['class' => 'margin']); ?>

        </div>
    </div>
</div>
<div class="panel panel-default">
    <div class="panel-heading">
        <h4><?php echo e(trans('general.titulacion')); ?></h4>
    </div>
    <div class="panel-body">
        <div class="form-group<?php echo e($errors->has('nauticaltitle') ? ' has-error' : ''); ?>">
        	<?php echo Form::label('nauticaltitle', trans('general.nauticaltitle')); ?>

        	<?php echo Form::text('nauticaltitle', null, ['class' => 'form-control']); ?>

        	<?php if($errors->has('nauticaltitle')): ?>
        		<span class="help-block">
        			<strong><?php echo e($errors->first('nauticaltitle')); ?></strong>
        		</span>
        	<?php endif; ?>
        </div>
        <div class="form-group<?php echo e($errors->has('nauticaltitleexpedicion') ? ' has-error' : ''); ?>">
        	<?php echo Form::label('nauticaltitleexpedicion', trans('general.nauticaltitleexpedicion')); ?>

        	<div class="input-group">
        		<div class="input-group-addon">
        		<i class="fa fa-calendar"></i>
        		</div>
        		<?php echo Form::text('nauticaltitleexpedicion', null, ['class' => 'form-control datepicker', 'data-inputmask' => "'alias': 'mm/dd/yyyy'", 'data-mask' => '']); ?>

        	</div>
        	<?php if($errors->has('nauticaltitleexpedicion')): ?>
        		<span class="help-block">
        			<strong><?php echo e($errors->first('nauticaltitleexpedicion')); ?></strong>
        		</span>
        	<?php endif; ?>
        </div>
        <div class="form-group<?php echo e($errors->has('nauticaltitleexpiration') ? ' has-error' : ''); ?>">
        	<?php echo Form::label('nauticaltitleexpiration', trans('general.nauticaltitleexpiration')); ?>

        	<div class="input-group">
        		<div class="input-group-addon">
        		<i class="fa fa-calendar"></i>
        		</div>
        		<?php echo Form::text('nauticaltitleexpiration', null, ['class' => 'form-control datepicker', 'data-inputmask' => "'alias': 'mm/dd/yyyy'", 'data-mask' => '']); ?>

        	</div>
        	<?php if($errors->has('nauticaltitleexpiration')): ?>
        		<span class="help-block">
        			<strong><?php echo e($errors->first('nauticaltitleexpiration')); ?></strong>
        		</span>
        	<?php endif; ?>
        </div>
    </div>
</div>
<div class="panel panel-default">
    <div class="panel-heading">
        <h4><?php echo e(trans('general.datosusuario')); ?></h4>
    </div>
    <div class="panel-body">
        <!-- div class="form-group<?php echo e($errors->has('username') ? ' has-error' : ''); ?>">
        	<?php echo Form::label('username',  'Email'); ?>

        	<?php echo Form::text('username', null, ['class' => 'form-control']); ?>

        	<?php if($errors->has('username')): ?>
        		<span class="help-block">
        			<strong><?php echo e($errors->first('username')); ?></strong>
        		</span>
        	<?php endif; ?>
        </div -->
        <div class="form-group<?php echo e($errors->has('password') ? ' has-error' : ''); ?>">
        	<?php echo Form::label('password', trans('general.password')); ?>

        	<?php echo Form::password('password', ['class' => 'form-control']); ?>

        	<?php if($errors->has('password')): ?>
        		<span class="help-block">
        			<strong><?php echo e($errors->first('password')); ?></strong>
        		</span>
        	<?php endif; ?>
        </div>
        <div class="form-group<?php echo e($errors->has('password_confirmation') ? ' has-error' : ''); ?>">
        	<?php echo Form::label('password_confirmation', trans('general.password').' '.trans('general.confirmation')); ?>

        	<?php echo Form::password('password_confirmation', ['class' => 'form-control']); ?>

        	<?php if($errors->has('password_confirmation')): ?>
        		<span class="help-block">
        			<strong><?php echo e($errors->first('password_confirmation')); ?></strong>
        		</span>
        	<?php endif; ?>
        </div>
		<?php if(Auth::user()->role->role_permission('delete_users')): ?>
        <div class="form-group<?php echo e($errors->has('role_id') || $errors->has('role') ? ' has-error' : ''); ?>">
        	<?php echo Form::label('role_id',  trans('general.rol')); ?><br />
        	<?php echo Form::select('role_id', $roles, null, ['class' => 'form-control']); ?>

        	<?php if($errors->has('role_id') || $errors->has('role')): ?>
        		<span class="help-block">
        			<strong><?php echo e($errors->has('role') ? $errors->first('role') : $errors->first('role_id')); ?></strong>
        		</span>
        	<?php endif; ?>
        </div>
		<?php else: ?>
		<?php echo Form::hidden('role_id', null, ['class' => 'form-control']); ?>

		<?php endif; ?>
        <div class="form-group<?php echo e($errors->has('profile_picture') ? ' has-error' : ''); ?>">
            <?php echo Form::label('profile_picture', trans('general.photo')); ?>

        	<?php echo Form::file('profile_picture'); ?>

        	<?php if($errors->has('profile_picture')): ?>
        		<span class="help-block">
        			<strong><?php echo e($errors->first('profile_picture')); ?></strong>
        		</span>
        	<?php endif; ?>
        </div>
        <div class="form-group">
			<label><?php echo e(trans('general.sendemail')); ?></label>
        	<?php echo Form::radio('sendemail', '0', true); ?>

        	<?php echo Form::label('sendemail', trans('general.noenviado'), ['class' => 'margin']); ?>

        	<?php echo Form::radio('sendemail', '1'); ?>

        	<?php echo Form::label('sendemail', trans('general.enviado'), ['class' => 'margin']); ?>

        </div>
        
        <div class="form-group">
			<label><?php echo e(trans('general.sendsms')); ?></label>
        	<?php echo Form::radio('sendsms', '0', true); ?>

        	<?php echo Form::label('sendsms', trans('general.noenviado'), ['class' => 'margin']); ?>

        	<?php echo Form::radio('sendsms', '1'); ?>

        	<?php echo Form::label('sendsms', trans('general.enviado'), ['class' => 'margin']); ?>

        </div>
    </div>
</div>


<div class="pull-right">
	<?php echo Form::submit(trans('general.save'), ['class' => 'btn btn-success btn-flat']); ?>

	<a href="<?php echo e(isset($user) ? asset('/users/'.$user->id) : asset('/users')); ?>" type="button" class="btn btn-default btn-flat"><?php echo e(trans('general.cancel')); ?></a>
</div>
