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

Administración de videos de ayuda

Agregar vista del sistema

{{ Form::open(array('route' => 'SysWebVideosAyudaVistaAgregar', 'method' => 'post', 'class' => 'form-horizontal row-border', 'id' => 'frmAgregar')) }}
{{ Form::text('nombre', '', array('class' => 'form-control', 'placeholder' => '')) }}
{{ Form::text('ruta', '', array('class' => 'form-control', 'placeholder' => '')) }}
{{ Form::button('Agregar', array('class' => 'btn btn-primary', 'id' => 'btnAgregar', 'type' => 'submit')) }} {{ HTML::linkRoute('SysWebVideosAyuda', 'Cancelar', array(), array('class' => 'btn btn-default')) }}
{{ Form::close() }}
@stop @section('JS') {{-- HTML::script('WebPro/plugins/ckeditor-new/ckeditor.js') --}} @stop @section('JSOr') $("#frmAgregar").submit(function(e){ $("#btnAgregar").html(' Cargando').prop("disabled", true); e.preventDefault(); var frmAgregar = new FormData(document.getElementById("frmAgregar")); $.ajax({ type: "POST", url: "{{ URL::route('SysWebVideosAyudaVistaAgregar', array()) }}", data: frmAgregar, cache: false, contentType: false, processData: false, dataType: "json", success: function(data){ $("#btnAgregar").html("Agregar").prop("disabled", false); if(data.success){ new PNotify({ title: "Realizado", text: data.mensaje, type: "success" }); setTimeout( function(){ window.location.href = "{{ URL::route('SysWebVideosAyuda') }}"; }, 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