Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 255 Rev 256
Línea 49... Línea 49...
49
// bootbox Alert //
49
// bootbox Alert //
50
$this->inlineScript()->appendFile($this->basePath('plugins/bootbox/bootbox.min.js'));
50
$this->inlineScript()->appendFile($this->basePath('plugins/bootbox/bootbox.min.js'));
51
// JsRender //
51
// JsRender //
52
$this->inlineScript()->appendFile($this->basePath('plugins/jsrender/jsrender.min.js'));
52
$this->inlineScript()->appendFile($this->basePath('plugins/jsrender/jsrender.min.js'));
Línea 53... Línea -...
53
 
-
 
54
$status_active = \LeadersLinked\Model\CompanySelfEvaluationForm::STATUS_ACTIVE;
-
 
55
$status_inactive = \LeadersLinked\Model\CompanySelfEvaluationForm::STATUS_INACTIVE;
-
 
56
 
-
 
57
$lang_es = \LeadersLinked\Model\CompanySelfEvaluationForm::LANGUAGE_SPANISH;
-
 
58
$lang_en = \LeadersLinked\Model\CompanySelfEvaluationForm::LANGUAGE_ENGLISH;
-
 
Línea 59... Línea 53...
59
 
53
 
60
 
54
 
61
$this->inlineScript()->captureStart();
55
$this->inlineScript()->captureStart();
62
echo <<<JS
56
echo <<<JS
Línea 1367... Línea 1361...
1367
        } else {
1361
        } else {
1368
            $('#form-question #question-range').parent().hide();
1362
            $('#form-question #question-range').parent().hide();
1369
        }
1363
        }
1370
    });
1364
    });
1371
    /**
1365
    /**
1372
     * Clicked new Form
-
 
1373
     */
-
 
1374
    $('button.btn-add-form').click(function(e) {
-
 
1375
        e.preventDefault();
-
 
1376
        objFormGenerator.clear();
-
 
1377
        objFormGenerator.render();
-
 
1378
        validatorForm.resetForm();
-
 
1379
        clearSectionData();
-
 
1380
        $('#form-main').attr('action', '$routeAdd');
-
 
1381
        $('#form-main #form-id').val('0');
-
 
1382
        $('#form-main #form-continue').val('0');
-
 
1383
        $('#form-main #form-name').val('');
-
 
1384
        $('#form-main #form-language').val('$lang_es'),
-
 
1385
        $('#form-main #form-status').val('$status_inactive');
-
 
1386
        CKEDITOR.instances['form-text'].setData('');
-
 
1387
        CKEDITOR.instances['form-description'].setData('');
-
 
1388
        $('#row-forms').hide();
-
 
1389
        $('#row-edit').show();
-
 
1390
        $('#form-main #form-name').focus();
-
 
1391
    });
-
 
1392
    /**
-
 
1393
     * Clicked cancel new/edit Form
1366
     * Clicked cancel new/edit Form
1394
     */
1367
     */
1395
    $('button.btn-edit-cancel').click(function(e) {
1368
    $('button.btn-edit-cancel').click(function(e) {
1396
        e.preventDefault();
1369
        e.preventDefault();
1397
        $('#row-edit').hide();
1370
        $('#row-edit').hide();
Línea 1506... Línea 1479...
1506
    <!-- Create/Edit Form -->
1479
    <!-- Create/Edit Form -->
Línea 1507... Línea 1480...
1507
 
1480
 
1508
    <div class="row" id="row-edit" style="display: none">
1481
    <div class="row" id="row-edit" style="display: none">
1509
        <div class="col-xs-12 col-md-12">
1482
        <div class="col-xs-12 col-md-12">
1510
            <form action="#" name="form-main" id="form-main">
-
 
1511
                <input type="hidden" name="form-id" id="form-id" value="0" />
-
 
1512
                <input type="hidden" name="form-continue" id="form-continue" value="0" />
-
 
1513
                <div class="form-group">
-
 
1514
                    <label for="form-name">LABEL_FIRST_NAME</label>
-
 
1515
                    <input type="text" name="form-name" id="form-name" class="form-control" maxlength="50" />
-
 
1516
                </div>
-
 
1517
                <div class="form-group">
-
 
1518
                    <label for="form-description">LABEL_DESCRIPTION</label>
-
 
1519
                    <!--  ckeditor -->
-
 
1520
                    <textarea  name="form-description" id="form-description" rows="5" class="ckeditor form-control"></textarea>
-
 
1521
                </div>
-
 
-
 
1483
            <form action="#" name="form-main" id="form-main">
1522
                <div class="form-group">
-
 
1523
                    <label for="form-text">LABEL_TEXT</label>
-
 
1524
                    <!--  ckeditor -->
-
 
1525
                    <textarea  name="form-text" id="form-text" rows="5" class="ckeditor form-control"></textarea>
-
 
1526
                </div>
-
 
1527
                <div class="form-group">
-
 
1528
                    <label for="form-language">LABEL_LANGUAGES</label>
-
 
1529
                    <select name="form-language" id="form-language" class="form-control">
-
 
1530
                        <option value="<?php echo $lang_en; ?>">LABEL_ENGLISH</option>
-
 
1531
                        <option value="<?php echo $lang_es; ?>">LABEL_SPANISH</option>
-
 
1532
                    </select>
-
 
1533
                </div>
-
 
1534
                <div class="form-group">
-
 
1535
                    <label for="form-status">LABEL_STATUS</label>
-
 
1536
                    <select name="form-status" id="form-status" class="form-control">
-
 
1537
                        <option value="<?php echo $status_inactive; ?>">LABEL_INACTIVE</option>
-
 
1538
                        <option value="<?php echo $status_active; ?>">LABEL_ACTIVE</option>
-
 
1539
                    </select>
-
 
1540
                </div>
-
 
1541
                <br/>
-
 
1542
                <div class="row">
-
 
1543
                    <div class="col-xs-12 col-md-12 text-right">
-
 
1544
                        <button class="btn btn-primary" id="btn-add-section" data-toggle="tooltip" title="LABEL_ADD LABEL_SECTION"><i class="fa fa-plus" aria-hidden="true"></i> LABEL_ADD LABEL_SECTION</button>
-
 
1545
                    </div>
-
 
1546
                </div>
-
 
1547
                <br />	
-
 
1548
                <div class="row">
-
 
1549
                    <div class="col-xs-12 col-md-12">
-
 
1550
                        <div class="panel-group" id="rows"></div>
-
 
1551
                    </div>
-
 
1552
                </div>
1484
                
1553
                <div class="form-group">
1485
                <div class="form-group">
1554
                    <button type="submit" form="form-main" class="btn btn-info btn-form-save-continue">LABEL_SAVE & LABEL_CONTINUE</button>
1486
                    <button type="submit" form="form-main" class="btn btn-info btn-form-save-continue">LABEL_SAVE & LABEL_CONTINUE</button>
1555
                    <button type="button" class="btn btn-primary btn-form-save-close">LABEL_SAVE & LABEL_CLOSE</button>
1487
                    <button type="button" class="btn btn-primary btn-form-save-close">LABEL_SAVE & LABEL_CLOSE</button>
1556
                    <button type="button" class="btn btn-secondary btn-edit-cancel">LABEL_CANCEL</button>
1488
                    <button type="button" class="btn btn-secondary btn-edit-cancel">LABEL_CANCEL</button>
1557
                </div>
1489
                </div>
1558
            </form>
1490
            </form>
1559
        </div>
1491
        </div>
Línea 1560... Línea -...
1560
    </div>
-
 
1561
 
-
 
1562
    <!-- Create/Edit Form-->
-
 
1563
 
-
 
1564
    <!-- Section Modal -->
-
 
1565
    <div  id="modal-section" class="modal" tabindex="-1" role="dialog">
-
 
1566
        <div class="modal-dialog modal-lg" role="document">
-
 
1567
            <form action="#" name="form-section" id="form-section">
-
 
1568
                <input type="hidden" name="section-slug" id="section-slug" value="" />
-
 
1569
                <div class="modal-content">
-
 
1570
                    <div class="modal-header">
-
 
1571
                        <h4 class="modal-title">LABEL_ADD LABEL_SECTION</h4>
-
 
1572
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
-
 
1573
                            <span aria-hidden="true">&times;</span>
-
 
1574
                        </button>
-
 
1575
                    </div>
-
 
1576
                    <div class="modal-body">
-
 
1577
                        <div class="form-group">
-
 
1578
                            <label for="section-name">LABEL_FIRST_NAME</label>
-
 
1579
                            <input type="text" name="section-name" id="section-name" class="form-control" maxlength="50" value="" />
-
 
1580
                        </div>
-
 
1581
                        <div class="form-group">
-
 
1582
                            <label for="section-text">LABEL_TEXT</label>
-
 
1583
                            <!--  ckeditor -->
-
 
1584
                            <textarea  name="section-text" id="section-text" rows="5" class="ckeditor form-control"></textarea>
-
 
1585
                        </div>
-
 
1586
                        <div class="form-group">
-
 
1587
                            <label for="section-value">LABEL_VALUE</label>
-
 
1588
                            <input type="text" name="section-value" id="section-value"  class="form-control" value="0" />
-
 
1589
                        </div>
-
 
1590
                    </div>
-
 
1591
                    <div class="modal-footer">
-
 
1592
                        <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
-
 
1593
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
-
 
1594
                    </div>
-
 
1595
                </div>
-
 
1596
            </form>
-
 
1597
        </div>
-
 
1598
    </div>
-
 
1599
    <!-- End Modal Section -->
-
 
1600
 
-
 
1601
    <!-- Question Modal -->
-
 
1602
 
-
 
1603
    <div  id="modal-question" class="modal" tabindex="-1" role="dialog">
-
 
1604
        <div class="modal-dialog modal-lg" role="document">
-
 
1605
            <form action="#" name="form-question" id="form-question">
-
 
1606
                <input type="hidden" name="question-section" id="question-section" />
-
 
1607
                <input type="hidden" name="question-slug" id="question-slug" />
-
 
1608
                <div class="modal-content">
-
 
1609
                    <div class="modal-header">
-
 
1610
                        <h4 class="modal-title">LABEL_ADD LABEL_QUESTION</h4>
-
 
1611
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
-
 
1612
                            <span aria-hidden="true">&times;</span>
-
 
1613
                        </button>
-
 
1614
                    </div>
-
 
1615
                    <div class="modal-body">
-
 
1616
                        <div class="form-group">
-
 
1617
                            <label for="question-text">LABEL_TEXT</label>
-
 
1618
                            <!--  ckeditor -->
-
 
1619
                            <textarea  name="question-text" id="question-text" rows="5" class="ckeditor form-control"></textarea>
-
 
1620
                        </div>
-
 
1621
                        <div class="form-group">
-
 
1622
                            <label for="question-value">LABEL_VALUE</label>
-
 
1623
                            <input type="text" name="question-value" id="question-value"  class="form-control" />
-
 
1624
                        </div>
-
 
1625
                        <div class="form-group">
-
 
1626
                            <label for="question-type">LABEL_TYPE</label>
-
 
1627
                            <select name="question-type" id="question-type" class="form-control">
-
 
1628
                                <option value="open">LABEL_OPEN</option>
-
 
1629
                                <option value="simple">Simple</option>
-
 
1630
                                <option value="multiple">Multiple</option>
-
 
1631
                                <option value="rating-open">LABEL_RATING_OPEN</option>
-
 
1632
                                <option value="rating-range">LABEL_RATING_RANGE</option>
-
 
1633
                            </select>
-
 
1634
                        </div>
-
 
1635
                        <div class="form-group">
-
 
1636
                            <label for="question-max-length">LABEL_MAXLENGTH</label>
-
 
1637
                            <input type="text" name="question-max-length" id="question-max-length"  class="form-control" />
-
 
1638
                        </div>
-
 
1639
                        <div class="form-group">
-
 
1640
                            <label for="question-multiline">LABEL_MULTI_LINE</label>
-
 
1641
                            <select name="question-multiline" id="question-multiline" class="form-control">
-
 
1642
                                <option value="1">LABEL_YES</option>
-
 
1643
                                <option value="0">LABEL_NOT</option>
-
 
1644
                            </select>
-
 
1645
                        </div>
-
 
1646
                        <div class="form-group">
-
 
1647
                            <label for="question-range">LABEL_RANGE</label>
-
 
1648
                            <select name="question-range" id="question-range" class="form-control">
-
 
1649
                                <option value="10">1-10</option>
-
 
1650
                                <option value="6">1-6</option>
-
 
1651
                                <option value="5">1-5</option>
-
 
1652
                            </select>
-
 
1653
                        </div>
-
 
1654
                    </div>
-
 
1655
                    <div class="modal-footer">
-
 
1656
                        <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
-
 
1657
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
-
 
1658
                    </div>
-
 
1659
                </div>
-
 
1660
            </form>
-
 
1661
        </div>
-
 
1662
    </div>
-
 
1663
 
-
 
1664
    <!-- End Modal Question -->
-
 
1665
 
-
 
1666
    <!-- Modal Options -->
-
 
1667
 
-
 
1668
    <div  id="modal-option" class="modal" tabindex="-1" role="dialog">
-
 
1669
        <div class="modal-dialog modal-lg" role="document">
-
 
1670
            <form action="#" name="form-option" id="form-option">
-
 
1671
                <input type="hidden" name="option-section" id="option-section" value="" />
-
 
1672
                <input type="hidden" name="option-question" id="option-question" value="" />
-
 
1673
                <input type="hidden" name="option-slug" id="option-slug" value="" />
-
 
1674
                <div class="modal-content">
-
 
1675
                    <div class="modal-header">
-
 
1676
                        <h4 class="modal-title">LABEL_OPTION</h4>
-
 
1677
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
-
 
1678
                            <span aria-hidden="true">&times;</span>
-
 
1679
                        </button>
-
 
1680
                    </div>
-
 
1681
                    <div class="modal-body">
-
 
1682
                        <div class="form-group">
-
 
1683
                            <label for="option-text">LABEL_TEXT</label>
-
 
1684
                            <!--  ckeditor -->
-
 
1685
                            <textarea  name="option-text" id="option-text" rows="5" class="ckeditor form-control"></textarea>
-
 
1686
                        </div>
-
 
1687
                        <div class="form-group">
-
 
1688
                            <label for="option-correct">LABEL_ANSWER_CORRECT</label>
-
 
1689
                            <select name="option-correct" id="option-correct" class="form-control">
-
 
1690
                                <option value="1">LABEL_YES</option>
-
 
1691
                                <option value="0">LABEL_NOT</option>
-
 
1692
                            </select>
-
 
1693
                        </div>
-
 
1694
                        <div class="form-group">
-
 
1695
                            <label for="option-value">LABEL_VALUE</label>
-
 
1696
                            <input type="text" name="option-value" id="option-value" class="form-control" />
-
 
1697
                        </div>
-
 
1698
                    </div>
-
 
1699
                    <div class="modal-footer">
-
 
1700
                        <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
-
 
1701
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
-
 
1702
                    </div>
-
 
1703
                </div>
-
 
1704
            </form>
-
 
1705
        </div>
1492
    </div>
1706
    </div>
-
 
Línea 1707... Línea 1493...
1707
 
1493
 
1708
    <!-- End Modal Options -->
1494
  
1709
 
1495
 
1710
    <!---Template Sections --->
1496
    <!---Template Sections --->