40 lines
815 B
HTML
40 lines
815 B
HTML
<%inherit file="base.html"/>
|
|
|
|
<%block name="media">
|
|
<script src="/static/js/ui/empresas.js" type="text/javascript" ></script>
|
|
</%block>
|
|
|
|
<%block name="content">
|
|
|
|
<div id="form_empresas"></div>
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
|
|
function validate_nuevo_rfc(){
|
|
var form = this.getFormView();
|
|
|
|
if (!form.validate()) {
|
|
webix.message({ type:"error", text:"Valores inválidos" });
|
|
return
|
|
}
|
|
|
|
var values = form.getValues()
|
|
|
|
webix.ajax().post("/empresas", values, function(text, data, xhr) {
|
|
var values = data.json();
|
|
if (values.ok) {
|
|
|
|
} else {
|
|
webix.message({ type:"error", text: values.msg })
|
|
}
|
|
});
|
|
};
|
|
|
|
webix.ready(function(){
|
|
webix.ui(ui_empresas);
|
|
});
|
|
|
|
</script>
|
|
|
|
</%block>
|