@extends('BaseSistemaWeb') @section('CSS') {{-- HTML::style('WebPro/plugins/bootstrap-colorpicker/css/colorpicker.css') --}} {{ HTML::style('bootstrap-colorpicker/css/bootstrap-colorpicker.min.css') }} {{ HTML::style('SysWeb/SumeClientes/BootstrapMod.css') }} {{ HTML::style('SysWeb/SumeClientes/bootstrap-custom-breakpoint.css') }} {{ HTML::style('bootstrap-slider/bootstrap-slider.min.css') }} {{ HTML::style('jquery-ezdz/jquery.ezdz.min.css') }} {{ HTML::style('jQueryUI/NT/jquery-ui.min.css') }} {{ HTML::style('jQueryUI/NT/jquery-ui.structure.min.css') }} {{-- HTML::style('VideoJS/video-js.css') --}} {{-- HTML::script('VideoJS/videojs-ie8.min.js') --}} {{ HTML::style('bootstrap-select/css/bootstrap-select.min.css') }} @if(isset($_GET["nomin"])) {{ HTML::style('SysWeb/SumeClientes/EditorDeFormularios.css?v='.date('H:i:s')) }} @else {{ HTML::style('SysWeb/SumeClientes/EditorDeFormularios.min.css?=v2.9.98') }} @endIf {{ HTML::style('WebPro/plugins/dropzone/dropzone.css') }} {{ HTML::style('image-picker/image-picker.css') }} {{ HTML::style('bootstrap-treeview/bootstrap-treeview.min.css') }} {{ HTML::style('Webui-Popover/jquery.webui-popover.min.css') }} {{ HTML::style('VideoJS/video-js.min.css') }} {{ HTML::style('fontawesome-iconpicker/css/fontawesome-iconpicker.min.css') }} {{ HTML::style('HoverCSS/hover-modificado.min.css?v='.date('H:i:s')) }} {{ HTML::style('SysWeb/SumeClientes/Fuentes.min.css') }} @stop @section('Contenido')

E-Mail Marketing

Agregar formulario a {{ $ListaEmail->nombre }}

{{ Form::open(array('route' => array('SysWebEmailMarketingFormulariosAgregar', $ListaEmail->id), 'method' => 'post', 'class' => 'form-horizontal row-border', 'id' => 'frmAgregar', 'files' => true, 'target' => 'upload_iframe')) }}
{{ Form::text('nombre_form', '', array('class' => 'form-control', 'placeholder' => '')) }}
@if( $ListaEmail->gestion_clientes == 'P' )
@endif
{{ Form::text('pagina_agradecimiento', '', array('class' => 'form-control', 'id' => 'pagina_agradecimiento')) }}
@foreach($Campos as $Campo)
{{ $Campo->nombre }}
@endforeach
{{ Form::button('Guardar', array('class' => 'btn btn-primary', 'id' => 'btnAgregar', 'type' => 'submit')) }} {{ HTML::linkRoute('SysWebEmailMarketingFormularios', 'Cancelar', array($ListaEmail->id), array('class' => 'btn btn-default')) }}
{{ Form::close() }}
@stop @section('JS') {{-- HTML::script('WebPro/plugins/ckeditor-new/ckeditor.js') --}} {{-- --}} {{-- HTML::script('WebPro/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.js') --}} {{ HTML::script('jquery-ezdz/jquery.ezdz.min.js') }} {{ HTML::script('bootstrap-colorpicker/js/bootstrap-colorpicker.min.js') }} @if(isset($_GET["nomin"])) {{ HTML::script('SysWeb/SumeClientes/EditorDeFormularios.js?v='.date('H:i:s')) }} @else {{ HTML::script('SysWeb/SumeClientes/EditorDeFormularios.min.js?=v2.9.98') }} @endif {{ HTML::script('jQueryUI/NT/jquery-ui.min.js') }} {{-- HTML::script('VideoJS/video.js') --}} {{ HTML::script('bootstrap-select/js/bootstrap-select.min.js') }} {{ HTML::script('bootstrap-select/js/i18n/defaults-es_CL.min.js') }} {{ HTML::script('bootstrap-slider/bootstrap-slider.min.js') }} {{ HTML::script('WebPro/plugins/dropzone/dropzone.min.js') }} {{ HTML::script('image-picker/image-picker.min.js') }} {{ HTML::script('bootstrap-treeview/bootstrap-treeview.min.js') }} {{ HTML::script('twbsPagination/jquery.twbsPagination.min.js') }} {{ HTML::script('Webui-Popover/jquery.webui-popover.min.js') }} {{ HTML::script('bootstrap-number-input/bootstrap-number-input.js') }} {{ HTML::script('VideoJS/video.min.js') }} {{ HTML::script('VideoJS/Youtube.min.js') }} {{ HTML::script('fontawesome-iconpicker/js/fontawesome-iconpicker.min.js') }} @stop @section('JSOr') $("#etiquetas").on("changed.bs.select", function(e){ $("#dvEtiquetas").html(""); if($(this).val() != null){ $.each( $(this).val(), function(key, value){ if($("#dvEtiquetas").find('[data-valor="'+$("#op"+value).html()+'"]').length == 0){ $("#dvEtiquetas").append(' \ \ '+$("#op"+value).html()+' \   \ '); } } ); } }); $(".sidebar-toggle-box").trigger("click"); Formulario('V', '{{ asset('SysWeb/SumeClientes/Multimedia.png') }}', false); $(window).keydown(function(event){ if(event.keyCode == 13) { event.preventDefault(); return false; } }); $("#chUbicacion").click(function(){ if($("#chUbicacion").is(":checked")){ $("#pagina_agradecimiento").val(""); $("#dvPagina").hide("slow"); } else{ $("#dvPagina").show("slow"); } }); $("#frmAgregar").submit(function(e){ $.isLoading({ text: "Cargando..." }); NProgress.start(); $('[id^="err"]').html(""); $("#btnAgregar").html(' Cargando').prop("disabled", true); e.preventDefault(); $(".menu-bt").remove(); $("#codigo_html").find(".intl-tel-input, .iti").each(function(){ var input = $(this).find("input").prop("outerHTML"); $(this).prop("innerHTML", input); }); var frmAgregar = new FormData(document.getElementById("frmAgregar")); frmAgregar.append("codigo_html", $("#codigo_html").html().trim()); $.ajax({ type: "POST", url: "{{ URL::route('SysWebEmailMarketingFormulariosAgregar', array($ListaEmail->id)) }}", data: frmAgregar, cache: false, contentType: false, processData: false, dataType: "json", success: function(data){ $.isLoading("hide"); NProgress.done(); $("#btnAgregar").html("Guardar").prop("disabled", false); if(data.success){ new PNotify({ title: "Realizado", text: data.mensaje, type: "success" }); setTimeout( function(){ window.location.href = "{{ URL::route('SysWebEmailMarketingFormularios', array($ListaEmail->id)) }}"; }, 3000 ); } else{ if(data.mensaje != ''){ new PNotify({ title: "Error", text: data.mensaje, type: "error" }); } $.each(data.errMensajes, function(key, value){ if(value != ''){ if( key == "ps_opciones"){ new PNotify({ title: "Error", text: "Por favor agrega Productos/Servicios al campo Definido por usuario", type: "error" }); } $("#err"+key).html(value); } else{ $("#err"+key).html(""); } }); } }, error: function(jqXHR, textStatus, errorThrown){ new PNotify({ title: "Error", text: textStatus + " " + errorThrown, type: "error" }); } }); }); $("#btn-laptop").on("click", function(){ VistaPrevia("C"); }); $("#btn-movil").on("click", function(){ VistaPrevia("TI"); }); $("#producto").find("option[value='']").after(''); $("#producto").change(function () { var idProducto = $(this).val(); if(idProducto == "dpu"){ $(".dpu").css("display", ""); $(".dpu").trigger("click"); } else{ $(".dpu").css("display", "none"); $("#dvdefinido_por_usuario").remove(); $("#frmCuerpo").removeAttr("data-id-productos"); $("#frmCuerpo").find(".etiquetasIPSO").remove(); } }); $("#frmAgegarEtiqueta").on("submit", function (e) { e.preventDefault(); var existe = 0; $.each($("#etiquetas_opc").find("option"), function (key, value) { if ($("#newOpc").val() == $(this).text().trim()) { existe = 1; } }); if (existe == 0) { $.post( "{{URL::route('SysWebEmailMarketingEtiquetasFormularioAgregar')}}", $("#frmAgegarEtiqueta").serialize(), function (data) { if (data.success) { var tag_campo = $("#newOpc").attr("data-newop-campo"); var tag_opc_id = data.Etiqueta.id; var tag_opc_nombre = data.Etiqueta.nombre; var lista_tags = $("#" + tag_campo).attr("data-etiquetas"); var tags = {}; tags[tag_opc_id] = tag_opc_nombre; if (lista_tags != null) { lista_tags = JSON.parse(lista_tags); lista_tags[tag_campo][tag_opc_nombre] = tags; $("#" + tag_campo).attr("data-etiquetas", JSON.stringify(lista_tags)); } else { var json_tags = { [tag_campo]: { [tag_opc_nombre]: tags } } $("#" + tag_campo).attr("data-etiquetas", JSON.stringify(json_tags)); } $.get( "{{URL::route('SysWebEmailMarketingEtiquetasListarFormulario')}}", function (respuesta) { $("#etiquetas_opc").find("option").remove(); $("#etiquetas_opc").append(''); $.each(respuesta, function (key, value) { $("#etiquetas_opc").append(''); }); $("#etiquetas_opc").selectpicker("refresh"); }, "json" ); } else { new PNotify({ title: "Error", text: "Hubo un error ingresando la etiqueta.", type: "error" }); } }, "json" ); } else { new PNotify({ title: "Atención", text: "Esta etiqueta ya existe, se agregará únicamente la nueva opción.", type: "info" }); } }); $(document).ready(function(){ //Agrego clase identificador para cada campo del formulario //--------------------------------------------------- $("#dvcorreo_electronico").addClass("sc-form-input sc-fi-text"); //--------------------------------------------------- }); @stop