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

Gestión de ventas en línea

Agregar país de envío de artículos

{{ Form::open(array('route' => 'SysWebVentasConfEnviosAgregar', 'method' => 'post', 'class' => 'form-horizontal row-border', 'id' => 'frmAgregar', 'files' => true, 'target' => 'upload_iframe')) }}
{{ Form::button('Guardar', array('class' => 'btn btn-primary', 'id' => 'btnAgregar', 'type' => 'submit')) }} {{ HTML::linkRoute('SysWebVentasConfEnvios', 'Cancelar', array(), array('class' => 'btn btn-default')) }}
{{ Form::close() }}
@stop @section('JS') {{ HTML::script('bootstrap-select/js/bootstrap-select.min.js') }} {{ HTML::script('country-region-selector/crs.min.js') }} @stop @section('JSOr') $("#frmAgregar").submit(function(e){ $.isLoading({ text: "Cargando..." }); NProgress.start(); $("#btnAgregar").html(' Cargando').prop("disabled", true); e.preventDefault(); var frmAgregar = new FormData(document.getElementById("frmAgregar")); $.ajax({ type: "POST", url: "{{ URL::route('SysWebVentasConfEnviosAgregar', array()) }}", 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('SysWebVentasConfEnvios') }}"; }, 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" }); } }); }); $(window).on("load", function(){ if( $(".crs-country")[0].hasAttribute("data-blacklist") ){ var blacklist = $(".crs-country").attr("data-blacklist").split(","); $.each(blacklist, function(i, e){ $(".crs-country").find('option[value="'+e+'"]').remove(); }); } }); /*if( $(".crs-country")[0].hasAttribute("data-blacklist") ){ var blacklist = $(".crs-country").attr("data-blacklist").split(","); setTimeout(function(){ $.each(blacklist, function(i, e){ $(".crs-country").find('option[value="'+e+'"]').remove(); }); }, 3000); }*/ @stop