Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 16822 Rev 16840
Línea 311... Línea 311...
311
 
311
 
312
 
312
 
Línea 313... Línea -...
313
    $('body').on('click', 'button.btn-add', function(e) {
-
 
-
 
313
    $('body').on('click', 'button.btn-add', function(e) {
314
        e.preventDefault();
314
        e.preventDefault();
315
 
315
 
316
        $('span[id="form-title"]').html('LABEL_ADD');
316
        
317
        $('#form').attr('action', '$routeAdd');    
317
        $('#form').attr('action', '$routeAdd');    
318
        $('#form #name').val('');
318
        $('#form #name').val('');
Línea 339... Línea 339...
339
            'accept'    : 'application/json',
339
            'accept'    : 'application/json',
340
            'method'    : 'get',
340
            'method'    : 'get',
341
            'url'       :  action,
341
            'url'       :  action,
342
        }).done(function(response) {
342
        }).done(function(response) {
343
            if(response['success']) {
343
            if(response['success']) {
344
                $('span[id="form-title"]').html('LABEL_EDIT');
-
 
-
 
344
                
345
                $('#form').attr('action', action);
345
                $('#form').attr('action', action);
346
                $('#form #name').val(response['data']['name']);
346
                $('#form #name').val(response['data']['name']);
347
                $('#form #status').val(response['data']['status']); 
347
                $('#form #status').val(response['data']['status']); 
348
                $('#form #points').val(response['data']['points']);
348
                $('#form #points').val(response['data']['points']);
349
                $('#form #minimum_points_required').val(response['data']['minimum_points_required']);
349
                $('#form #minimum_points_required').val(response['data']['minimum_points_required']);