@extends('BaseSistemaWeb') @section('CSS') @stop @section('Contenido')

E-Mail Marketing

Amazon Web Services (SES)

{{ Form::open(array('route' => 'SysWebEmailMarketingConfApiAmazon', 'method' => 'post', 'class' => 'form-horizontal row-border', 'id' => 'frmEditar', 'files' => true, 'target' => 'upload_iframe')) }}
@if(count($ConfiguracionAmazon)==0) {{ Form::text('key', '', array('class' => 'form-control', 'placeholder' => '')) }} @else {{ Form::text('key', $ConfiguracionAmazon->key, array('class' => 'form-control', 'placeholder' => '')) }} @endif
@if(count($ConfiguracionAmazon)==0) {{ Form::text('secret', '', array('class' => 'form-control', 'placeholder' => '')) }} @else {{ Form::text('secret', $ConfiguracionAmazon->secret, array('class' => 'form-control', 'placeholder' => '')) }} @endif
@if(count($ConfiguracionAmazon)==0) {{ Form::text('region', '', array('class' => 'form-control', 'placeholder' => '')) }} @else {{ Form::text('region', $ConfiguracionAmazon->region, array('class' => 'form-control', 'placeholder' => '')) }} @endif
@if(count($ConfiguracionAmazon)>0) {{ Form::hidden('id', $ConfiguracionAmazon->id, array('id' => 'id')) }} @endif
{{ Form::button('Editar', array('class' => 'btn btn-primary', 'id' => 'btnAgregar', 'type' => 'submit')) }}
{{ Form::close() }}

NeverBounce

{{ Form::open(array('route' => 'SysWebEmailMarketingConfApiNeverBounce', 'method' => 'post', 'class' => 'form-horizontal row-border', 'id' => 'frmEditarNB', 'files' => true, 'target' => 'upload_iframe')) }}
@if(count($ConfNeverBounce)==0) {{ Form::text('api_username', '', array('class' => 'form-control', 'placeholder' => '')) }} @else {{ Form::text('api_username', $ConfNeverBounce->api_username, array('class' => 'form-control', 'placeholder' => '')) }} @endif
@if(count($ConfNeverBounce)==0) {{ Form::text('api_secret_key', '', array('class' => 'form-control', 'placeholder' => '')) }} @else {{ Form::text('api_secret_key', $ConfNeverBounce->api_secret_key, array('class' => 'form-control', 'placeholder' => '')) }} @endif
@if(count($ConfNeverBounce)>0) {{ Form::hidden('id', $ConfNeverBounce->id, array('id' => 'idNB')) }} @endif
{{ Form::button('Editar', array('class' => 'btn btn-primary', 'id' => 'btnEditarNB', 'type' => 'submit')) }} @if( count($ConfNeverBounce)>0 && $ConfNeverBounce->activo == 1 ) {{ Form::button('Desactivar', array('class' => 'btn btn-warning', 'id' => 'btnDesactivarNB', 'type' => 'button')) }} @elseif( count($ConfNeverBounce)>0 && $ConfNeverBounce->activo == 0 ) {{ Form::button('Activar', array('class' => 'btn btn-success', 'id' => 'btnActivarNB', 'type' => 'button')) }} @endif
{{ Form::close() }}
@stop @section('JS') {{-- HTML::script('WebPro/plugins/ckeditor-new/ckeditor.js') --}} @stop @section('JSOr') $("#frmEditar").submit(function(e){ $("#btnAgregar").html(' Cargando').prop("disabled", true); e.preventDefault(); var frmEditar = new FormData(document.getElementById("frmEditar")); $.ajax({ type: "POST", url: "{{ URL::route('SysWebEmailMarketingConfApiAmazon', array()) }}", data: frmEditar, cache: false, contentType: false, processData: false, dataType: "json", success: function(data){ $("#btnAgregar").html("Editar").prop("disabled", false); if(data.success){ new PNotify({ title: "Realizado", text: data.mensaje, type: "success" }); setTimeout( function(){ window.location.href = "{{ URL::route('SysWebEmailMarketingConfApiAmazon') }}"; }, 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(""); } }); } }, error: function(jqXHR, textStatus, errorThrown){ new PNotify({ title: "Error", text: textStatus + " " + errorThrown, type: "error" }); } }); }); $("#frmEditarNB").submit(function(e){ $("#btnEditarNB").html(' Cargando').prop("disabled", true); e.preventDefault(); $.post( "{{ URL::route('SysWebEmailMarketingConfApiNeverBounce') }}", $("#frmEditarNB").serialize(), function(data){ $("#btnEditarNB").html("Editar").prop("disabled", false); if(data.success){ new PNotify({ title: "Realizado", text: data.mensaje, type: "success" }); setTimeout( function(){ window.location.href = "{{ URL::route('SysWebEmailMarketingConfApiAmazon') }}"; }, 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" ); }); @if( count($ConfNeverBounce)>0 && $ConfNeverBounce->activo ==1 ) $("#btnDesactivarNB").click(function(e){ $("#btnDesactivarNB").html(' Cargando').prop("disabled", true); e.preventDefault(); $.post( "{{ URL::route('SysWebEmailMarketingConfApiNeverBounceDesactivar') }}", { id:{{ $ConfNeverBounce->id }} }, function(data){ $("#btnDesactivarNB").html("Desactivar").prop("disabled", false); if(data.success){ new PNotify({ title: "Realizado", text: data.mensaje, type: "success" }); setTimeout( function(){ window.location.href = "{{ URL::route('SysWebEmailMarketingConfApiAmazon') }}"; }, 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" ); }); @elseif( count($ConfNeverBounce)>0 && $ConfNeverBounce->activo == 0 ) $("#btnActivarNB").click(function(e){ $("#btnActivarNB").html(' Cargando').prop("disabled", true); e.preventDefault(); $.post( "{{ URL::route('SysWebEmailMarketingConfApiNeverBounceActivar') }}", { id:{{ $ConfNeverBounce->id }} }, function(data){ $("#btnActivarNB").html("Activar").prop("disabled", false); if(data.success){ new PNotify({ title: "Realizado", text: data.mensaje, type: "success" }); setTimeout( function(){ window.location.href = "{{ URL::route('SysWebEmailMarketingConfApiAmazon') }}"; }, 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" ); }); @endif @stop