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

Gestión de ventas en línea

Edición de atributos de productos

{{ Form::open(array('route' => 'SysWebGClientesAtributosEditar', 'method' => 'post', 'class' => 'form-horizontal row-border', 'id' => 'frmEditar', 'files' => true, 'target' => 'upload_iframe')) }}
{{ Form::text('nombre', $Atributo->nombre, array('class' => 'form-control', 'placeholder' => '')) }}
{{ Form::button('Editar', array('class' => 'btn btn-warning', 'id' => 'btnEditar', 'type' => 'submit')) }} {{ HTML::linkRoute('SysWebGClientesAtributos', 'Cancelar', array(), array('class' => 'btn btn-default')) }}
{{ Form::close() }}
@stop @section('JS') {{ HTML::script('bootstrap-select/js/bootstrap-select.min.js') }} @stop @section('JSOr') $("#frmEditar").submit(function(e){ $.isLoading({ text: "Cargando..." }); NProgress.start(); $("#btnEditar").html(' Cargando').prop("disabled", true); e.preventDefault(); var frmEditar = new FormData(document.getElementById("frmEditar")); $.ajax({ type: "POST", url: "{{ URL::route('SysWebGClientesAtributosEditar', array($Atributo->id)) }}", data: frmEditar, cache: false, contentType: false, processData: false, dataType: "json", success: function(data){ $.isLoading("hide"); NProgress.done(); $("#btnEditar").html("Editar").prop("disabled", false); if(data.success){ new PNotify({ title: "Realizado", text: data.mensaje, type: "success" }); setTimeout( function(){ window.location.href = "{{ URL::route('SysWebGClientesAtributos') }}"; }, 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" }); } }); }); @stop