@extends('BaseSistemaWeb')
@section('CSS')
{{ HTML::style('image-picker/image-picker.css') }}
@stop
@section('Contenido')
{{ Form::open(array('route' => 'SysWebVEmergentesVentanasEmergentesAgregar', 'method' => 'post', 'class' => 'form-horizontal row-border', 'id' => 'frmAgregar', 'files' => true)) }}
@foreach($VentanasEmergentes as $VentanasEmergente)
{{$VentanasEmergente->nombre }}
@endforeach
{{ Form::close() }}
@stop
@section('JS')
{{ HTML::script('image-picker/image-picker.min.js') }}
@stop
@section('JSOr')
$("select").imagepicker({ hide_select : true, show_label : true });
$(".btnSelectionV").click(function(){
var titulo = $(this).attr("data-nombre");
var id = $(this).attr("data-idV");
var modulo = $('[name="modulo"]').val();
var mensaje = '
';
BootstrapDialog.show({
cssClass: "mdAvatar",
title: titulo,
message: mensaje,
draggable: true,
closeByBackdrop: false,
buttons: [{
id: "btnAgregarV",
label: "Agregar",
cssClass: "btn-success btn-lg btn-block",
action: function(dialogItself){
$("#btnAgregarV").prop("disabled", true).html('
Procesando...');
$.isLoading({ text: "Cargando..." }); NProgress.start();
$.post(
"{{ URL::route('SysWebVEmergentesVentanasEmergentesAgregar') }}",
$("#frmVentanaEmergente").serialize(),
function(data){
$.isLoading("hide"); NProgress.done();
$("#btnAgregarV").prop("disabled", false).html("Agregar");
if(data.success){
var urlEdicion = "{{ URL::route('SysWebVEmergentesVentanasEmergentesEditarV2', array(0)) }}";
urlEdicion = urlEdicion.replace("0", data.idVE);
new PNotify({ title: "Realizado", text: data.mensaje, type: "success" });
setTimeout( function(){ window.location.href = urlEdicion; }, 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"
);
}
}]
});
});
@stop