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


<?php $__env->startSection('Contenido'); ?>
<div class="row">
	<div class="col-md-12">
		<h2><i class="fa fa-dot-circle-o"></i> Páginas de captura </h2>
	</div><!--/col-md-12-->
</div><!--/row-->

<div class="row">
	<div class="col-md-12">
		<?php if(Session::has('message')): ?>
		<div class="alert alert-info"><?php echo Session::get('message'); ?></div>
		<?php endif; ?>
	</div>
</div>


<div class="row">
	<div class="col-md-12">
		<div class="block-web">
			<div class="header"> <h3 class="content-header"> Configuración de posicionamiento en buscadores </h3> </div>
			<div class="porlets-content">
				<?php echo Form::open(array('route' => array('SysWebPAterrizajePlantillaxClienteSeoActualizar', $PlantillaxClienteSEO->plantillasxclientes_id), 'method' => 'post', 'class' => 'form-horizontal row-border', 'id' => 'frmAgregar', 'files' => true)); ?>

					<div class="form-group">
						<label class="col-sm-3 control-label"> Title </label>
						<div class="col-sm-9">
							<?php echo Form::text('title', $PlantillaxClienteSEO->title,  array('class' => 'form-control', 'placeholder' => '')); ?>

							<span class="text-danger" id="errtitle"> <?php echo $errors->first('title'); ?> </span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label"> Desctiption </label>
						<div class="col-sm-9">
							<?php echo Form::textarea('description', $PlantillaxClienteSEO->description, array('class' => 'form-control', 'rows' => '6')); ?>

							<span class="text-danger" id="errdescription"> <?php echo $errors->first('description'); ?> </span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label"> Keywords </label>
						<div class="col-sm-9">
							<?php echo Form::text('keywords', $PlantillaxClienteSEO->keywords,  array('class' => 'form-control', 'placeholder' => '')); ?>

							<span class="text-danger" id="errkeywords"> <?php echo $errors->first('keywords'); ?> </span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label"> Indexación de búsquedas </label>
						<div class="col-sm-9">
							<div class="checkbox">
								<label>
									<input name="index" type="checkbox" value="1" <?php if($PlantillaxClienteSEO->index==1): ?> checked <?php endif; ?>>
									<span class="custom-checkbox"></span> Evitar que los rastreadores web de la mayoría de motores de búsqueda indexen la página.
								</label>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label"> Seguimiento de página </label>
						<div class="col-sm-9">
							<div class="checkbox">
								<label>
									<input name="follow" type="checkbox" value="1" <?php if($PlantillaxClienteSEO->follow==1): ?> checked <?php endif; ?>>
									<span class="custom-checkbox"></span> No seguir los enlaces de esta página.
								</label>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label"> Ruta </label>
						<div class="col-sm-9">
							<?php echo Form::text('url', strtolower(str_replace(' ', '-', $PlantillaxClienteSEO->slug)),  array('class' => 'form-control', 'placeholder' => '', 'disabled'=>'', 'id' => 'txtUrl')); ?>

							<span class="text-danger" id="errurl"> <?php echo $errors->first('url'); ?> </span>
						</div>
					</div>
					<?php echo Form::hidden('plantillasxclientes_id', $PlantillaxClienteSEO->plantillasxclientes_id); ?>

					<div class="bottom">
						<?php echo Form::button('Guardar', array('class' => 'btn btn-primary', 'id' => 'btnAgregar', 'type' => 'submit')); ?>

						<?php echo HTML::linkRoute('SysWebPAterrizajePlantillaxCliente', 'Cancelar', array(), array('class' => 'btn btn-default')); ?>

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

		</div>
		
	</div>
</div><!--/row end-->
<?php $__env->stopSection(); ?>

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

<?php $__env->startSection('JSOr'); ?>
$("#frmAgregar").submit(function(e){
	e.preventDefault();
	$("#btnAgregar").prop("disabled", true).html('<i class="fa fa-spinner fa-spin"></i> Cargando');
	$.post(
		"<?php echo URL::route('SysWebPAterrizajePlantillaxClienteSeoActualizar', array($PlantillaxClienteSEO->plantillasxclientes_id)); ?>",
		$("#frmAgregar").serialize(),
		function(data){
			$("#btnAgregar").prop("disabled", false).html("Guardar");
			if(data.success){
				new PNotify({ title: "Realizado", text: data.mensaje, type: "success" });
				setTimeout( function(){ window.location.href = "<?php echo URL::route('SysWebPAterrizajePlantillaxCliente'); ?>"; }, 3000 );
			}
			else{
				if(data.mensaje != ''){ new PNotify({ title: "Error", text: data.mensaje, type: "error" }); }
				$.each(data.errMensajes, function(key, value){ if(value != ''){ $("#err"+key).html(value); } else{ $("#err"+key).html(""); } });
			}
		},
		"json"
	);
});
<?php $__env->stopSection(); ?>
<?php echo $__env->make('BaseSistemaWeb', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>