Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 9006 Rev 14208
Línea 1383... Línea 1383...
1383
                    { name: 'tools', items: ['Maximize'] }
1383
                    { name: 'tools', items: ['Maximize'] }
1384
                ],
1384
                ],
1385
                removePlugins: 'elementspath,Anchor',
1385
                removePlugins: 'elementspath,Anchor',
1386
                heigth: 100
1386
                heigth: 100
1387
    });
1387
    });
-
 
1388
 
-
 
1389
    CKEDITOR.replace('form-option', {
-
 
1390
        toolbar: [
-
 
1391
                    { name: 'editing', items: ['Scayt'] },
-
 
1392
                    { name: 'links', items: ['Link', 'Unlink'] },
-
 
1393
                    { name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'] },
-
 
1394
                    { name: 'basicstyles', items: ['Bold', 'Italic', 'Strike', 'RemoveFormat'] },
-
 
1395
                    '/',
-
 
1396
                    { name: 'insert', items: ['Image', 'Table', 'HorizontalRule', 'SpecialChar'] },
-
 
1397
                    { name: 'styles', items: ['Styles', 'Format'] },
-
 
1398
                    { name: 'tools', items: ['Maximize'] }
-
 
1399
                ],
-
 
1400
                removePlugins: 'elementspath,Anchor',
-
 
1401
                heigth: 100
-
 
1402
    });
-
 
1403
 
1388
    CKEDITOR.replace('text', {
1404
    CKEDITOR.replace('text', {
1389
        toolbar: [
1405
        toolbar: [
1390
                    { name: 'editing', items: ['Scayt'] },
1406
                    { name: 'editing', items: ['Scayt'] },
1391
                    { name: 'links', items: ['Link', 'Unlink'] },
1407
                    { name: 'links', items: ['Link', 'Unlink'] },
1392
                    { name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'] },
1408
                    { name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'] },
Línea 1452... Línea 1468...
1452
        <div class="col-xs-12 col-md-12">
1468
        <div class="col-xs-12 col-md-12">
1453
            <form action="#" name="form-main" id="form-main">
1469
            <form action="#" name="form-main" id="form-main">
1454
                <input type="hidden" name="form-id" id="form-id" value="0" />
1470
                <input type="hidden" name="form-id" id="form-id" value="0" />
1455
                <input type="hidden" name="form-continue" id="form-continue" value="0" />
1471
                <input type="hidden" name="form-continue" id="form-continue" value="0" />
1456
                <?php
1472
                <?php
1457
                     //$form = $this->formAdd;
1473
                //$form = $this->formAdd;
1458
                     $form->setAttributes([
1474
                $form->setAttributes([
1459
                         'method' => 'post',
1475
                    'method' => 'post',
1460
                         'name' => 'form-main',
1476
                    'name' => 'form-main',
1461
                         'action' => $routeAdd,
1477
                    'action' => $routeAdd,
1462
                         'id' => 'form-main'
1478
                    'id' => 'form-main'
1463
                     ]);
1479
                ]);
1464
                     $form->prepare();
1480
                $form->prepare();
1465
                     echo $this->form()->openTag($form);
1481
                echo $this->form()->openTag($form);
1466
                ?>
1482
                ?>
1467
               <div class="form-group">
1483
                <div class="form-group">
1468
                    <?php
1484
                    <?php
1469
                    $element = $form->get('name');
1485
                    $element = $form->get('name');
1470
                    $element->setOptions(['label' => 'LABEL_FIRST_NAME']);
1486
                    $element->setOptions(['label' => 'LABEL_FIRST_NAME']);
1471
                    $element->setAttributes(['class' => 'form-control']);
1487
                    $element->setAttributes(['class' => 'form-control']);
1472
                    echo $this->formLabel($element);
1488
                    echo $this->formLabel($element);
1473
                    echo $this->formText($element);
1489
                    echo $this->formText($element);
1474
                    ?>
1490
                    ?>
1475
                </div>
1491
                </div>
1476
                <div class="form-group">
1492
                <div class="form-group">
1477
                        <?php
1493
                    <?php
1478
                        $element = $form->get('description');
1494
                    $element = $form->get('description');
1479
                        $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
1495
                    $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
1480
                        $element->setAttributes(['class' => 'form-control']);
1496
                    $element->setAttributes(['class' => 'form-control']);
1481
                        echo $this->formLabel($element);
1497
                    echo $this->formLabel($element);
1482
                        echo $this->formTextArea($element);
1498
                    echo $this->formTextArea($element);
1483
                        ?>
1499
                    ?>
1484
                </div>
1500
                </div>
1485
                <div class="form-group">
1501
                <div class="form-group">
1486
                        <?php
1502
                    <?php
1487
                        $element = $form->get('text');
1503
                    $element = $form->get('text');
1488
                        $element->setOptions(['label' => 'LABEL_TEXT']);
1504
                    $element->setOptions(['label' => 'LABEL_TEXT']);
1489
                        $element->setAttributes(['class' => 'form-control']);
1505
                    $element->setAttributes(['class' => 'form-control']);
1490
                        echo $this->formLabel($element);
1506
                    echo $this->formLabel($element);
1491
                        echo $this->formTextArea($element);
1507
                    echo $this->formTextArea($element);
1492
                        ?>
1508
                    ?>
1493
                </div>
1509
                </div>
1494
                <div class="form-group">
1510
                <div class="form-group">
1495
                        <?php
1511
                    <?php
1496
                        $element = $form->get('status');
1512
                    $element = $form->get('status');
1497
                        $element->setAttributes(['class' => 'form-control']);
1513
                    $element->setAttributes(['class' => 'form-control']);
1498
                        $element->setOptions(['label' => 'LABEL_STATUS']);
1514
                    $element->setOptions(['label' => 'LABEL_STATUS']);
1499
                        echo $this->formLabel($element);
1515
                    echo $this->formLabel($element);
1500
                        echo $this->formSelect($element);
1516
                    echo $this->formSelect($element);
1501
                        ?>
1517
                    ?>
1502
                    </div>
1518
                </div>
1503
                <br/>
1519
                <br />
1504
                <div class="row">
1520
                <div class="row">
1505
                    <div class="col-xs-12 col-md-12 text-right">
1521
                    <div class="col-xs-12 col-md-12 text-right">
1506
                        <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>
1522
                        <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>
1507
                    </div>
1523
                    </div>
1508
                </div>
1524
                </div>
Línea 1522... Línea 1538...
1522
    </div>
1538
    </div>
Línea 1523... Línea 1539...
1523
 
1539
 
Línea 1524... Línea 1540...
1524
    <!-- Create/Edit Form-->
1540
    <!-- Create/Edit Form-->
1525
 
1541
 
1526
    <!-- Section Modal -->
1542
    <!-- Section Modal -->
1527
    <div  id="modal-section" class="modal" tabindex="-1" role="dialog">
1543
    <div id="modal-section" class="modal" tabindex="-1" role="dialog">
1528
        <div class="modal-dialog modal-lg" role="document">
1544
        <div class="modal-dialog modal-lg" role="document">
1529
            <form action="#" name="form-section" id="form-section">
1545
            <form action="#" name="form-section" id="form-section">
1530
                <input type="hidden" name="section-slug" id="section-slug" value="" />
1546
                <input type="hidden" name="section-slug" id="section-slug" value="" />
Línea 1541... Línea 1557...
1541
                            <input type="text" name="section-name" id="section-name" class="form-control" maxlength="50" value="" />
1557
                            <input type="text" name="section-name" id="section-name" class="form-control" maxlength="50" value="" />
1542
                        </div>
1558
                        </div>
1543
                        <div class="form-group">
1559
                        <div class="form-group">
1544
                            <label for="section-text">LABEL_TEXT</label>
1560
                            <label for="section-text">LABEL_TEXT</label>
1545
                            <!--  ckeditor -->
1561
                            <!--  ckeditor -->
1546
                            <textarea  name="section-text" id="section-text" rows="5" class="ckeditor form-control"></textarea>
1562
                            <textarea name="section-text" id="section-text" rows="5" class="ckeditor form-control"></textarea>
1547
                            <script>
1563
                            <script>
1548
                                CKEDITOR.replace('section-text', {
1564
                                CKEDITOR.replace('section-text', {
1549
                                    toolbar: [
1565
                                    toolbar: [{
-
 
1566
                                            name: 'editing',
1550
                                        { name: 'editing', items: ['Scayt'] },
1567
                                            items: ['Scayt']
-
 
1568
                                        },
-
 
1569
                                        {
-
 
1570
                                            name: 'links',
1551
                                        { name: 'links', items: ['Link', 'Unlink'] },
1571
                                            items: ['Link', 'Unlink']
-
 
1572
                                        },
-
 
1573
                                        {
-
 
1574
                                            name: 'paragraph',
1552
                                        { name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'] },
1575
                                            items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote']
-
 
1576
                                        },
-
 
1577
                                        {
-
 
1578
                                            name: 'basicstyles',
1553
                                        { name: 'basicstyles', items: ['Bold', 'Italic', 'Strike', 'RemoveFormat'] },
1579
                                            items: ['Bold', 'Italic', 'Strike', 'RemoveFormat']
-
 
1580
                                        },
1554
                                        '/',
1581
                                        '/',
-
 
1582
                                        {
-
 
1583
                                            name: 'insert',
1555
                                        { name: 'insert', items: ['Image', 'Table', 'HorizontalRule', 'SpecialChar'] },
1584
                                            items: ['Image', 'Table', 'HorizontalRule', 'SpecialChar']
-
 
1585
                                        },
-
 
1586
                                        {
-
 
1587
                                            name: 'styles',
1556
                                        { name: 'styles', items: ['Styles', 'Format'] },
1588
                                            items: ['Styles', 'Format']
-
 
1589
                                        },
-
 
1590
                                        {
-
 
1591
                                            name: 'tools',
1557
                                        { name: 'tools', items: ['Maximize'] }
1592
                                            items: ['Maximize']
-
 
1593
                                        }
1558
                                    ],
1594
                                    ],
1559
                                    removePlugins: 'elementspath,Anchor',
1595
                                    removePlugins: 'elementspath,Anchor',
1560
                                    heigth: 100
1596
                                    heigth: 100
1561
                                });
1597
                                });
1562
                            </script>
1598
                            </script>
Línea 1572... Línea 1608...
1572
    </div>
1608
    </div>
1573
    <!-- End Modal Section -->
1609
    <!-- End Modal Section -->
Línea 1574... Línea 1610...
1574
 
1610
 
Línea 1575... Línea 1611...
1575
    <!-- Question Modal -->
1611
    <!-- Question Modal -->
1576
 
1612
 
1577
    <div  id="modal-question" class="modal" tabindex="-1" role="dialog">
1613
    <div id="modal-question" class="modal" tabindex="-1" role="dialog">
1578
        <div class="modal-dialog modal-lg" role="document">
1614
        <div class="modal-dialog modal-lg" role="document">
1579
            <form action="#" name="form-question" id="form-question">
1615
            <form action="#" name="form-question" id="form-question">
1580
                <input type="hidden" name="question-section" id="question-section" />
1616
                <input type="hidden" name="question-section" id="question-section" />
Línea 1588... Línea 1624...
1588
                    </div>
1624
                    </div>
1589
                    <div class="modal-body">
1625
                    <div class="modal-body">
1590
                        <div class="form-group">
1626
                        <div class="form-group">
1591
                            <label for="question-text">LABEL_TEXT</label>
1627
                            <label for="question-text">LABEL_TEXT</label>
1592
                            <!--  ckeditor -->
1628
                            <!--  ckeditor -->
1593
                            <textarea  name="question-text" id="question-text" rows="5" class="ckeditor form-control"></textarea>
1629
                            <textarea name="question-text" id="question-text" rows="5" class="ckeditor form-control"></textarea>
1594
                            <script>
1630
                            <script>
1595
                                CKEDITOR.replace('question-text', {
1631
                                CKEDITOR.replace('question-text', {
1596
                                    toolbar: [
1632
                                    toolbar: [{
-
 
1633
                                            name: 'editing',
1597
                                                { name: 'editing', items: ['Scayt'] },
1634
                                            items: ['Scayt']
-
 
1635
                                        },
-
 
1636
                                        {
-
 
1637
                                            name: 'links',
1598
                                                { name: 'links', items: ['Link', 'Unlink'] },
1638
                                            items: ['Link', 'Unlink']
-
 
1639
                                        },
-
 
1640
                                        {
-
 
1641
                                            name: 'paragraph',
1599
                                                { name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'] },
1642
                                            items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote']
-
 
1643
                                        },
-
 
1644
                                        {
-
 
1645
                                            name: 'basicstyles',
1600
                                                { name: 'basicstyles', items: ['Bold', 'Italic', 'Strike', 'RemoveFormat'] },
1646
                                            items: ['Bold', 'Italic', 'Strike', 'RemoveFormat']
-
 
1647
                                        },
1601
                                                '/',
1648
                                        '/',
-
 
1649
                                        {
-
 
1650
                                            name: 'insert',
1602
                                                { name: 'insert', items: ['Image', 'Table', 'HorizontalRule', 'SpecialChar'] },
1651
                                            items: ['Image', 'Table', 'HorizontalRule', 'SpecialChar']
-
 
1652
                                        },
-
 
1653
                                        {
-
 
1654
                                            name: 'styles',
1603
                                                { name: 'styles', items: ['Styles', 'Format'] },
1655
                                            items: ['Styles', 'Format']
-
 
1656
                                        },
-
 
1657
                                        {
-
 
1658
                                            name: 'tools',
1604
                                                { name: 'tools', items: ['Maximize'] }
1659
                                            items: ['Maximize']
1605
                                            ],
1660
                                        }
-
 
1661
                                    ],
1606
                                            removePlugins: 'elementspath,Anchor',
1662
                                    removePlugins: 'elementspath,Anchor',
1607
                                            heigth: 100
1663
                                    heigth: 100
1608
                                });
1664
                                });
1609
                            </script>
1665
                            </script>
1610
                        </div>
1666
                        </div>
1611
                        <div class="form-group">
1667
                        <div class="form-group">
1612
                            <label for="question-type">LABEL_TYPE</label>
1668
                            <label for="question-type">LABEL_TYPE</label>
1613
                            <select name="question-type" id="question-type" class="form-control">
1669
                            <select name="question-type" id="question-type" class="form-control">
1614
                                <option value="open">LABEL_OPEN</option>
1670
                                <option value="open">LABEL_OPEN</option>
1615
                                <option value="simple">Simple</option>
1671
                                <option value="simple">Simple</option>
1616
                                <option value="multiple">Multiple</option>
1672
                                <option value="multiple">Multiple</option>
1617
                                
1673
 
1618
                            </select>
1674
                            </select>
1619
                        </div>
1675
                        </div>
1620
                        <div class="form-group">
1676
                        <div class="form-group">
1621
                            <label for="question-max-length">LABEL_MAXLENGTH</label>
1677
                            <label for="question-max-length">LABEL_MAXLENGTH</label>
1622
                            <input type="text" name="question-max-length" id="question-max-length"  class="form-control" />
1678
                            <input type="text" name="question-max-length" id="question-max-length" class="form-control" />
1623
                        </div>
1679
                        </div>
1624
                        <div class="form-group">
1680
                        <div class="form-group">
1625
                            <label for="question-multiline">LABEL_MULTI_LINE</label>
1681
                            <label for="question-multiline">LABEL_MULTI_LINE</label>
1626
                            <select name="question-multiline" id="question-multiline" class="form-control">
1682
                            <select name="question-multiline" id="question-multiline" class="form-control">
1627
                                <option value="1">LABEL_YES</option>
1683
                                <option value="1">LABEL_YES</option>
Línea 1648... Línea 1704...
1648
 
1704
 
Línea 1649... Línea 1705...
1649
    <!-- End Modal Question -->
1705
    <!-- End Modal Question -->
Línea 1650... Línea 1706...
1650
 
1706
 
1651
    <!-- Modal Options -->
1707
    <!-- Modal Options -->
1652
 
1708
 
1653
    <div  id="modal-option" class="modal" tabindex="-1" role="dialog">
1709
    <div id="modal-option" class="modal" tabindex="-1" role="dialog">
1654
        <div class="modal-dialog modal-lg" role="document">
1710
        <div class="modal-dialog modal-lg" role="document">
1655
            <form action="#" name="form-option" id="form-option">
1711
            <form action="#" name="form-option" id="form-option">
Línea 1665... Línea 1721...
1665
                    </div>
1721
                    </div>
1666
                    <div class="modal-body">
1722
                    <div class="modal-body">
1667
                        <div class="form-group">
1723
                        <div class="form-group">
1668
                            <label for="option-text">LABEL_TEXT</label>
1724
                            <label for="option-text">LABEL_TEXT</label>
1669
                            <!--  ckeditor -->
1725
                            <!--  ckeditor -->
1670
                            <textarea  name="option-text" id="option-text" rows="5" class="ckeditor form-control"></textarea>
1726
                            <textarea name="option-text" id="option-text" rows="5" class="ckeditor form-control"></textarea>
1671
                        </div>
1727
                        </div>
1672
                    </div>
1728
                    </div>
1673
                    <div class="modal-footer">
1729
                    <div class="modal-footer">
1674
                        <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
1730
                        <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
1675
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
1731
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
Línea 1681... Línea 1737...
1681
 
1737
 
Línea 1682... Línea 1738...
1682
    <!-- End Modal Options -->
1738
    <!-- End Modal Options -->
1683
 
1739
 
1684
    <!---Template Sections --->
1740
    <!---Template Sections --->
1685
    <script id="sectionTemplate" type="text/x-jsrender">
1741
    <script id="sectionTemplate" type="text/x-jsrender">
1686
    <div class="panel panel-default" id="panel-{{:slug_section}}">
1742
        <div class="panel panel-default" id="panel-{{:slug_section}}">
1687
        <div class="panel-heading">
1743
        <div class="panel-heading">
1688
            <h4 class="panel-title">
1744
            <h4 class="panel-title">
1689
                <a class="accordion-toggle" data-toggle="collapse" aria-expanded="true" data-parent="#panel-{{:slug_section}}" href="#collapse-{{:slug_section}}">
1745
                <a class="accordion-toggle" data-toggle="collapse" aria-expanded="true" data-parent="#panel-{{:slug_section}}" href="#collapse-{{:slug_section}}">