Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 1493 | Rev 1495 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1493 Rev 1494
Línea 220... Línea 220...
220
 
220
 
221
            $.ajax({
221
            $.ajax({
222
                'dataType'  : 'json',
222
                'dataType'  : 'json',
223
                'accept'    : 'application/json',
223
                'accept'    : 'application/json',
224
                'method'    : 'post',
224
                'method'    : 'post',
225
                'url'       :  $('#form-topic-add').attr('action'),
225
                'url'       :  $('#form-add').attr('action'),
226
                'data'      :  formdata,
226
                'data'      :  formdata,
227
                'processData': false,
227
                'processData': false,
228
                'contentType': false,
228
                'contentType': false,
229
            }).done(function(response) {
229
            }).done(function(response) {
Línea 236... Línea 236...
236
                    validatorAdd.resetForm();
236
                    validatorAdd.resetForm();
237
                    if(jQuery.type(response['data']) == 'string') {
237
                    if(jQuery.type(response['data']) == 'string') {
238
                        $.fn.showError(response['data']);
238
                        $.fn.showError(response['data']);
239
                    } else  {
239
                    } else  {
240
                        $.each(response['data'], function( fieldname, errors ) {
240
                        $.each(response['data'], function( fieldname, errors ) {
241
                            $.fn.showFormErrorValidator('#form-topic-add #' + fieldname, errors);
241
                            $.fn.showFormErrorValidator('#form-add #' + fieldname, errors);
242
                        });
242
                        });
243
                    }
243
                    }
244
                }
244
                }
245
            }).fail(function( jqXHR, textStatus, errorThrown) {
245
            }).fail(function( jqXHR, textStatus, errorThrown) {
246
                $.fn.showError(textStatus);
246
                $.fn.showError(textStatus);