Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 1645 Rev 1646
Línea 425... Línea 425...
425
        });
425
        });
426
    }).done(function (response) {
426
    }).done(function (response) {
427
        if (response['success']) {
427
        if (response['success']) {
428
            $('#form-add #first_name').val(response['data']['first_name']);
428
            $('#form-add #first_name').val(response['data']['first_name']);
429
            $('#form-add #last_name').val(response['data']['last_name']);
429
            $('#form-add #last_name').val(response['data']['last_name']);
-
 
430
        }else {
-
 
431
            validatorEdit.resetForm();
-
 
432
            if (jQuery.type(response['data']) == 'string') {
-
 
433
                $.fn.showError(response['data']);
-
 
434
            } else {
-
 
435
                $.each(response['data'], function (fieldname, errors) {
-
 
436
                    $.fn.showFormErrorValidator('#form-add #' + fieldname, errors);
-
 
437
                });
-
 
438
            }
430
        };
439
        }
-
 
440
        }).fail(function (jqXHR, textStatus, errorThrown) {
-
 
441
            $.fn.showError(textStatus);
-
 
442
        }).always(function () {
-
 
443
            NProgress.done();
431
    });
444
        });
432
});
445
});
433
JS;
446
JS;
434
$this->inlineScript()->captureEnd();
447
$this->inlineScript()->captureEnd();
435
?>
448
?>