Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 243 Rev 16822
Línea 1... Línea 1...
1
<?php 
1
<?php 
2
use LeadersLinked\Model\CompanyService;
2
use LeadersLinked\Model\CompanyService;
3
use LeadersLinked\Model\Company;
3
use LeadersLinked\Model\Company;
Línea 4... Línea 4...
4
 
4
 
5
 
5
 
Línea 6... Línea 6...
6
//$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
6
//$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
7
//$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
7
//$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
Línea 8... Línea 8...
8
 
8
 
9
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css'));
9
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.css'));
10
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-responsive/css/responsive.bootstrap4.min.css'));
10
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.css'));
11
 
11
 
12
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
12
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net/jquery.dataTables.js'));
13
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
13
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.js'));
14
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
14
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/dataTables.responsive.min.js'));
15
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
15
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.min.js'));
16
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
16
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/jquery.validate.js'));
Línea 17... Línea 17...
17
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
17
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/additional-methods.js'));
18
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
18
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/localization/messages_es.js'));
19
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-input-number/input-number-format.jquery.js'));
19
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-input-number/input-number-format.jquery.js'));
20
$this->inlineScript()->appendFile($this->basePath('plugins/ckeditor/ckeditor.js'));
20
$this->inlineScript()->appendFile($this->basePath('assets/vendors/ckeditor/ckeditor.js'));
Línea 607... Línea 607...
607
	});
607
	});
Línea 608... Línea 608...
608
 
608
 
609
	$('body').on('click', 'a.btn-delete-form',function(e) {
609
	$('body').on('click', 'a.btn-delete-form',function(e) {
610
		e.preventDefault();
610
		e.preventDefault();
611
		form_id =  $(this).data('id')
611
		form_id =  $(this).data('id')
612
		
612
 
613
		bootbox.confirm({
613
          swal.fire({
614
		    title: "LABEL_DELETE LABEL_FORM",
614
            title: 'LABEL_ARE_YOU_SURE',
615
		    message: "LABEL_ARE_YOU_SURE",
615
            message: "LABEL_DELETE LABEL_FORM",
-
 
616
            icon: 'question',
616
		    buttons: {
617
            cancelButtonText: 'LABEL_NO',
617
		        cancel: {
618
            showCancelButton: true,
-
 
619
            confirmButtonText: 'LABEL_YES'
-
 
620
          }).then((result) => {
-
 
621
            if (result.isConfirmed) {
618
		            label: '<i class="fa fa-times"></i> LABEL_CANCEL'
622
            }
-
 
623
          });
619
		        },
624
 
620
		        confirm: {
625
          swal.fire({
621
		            label: '<i class="fa fa-check"></i> LABEL_ACCEPT'
626
            title: 'LABEL_ARE_YOU_SURE',
-
 
627
            icon: 'question',
622
		        }
628
            cancelButtonText: 'LABEL_NO',
-
 
629
            showCancelButton: true,
623
		    },
630
            confirmButtonText: 'LABEL_YES'
624
		    callback: function (result) {
631
          }).then((result) => {
-
 
632
            if (result.isConfirmed) {
625
			    if(result) {
633
 
626
    		    	$.ajax({
634
$.ajax({
627
    	                'dataType': 'json',
635
    	                'dataType': 'json',
628
    	                'method': 'post',
636
    	                'method': 'post',
629
    	                'url' :  'ajax.<?php echo $this->module; ?>.php?action=delete',
637
    	                'url' :  'ajax.<?php echo $this->module; ?>.php?action=delete',
630
    	                'data' :{
638
    	                'data' :{
Línea 639... Línea 647...
639
    	                	$.fn.showError(response['message']);
647
    	                	$.fn.showError(response['message']);
640
    	                }
648
    	                }
641
    	            }).fail(function( jqXHR, textStatus, errorThrown) {
649
    	            }).fail(function( jqXHR, textStatus, errorThrown) {
642
    					$.fn.showError(textStatus);
650
    					$.fn.showError(textStatus);
643
    	            });
651
    	            });
-
 
652
 
644
			    }
653
            }
645
		    }
654
          }); 
-
 
655
		
646
		});
656
		
Línea 647... Línea 657...
647
		
657
		
Línea 648... Línea 658...
648
 
658
 
Línea 649... Línea 659...
649
    });
659
    });
650
 
660
 
651
    $(document).on('click','[data-action="delete"]',function(){
661
    $(document).on('click','[data-action="delete"]',function(){
652
 
-
 
653
    	bootbox.confirm({
662
 
654
		    title: "LABEL_DELETE LABEL_FORMS_2",
663
          swal.fire({
655
		    message: "LABEL_ARE_YOU_SURE",
-
 
656
		    buttons: {
664
            title: 'LABEL_ARE_YOU_SURE',
657
		        cancel: {
665
            message: "LABEL_DELETE LABEL_FORMS_2",
658
		            label: '<i class="fa fa-times"></i> LABEL_CANCEL'
-
 
659
		        },
-
 
660
		        confirm: {
666
            icon: 'question',
661
		            label: '<i class="fa fa-check"></i> LABEL_ACCEPT'
667
            cancelButtonText: 'LABEL_NO',
-
 
668
            showCancelButton: true,
662
		        }
669
            confirmButtonText: 'LABEL_YES'
663
		    },
670
          }).then((result) => {
664
		    callback: function (result) {
671
            if (result.isConfirmed) {
665
			    if(result) {
672
 
666
			    	var d = currentSelected();	
673
                var d = currentSelected();	
667
    		    	$.ajax({
674
    		    	$.ajax({
Línea 680... Línea 687...
680
    	                	$.fn.showError(response['message']);
687
    	                	$.fn.showError(response['message']);
681
    	                }
688
    	                }
682
    	            }).fail(function( jqXHR, textStatus, errorThrown) {
689
    	            }).fail(function( jqXHR, textStatus, errorThrown) {
683
    					$.fn.showError(textStatus);
690
    					$.fn.showError(textStatus);
684
    	            });
691
    	            });
-
 
692
 
685
			    }
693
            }
686
		    }
694
          }); 
687
		});
695
 
Línea 688... Línea 696...
688
        
696
        
Línea 689... Línea 697...
689
    });
697
    });
Línea 1347... Línea 1355...
1347
	
1355
	
1348
	$('body').on('click', 'button.btn-delete-section', function(e){
1356
	$('body').on('click', 'button.btn-delete-section', function(e){
1349
		e.preventDefault();
1357
		e.preventDefault();
Línea 1350... Línea 1358...
1350
		var slug = $(this).data('slug');
1358
		var slug = $(this).data('slug');
1351
 
1359
 
1352
		bootbox.confirm({
1360
          swal.fire({
1353
		    title: "LABEL_DELETE LABEL_SECTION?",
1361
            title: 'LABEL_ARE_YOU_SURE',
1354
		    message: "LABEL_ARE_YOU_SURE",
1362
            message: "LABEL_DELETE LABEL_SECTION",
1355
		    buttons: {
1363
            icon: 'question',
1356
		        cancel: {
1364
            cancelButtonText: 'LABEL_NO',
1357
		            label: '<i class="fa fa-times"></i> LABEL_CANCEL'
1365
            showCancelButton: true,
1358
		        },
1366
            confirmButtonText: 'LABEL_YES'
1359
		        confirm: {
1367
          }).then((result) => {
1360
		            label: '<i class="fa fa-check"></i> LABEL_ACCEPT'
1368
            if (result.isConfirmed) {
1361
		        }
-
 
1362
		    },
-
 
1363
		    callback: function (result) {
-
 
1364
		    	if (result) {
1369
            }
1365
					objFormGenerator.deleteSection(slug);
-
 
1366
				}
1370
          }); 
Línea 1367... Línea 1371...
1367
		    }
1371
 
Línea 1486... Línea 1490...
1486
		e.preventDefault();
1490
		e.preventDefault();
Línea 1487... Línea 1491...
1487
		
1491
		
1488
		var slug_section	= $(this).data('section');
1492
		var slug_section	= $(this).data('section');
Línea 1489... Línea 1493...
1489
		var slug 			= $(this).data('slug');
1493
		var slug 			= $(this).data('slug');
1490
 
1494
 
1491
		bootbox.confirm({
1495
          swal.fire({
1492
			title: "LABEL_DELETE LABEL_QUESTION?",
-
 
1493
			message: "LABEL_ARE_YOU_SURE",
1496
            title: 'LABEL_ARE_YOU_SURE',
1494
			buttons: {
1497
            message: "LABEL_DELETE LABEL_QUESTION",
1495
				cancel: {
-
 
1496
   					label: '<i class="fa fa-times"></i> LABEL_CANCEL'
1498
            icon: 'question',
1497
    			},
1499
            cancelButtonText: 'LABEL_NO',
1498
			    confirm: {
-
 
1499
			    	label: '<i class="fa fa-check"></i> LABEL_ACCEPT'
-
 
1500
			    }
1500
            showCancelButton: true,
1501
			},
1501
            confirmButtonText: 'LABEL_YES'
1502
			callback: function (result) {
1502
          }).then((result) => {
-
 
1503
            if (result.isConfirmed) {
1503
				if (result) {
1504
                objFormGenerator.deleteQuestion(slug_section, slug);
1504
					objFormGenerator.deleteQuestion(slug_section, slug);
1505
            }
1505
				}
1506
          }); 
1506
			}
1507
 
Línea 1507... Línea 1508...
1507
		});		    
1508
	    
1508
	});
1509
	});
Línea 1629... Línea 1630...
1629
		e.preventDefault();
1630
		e.preventDefault();
1630
		var slug_section	= $(this).data('section');
1631
		var slug_section	= $(this).data('section');
1631
		var slug_question	= $(this).data('question');
1632
		var slug_question	= $(this).data('question');
1632
		    var slug 			= $(this).data('slug');
1633
		    var slug 			= $(this).data('slug');
Línea -... Línea 1634...
-
 
1634
 
-
 
1635
          swal.fire({
-
 
1636
            title: 'LABEL_ARE_YOU_SURE',
-
 
1637
            message: "LABEL_DELETE LABEL_OPTION",
-
 
1638
            icon: 'question',
-
 
1639
            cancelButtonText: 'LABEL_NO',
-
 
1640
            showCancelButton: true,
-
 
1641
            confirmButtonText: 'LABEL_YES'
-
 
1642
          }).then((result) => {
-
 
1643
            if (result.isConfirmed) {
-
 
1644
            }
Línea 1633... Línea -...
1633
 
-
 
1634
 
-
 
1635
		bootbox.confirm({
-
 
1636
			title: "LABEL_DELETE LABEL_OPTION?",
-
 
1637
			message: "LABEL_ARE_YOU_SURE",
-
 
1638
			buttons: {
-
 
1639
				cancel: {
-
 
1640
	   				label: '<i class="fa fa-times"></i> LABEL_CANCEL'
-
 
1641
	    		},
-
 
1642
				confirm: {
-
 
1643
					label: '<i class="fa fa-check"></i> LABEL_ACCEPT'
-
 
1644
				}
-
 
1645
			},
-
 
1646
			callback: function (result) {
-
 
1647
				if (result) {
-
 
1648
					objFormGenerator.deleteOption(slug_section, slug_question, slug);
1645
          }); 
1649
				}
-
 
1650
			}
1646
 
Línea 1651... Línea 1647...
1651
		});			    
1647
	    
Línea 1652... Línea 1648...
1652
	})
1648
	})
Línea 1872... Línea 1868...
1872
							
1868
							
1873
 
1869
 
1874
							<div class="form-group">
1870
							<div class="form-group">
1875
								<button type="submit" form="form-main" class="btn btn-info btn-form-save-continue">LABEL_SAVE & LABEL_CONTINUE</button>
1871
								<button type="submit" form="form-main" class="btn btn-info btn-form-save-continue">LABEL_SAVE & LABEL_CONTINUE</button>
1876
								<button type="button" class="btn btn-primary btn-form-save-close">LABEL_SAVE & LABEL_CLOSE</button>
1872
								<button type="button" class="btn btn-primary btn-form-save-close">LABEL_SAVE & LABEL_CLOSE</button>
1877
								<button type="button" class="btn btn-secondary btn-edit-cancel">LABEL_CANCEL</button>
1873
								<button type="button" class="btn btn-light btn-edit-cancel">LABEL_CANCEL</button>
1878
							</div>
1874
							</div>
1879
						</form>
1875
						</form>
1880
					</div>
1876
					</div>
Línea 1908... Línea 1904...
1908
													<input type="text" name="section-value" id="section-value"  class="form-control" value="0" />
1904
													<input type="text" name="section-value" id="section-value"  class="form-control" value="0" />
1909
												</div>
1905
												</div>
1910
											</div>
1906
											</div>
1911
											<div class="modal-footer">
1907
											<div class="modal-footer">
1912
												<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
1908
												<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
1913
												<button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
1909
												<button type="button" class="btn btn-light" data-dismiss="modal">LABEL_CLOSE</button>
1914
											</div>
1910
											</div>
1915
									</div>
1911
									</div>
1916
								</form>
1912
								</form>
1917
						</div>
1913
						</div>
1918
					</div>
1914
					</div>
Línea 1970... Línea 1966...
1970
														</select>
1966
														</select>
1971
													</div>
1967
													</div>
1972
												</div>
1968
												</div>
1973
												<div class="modal-footer">
1969
												<div class="modal-footer">
1974
													<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
1970
													<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
1975
													<button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
1971
													<button type="button" class="btn btn-light" data-dismiss="modal">LABEL_CLOSE</button>
1976
												</div>
1972
												</div>
1977
										</div>
1973
										</div>
1978
									</form>
1974
									</form>
1979
							</div>
1975
							</div>
1980
						</div>
1976
						</div>
Línea 2011... Línea 2007...
2011
													<input type="text" name="option-value" id="option-value" class="form-control" />
2007
													<input type="text" name="option-value" id="option-value" class="form-control" />
2012
												</div>
2008
												</div>
2013
											</div>
2009
											</div>
2014
											<div class="modal-footer">
2010
											<div class="modal-footer">
2015
												<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2011
												<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2016
												<button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
2012
												<button type="button" class="btn btn-light" data-dismiss="modal">LABEL_CLOSE</button>
2017
											</div>
2013
											</div>
2018
									</div>
2014
									</div>
2019
								</form>
2015
								</form>
2020
						</div>
2016
						</div>
2021
					</div>
2017
					</div>