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

Administración de cuentas

--}}

Administración de proyectos

{{--

Agregar cuenta

--}}

Agregar proyecto

{{ Form::open(array('route' => 'SysWebPerfilCuentasAgregar', 'method' => 'post', 'class' => 'form-horizontal row-border', 'id' => 'frmAgregar', 'files' => true, 'target' => 'upload_iframe')) }}
Datos de acceso a la plataforma
{{ Form::text('username', '', array('class' => 'form-control', 'placeholder' => '')) }}
{{ Form::text('email', '', array('class' => 'form-control', 'placeholder' => '')) }}
Datos de la empresa
{{ Form::text('empresa', '', array('class' => 'form-control', 'placeholder' => '')) }}
{{ Form::text('nombre_completo', '', array('class' => 'form-control', 'placeholder' => '')) }}
{{ Form::text('telefono', '', array('class' => 'form-control inTelIn', 'placeholder' => 'Teléfono')) }}
{{ Form::text('direccion', '', array('class' => 'form-control', 'placeholder' => '')) }}
{{ Timezone::selectForm($Cliente->zona_horaria, 'Seleccione su zona horaria...', array('class' => 'form-control selectpicker', 'data-live-search' => 'true', 'name' => 'zona_horaria'), array('customValue' => 'true')) }}
{{ Form::button('Guardar', array('class' => 'btn btn-primary', 'id' => 'btnAgregar', 'type' => 'submit')) }} {{ HTML::linkRoute('SysWebPerfilCuentas', 'Cancelar', array($Usuario->id), array('class' => 'btn btn-default')) }}
{{ Form::close() }}
@stop @section('JS') {{ HTML::script('bootstrap-select/js/bootstrap-select.min.js') }} {{ HTML::script('Intl-Tel-Input/17.0.3/js/intlTelInput-jquery17-0-16.min.js') }} {{ HTML::script('country-region-selector/crs.min.js') }} @stop @section('JSOr') $('input[name="telefono"]').intlTelInput({ utilsScript: "{{ asset('Intl-Tel-Input/17.0.3/js/utils17-0-16.min.js') }}" }); $('input[name="telefono"]').addClass("inTelIn"); $('input[name="telefono"]').closest(".iti").css("width","-webkit-fill-available"); $('input[name="telefono"]').intlTelInput("setCountry", "{{ $Cliente->pais }}"); $("#pais").on("changed.bs.select", function (e, clickedIndex, isSelected, previousValue){ var paisS = $(this).selectpicker("val"); $("input[name='telefono']").intlTelInput("setCountry", paisS); var countryCode = paisS; $("#estado").selectpicker("refresh"); }); $("#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('SysWebPerfilCuentasAgregar', array($Usuario->id)) }}", 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('SysWebPerfilCuentas', array($Usuario->id)) }}"; }, 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