@extends('BaseSistemaWeb') @section('CSS') {{ HTML::style('bootstrap-select/css/bootstrap-select.min.css') }} {{ HTML::style('image-picker/image-picker.css') }} {{ HTML::style('WebPro/plugins/dropzone/dropzone.css') }} {{ HTML::style('image-picker/image-picker.css') }} @stop @section('Contenido')

E-Mail Marketing

Crear nuevo mensaje de campaña

{{ Form::open(array('route' => 'SysWebEmailMarketingCampanhasAgregar', 'method' => 'post', 'class' => 'form-horizontal row-border', 'id' => 'frmAgregar')) }}
{{ Form::text('nombre', '', array('class' => 'form-control', 'placeholder' => '')) }}
{{ Form::text('asunto', '', array('class' => 'form-control', 'placeholder' => '')) }}
{{ Form::select('configuraciones_emails_id', $slConfiguracionesEmails, null, array('class' => 'form-control selectpicker', 'id' => 'configuraciones_emails_id', 'data-live-search' => 'true')) }}
{{ Form::select('campo_personalizado', $slListasEmails, null, array('class' => 'form-control selectpicker', 'id' => 'slListasEmails', 'data-live-search' => 'true')) }}
{{ Form::textarea('mensaje', null, array('class' => 'form-control ckeditor', 'rows' => '6', 'id' => 'mensaje')) }}
{{-- Div utilizado para modificar el mensaje en caso de realizar una evaluación de vínculos --}}
{{-- MACRO REALIZADO POR KEVIN MORÁN PUEDE UBICARSE EN /app/start/global.php AL FINAL DEL DOCUMENTO POR SI NECESITA MODIFICARSE --}} {{ Form::slPlantillasMensajesC('color', array('azul' => 'blue', 'verde' => 'green', 'rosado' => 'pink')) }}
{{ Form::button('Guardar', array('class' => 'btn btn-primary', 'id' => 'btnAgregar', 'type' => 'submit')) }} {{ HTML::linkRoute('SysWebEmailMarketingCampanhas', 'Cancelar', array(), array('class' => 'btn btn-default')) }}
{{ Form::close() }}
@stop @section('JS') {{ HTML::script('bootstrap-select/js/bootstrap-select.min.js') }} {{ HTML::script('bootstrap-select/js/i18n/defaults-es_CL.min.js') }} {{-- HTML::script('WebPro/plugins/ckeditor-new/ckeditor.js') --}} {{ HTML::script('CKEditor/ckeditor-full/ckeditor.js') }} {{ HTML::script('CKEditor/ckeditor-full/adapters/jquery.js') }} {{ HTML::script('image-picker/image-picker.min.js') }} {{ HTML::script('SysWeb/SumeClientes/php.js') }} {{ HTML::script('WebPro/plugins/dropzone/dropzone.min.js') }} @include('GenTemplate.ventana-biblioteca-imagenes-js') @stop @section('JSOr') $("[name='suscriptores']").click(function(e){ if($(this).val() == "T"){ $("#dvSegmentoEtiquetas").hide("slow"); $("#etiquetas option:selected").removeAttr("selected"); $("#etiquetas").selectpicker("refresh"); $("#dvEtiquetas").html(""); } else{ $("#dvSegmentoEtiquetas").show("slow"); } }); $("#etiquetas").on("changed.bs.select", function(e){ $("#dvEtiquetas").html(""); $.each( $(this).val(), function(key, value){ $("#dvEtiquetas").append(' \ \ '+$("#op"+value).html()+' \   \ '); } ); }); $("select").imagepicker({ hide_select : true, show_label : true }); $("#tipo").click(function(){ if($("#tipo").is(":checked")){ $("#confplantilla").hide("slow"); $("#errcolor").html(""); } else{ $("#confplantilla").show("slow"); } }); $(".selectpicker").selectpicker(); $("#slListasEmails").change(function(){ if($(this).val()!=""){ var i = 0; var texto = $("#slListasEmails option:selected").text(); var p = texto.indexOf("("); texto = texto.substring(0, p); $("#Listas").find("span.NombreLista").each(function(){ if( texto == $(this).html() ){ i = 1; } }); if(i == 0){ $("#Campos").html(""); $("#CargandoCampos").show(); var input = '
\

\ '+texto+' \ \ \

\
'; $("#Listas").append(input); $.post( "{{ URL::route('SysWebEmailMarketingCampanhasVerificarCampos') }}", $("input[name='listas_emails_id[]']").serialize(), function(data){ $("#CargandoCampos").hide(); if(data.success){ var Campos = ''; for(i=0;i '+data.campos[i].nombre+'
'; } $("#Campos").html(Campos); } else{ if(data.mensaje != ''){ new PNotify({ title: "Error", text: data.mensaje, type: "error" }); } } }, "json" ); } } }); $("#frmAgregar").submit(function(e){ e.preventDefault(); $.isLoading({ text: "Cargando..." }); NProgress.start(); for(instance in CKEDITOR.instances){ CKEDITOR.instances[instance].updateElement(); } $("#btnAgregar").prop("disabled", true).html(' Cargando'); //CONVERSIÓN DE VÍNCULOS if($("#clic").is(":checked")){ CodificarVinculo(); } else{ DecodificarVinculo(); } $.post( "{{ URL::route('SysWebEmailMarketingCampanhasAgregar') }}", $("#frmAgregar").serialize(), function(data){ $.isLoading("hide"); NProgress.done(); $("#btnAgregar").prop("disabled", false).html("Guardar"); if(data.success){ new PNotify({ title: "Realizado", text: data.mensaje, type: "success" }); setTimeout( function(){ window.location.href = "{{ URL::route('SysWebEmailMarketingCampanhas') }}"; }, 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(""); } }); if($("#clic").is(":checked")){ DecodificarVinculo(); } } }, "json" ); }); @stop