Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 6547 Rev 6583
Línea 341... Línea 341...
341
        e.preventDefault();
341
        e.preventDefault();
Línea 342... Línea 342...
342
        
342
        
343
        $("#location-box").modal('hide');
343
        $("#location-box").modal('hide');
344
        return false;
344
        return false;
345
    });
-
 
346
    
-
 
347
    var validatorExtended = $('#form-extended').validate({
-
 
348
        debug: true,
-
 
349
        onclick: false,
-
 
350
        onkeyup: false,
-
 
351
        onfocusout: false,
-
 
352
        ignore: [],
-
 
353
        rules: {
-
 
354
            'description': {
-
 
355
                updateCkeditor:function() {
-
 
356
                        CKEDITOR.instances.description.updateElement();
-
 
357
                },
-
 
358
                required: false,
-
 
359
            },
-
 
360
        },
-
 
361
 
-
 
362
        submitHandler: function(form)
-
 
363
        {
-
 
364
            NProgress.start();
-
 
365
            $.ajax({
-
 
366
                'dataType'  : 'json',
-
 
367
                'accept'    : 'application/json',
-
 
368
                'method'    : 'post',
-
 
369
                'url'       :  $('#form-extended').attr('action'),
-
 
370
                'data'      :  $('#form-extended').serialize()
-
 
371
            }).done(function(response) {
-
 
372
                if(response['success']) {
-
 
373
 
-
 
374
                    $('#overview-description').html(response['data']['description']);
-
 
375
                    $("#extended-box").modal('hide');
-
 
376
                } else {
-
 
377
                    validatorExtended.resetForm();
-
 
378
                    if(jQuery.type(response['data']) == 'string') {
-
 
379
                        $.fn.showError(response['data']);
-
 
380
                    } else  {
-
 
381
                        $.each(response['data'], function( fieldname, errors ) {
-
 
382
                            $.fn.showFormErrorValidator('#form-extended #' + fieldname, errors);
-
 
383
                        });
-
 
384
                    }
-
 
385
                }
-
 
386
            }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
387
                $.fn.showError(textStatus);
-
 
388
            }).always(function() {
-
 
389
                NProgress.done();
-
 
390
            });
-
 
391
            return false;
-
 
392
        },
-
 
393
        invalidHandler: function(form, validator) {
-
 
394
        
-
 
395
        }
-
 
396
    });
-
 
397
 
-
 
398
 
-
 
399
    $('.btn-extended-edit').on("click", function(e){
-
 
400
        e.preventDefault();
-
 
401
 
-
 
402
        NProgress.start();
-
 
403
        $.ajax({
-
 
404
            'dataType'  : 'json',
-
 
405
            'accept'    : 'application/json',
-
 
406
            'method'    : 'get',
-
 
407
            'url'       : '$routeExtended',
-
 
408
        }).done(function(response) {
-
 
409
           if(response['success']) {
-
 
410
                CKEDITOR.instances.description.setData(response['data']['description']);
-
 
411
                validatorExtended.resetForm();
-
 
412
 
-
 
413
                $("#extended-box").modal('show');
-
 
414
            } else {
-
 
415
                $.fn.showError(response['data']);
-
 
416
            }
-
 
417
        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
418
            $.fn.showError(textStatus);
-
 
419
        }).always(function() {
-
 
420
            NProgress.done();
-
 
421
        });
-
 
422
        return false;
-
 
423
 
-
 
424
    });
-
 
425
    
-
 
426
    $('.btn-extended-close').on("click", function(e){
-
 
427
        e.preventDefault();
-
 
428
        
-
 
429
        $("#extended-box").modal('hide');
-
 
430
        return false;
-
 
Línea 431... Línea 345...
431
    });
345
    });
432
 
346
 
433
	var validatorCompanySize = $('#form-company-size').validate({
347
	var validatorCompanySize = $('#form-company-size').validate({
434
        debug: true,
348
        debug: true,
Línea 676... Línea 590...
676
</style>
590
</style>
Línea 677... Línea 591...
677
 
591
 
678
<!-- Content Header (Page header) -->
592
<!-- Content Header (Page header) -->
679
<div id="profile">
593
<div id="profile">
680
</div>
-
 
681
<div class="modal" tabindex="-1" role="dialog" id="extended-box">
-
 
682
    <div class="modal-dialog" role="document">
-
 
683
        <?php
-
 
684
        $form = $this->formExtended;
-
 
685
        $form->setAttributes([
-
 
686
            'method' => 'post',
-
 
687
            'action' => $routeExtended,
-
 
688
            'name' => 'form-extended',
-
 
689
            'id' => 'form-extended'
-
 
690
        ]);
-
 
691
        $form->prepare();
-
 
692
        echo $this->form()->openTag($form);
-
 
693
        ?>
-
 
694
        <div class="modal-content">
-
 
695
            <div class="modal-header">
-
 
696
                <h3 class="modal-title">LABEL_CHANGE</h3>
-
 
697
            </div>
-
 
698
            <div class="modal-body">
-
 
699
                <div class="form-group">
-
 
700
                    <?php
-
 
701
                    $element = $form->get('description');
-
 
702
                    $element->setAttributes(['class' => 'form-control']);
-
 
703
                    $element->setOptions(['label' => 'LABEL_OVERVIEW']);
-
 
704
                    echo $this->formLabel($element);
-
 
705
                    echo $this->formTextArea($element);
-
 
706
                    ?>
-
 
707
                </div>
-
 
708
            </div>
-
 
709
            <div class="modal-footer">
-
 
710
                <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
-
 
711
                <button type="button" class="btn btn-default btn-extended-close">LABEL_CANCEL</button>
-
 
712
            </div>
-
 
713
            <?php echo $this->form()->closeTag($form); ?>
-
 
714
        </div>
-
 
715
    </div>
-
 
716
</div>
594
</div>
717
<div class="modal" tabindex="-1" role="dialog" id="industry-box">
595
<div class="modal" tabindex="-1" role="dialog" id="industry-box">
718
    <div class="modal-dialog" role="document">
596
    <div class="modal-dialog" role="document">
719
        <?php
597
        <?php
720
        $form = $this->formIndustry;
598
        $form = $this->formIndustry;