Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 12491 Rev 13335
Línea 1387... Línea 1387...
1387
$this->headLink()->appendStylesheet($this->basePath('/react-bundles/organizational-climate/form/main.css'));
1387
$this->headLink()->appendStylesheet($this->basePath('/react-bundles/organizational-climate/form/main.css'));
1388
$this->inlineScript()->appendFile('/react-bundles/organizational-climate/form/organizationalFormBundle.js');
1388
$this->inlineScript()->appendFile('/react-bundles/organizational-climate/form/organizationalFormBundle.js');
1389
?>
1389
?>
Línea 1390... Línea 1390...
1390
 
1390
 
1391
<div id="organizational_climate-form">
-
 
1392
</div>
-
 
1393
 
-
 
1394
<!-- Content Header (Page header) -->
-
 
1395
<section class="content-header">
-
 
1396
    <div class="container-fluid">
-
 
1397
        <div class="row mb-2">
-
 
1398
            <div class="col-sm-12">
-
 
1399
                <h1>LABEL_SELF_EVALUATION_FORMS</h1>
-
 
1400
            </div>
-
 
1401
        </div>
-
 
1402
    </div>
-
 
1403
    <!-- /.container-fluid -->
-
 
1404
</section>
-
 
1405
<section class="content">
-
 
1406
    <div class="container-fluid" id="row-forms">
-
 
1407
        <div class="row">
-
 
1408
            <div class="col-12">
-
 
1409
                <div class="card">
-
 
1410
                    <div class="card-body">
-
 
1411
                        <table id="gridTable" class="table   table-hover">
-
 
1412
                            <thead>
-
 
1413
                                <tr>
-
 
1414
                                    <th>LABEL_NAME</th>
-
 
1415
                                    <th>LABEL_DESCRIPTION</th>
-
 
1416
                                    <th>LABEL_ACTIVE</th>
-
 
1417
                                    <th>LABEL_ACTIONS</th>
-
 
1418
                                </tr>
-
 
1419
                            </thead>
-
 
1420
                            <tbody></tbody>
-
 
1421
                        </table>
-
 
1422
                    </div>
-
 
1423
                    <div class="card-footer clearfix">
-
 
1424
                        <div style="float:right;">
-
 
1425
                            <button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
-
 
1426
                            <?php if ($allowAdd) : ?>
-
 
1427
                                <button type="button" class="btn btn-primary btn-add-form"><i class="fa fa-plus"></i> LABEL_ADD </button>
-
 
1428
                            <?php endif; ?>
-
 
1429
                        </div>
-
 
1430
                    </div>
-
 
1431
                </div>
-
 
1432
            </div>
-
 
1433
        </div>
-
 
1434
    </div>
-
 
1435
 
-
 
1436
    <!-- Create/Edit Form -->
-
 
1437
 
-
 
1438
    <div class="row" id="row-edit" style="display: none">
-
 
1439
        <div class="col-xs-12 col-md-12">
-
 
1440
            <form action="#" name="form-main" id="form-main">
-
 
1441
                <input type="hidden" name="form-id" id="form-id" value="0" />
-
 
1442
                <input type="hidden" name="form-continue" id="form-continue" value="0" />
-
 
1443
                <?php
-
 
1444
                //$form = $this->formAdd;
-
 
1445
                $form->setAttributes([
-
 
1446
                    'method' => 'post',
-
 
1447
                    'name' => 'form-main',
-
 
1448
                    'action' => $routeAdd,
-
 
1449
                    'id' => 'form-main'
-
 
1450
                ]);
-
 
1451
                $form->prepare();
-
 
1452
                echo $this->form()->openTag($form);
-
 
1453
                ?>
-
 
1454
                <div class="form-group">
-
 
1455
                    <?php
-
 
1456
                    $element = $form->get('name');
-
 
1457
                    $element->setOptions(['label' => 'LABEL_FIRST_NAME']);
-
 
1458
                    $element->setAttributes(['class' => 'form-control']);
-
 
1459
                    echo $this->formLabel($element);
-
 
1460
                    echo $this->formText($element);
-
 
1461
                    ?>
-
 
1462
                </div>
-
 
1463
                <div class="form-group">
-
 
1464
                    <?php
-
 
1465
                    $element = $form->get('description');
-
 
1466
                    $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
-
 
1467
                    $element->setAttributes(['class' => 'form-control']);
-
 
1468
                    echo $this->formLabel($element);
-
 
1469
                    echo $this->formTextArea($element);
-
 
1470
                    ?>
-
 
1471
                </div>
-
 
1472
                <div class="form-group">
-
 
1473
                    <?php
-
 
1474
                    $element = $form->get('text');
-
 
1475
                    $element->setOptions(['label' => 'LABEL_TEXT']);
-
 
1476
                    $element->setAttributes(['class' => 'form-control']);
-
 
1477
                    echo $this->formLabel($element);
-
 
1478
                    echo $this->formTextArea($element);
-
 
1479
                    ?>
-
 
1480
                </div>
-
 
1481
                <div class="form-group">
-
 
1482
                    <?php
-
 
1483
                    $element = $form->get('status');
-
 
1484
                    $element->setAttributes(['class' => 'form-control']);
-
 
1485
                    $element->setOptions(['label' => 'LABEL_STATUS']);
-
 
1486
                    echo $this->formLabel($element);
-
 
1487
                    echo $this->formSelect($element);
-
 
1488
                    ?>
-
 
1489
                </div>
-
 
1490
                <br />
-
 
1491
                <div class="row">
-
 
1492
                    <div class="col-xs-12 col-md-12 text-right">
-
 
1493
                        <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>
-
 
1494
                    </div>
-
 
1495
                </div>
-
 
1496
                <br />
-
 
1497
                <div class="row">
-
 
1498
                    <div class="col-xs-12 col-md-12">
-
 
1499
                        <div class="panel-group" id="rows"></div>
-
 
1500
                    </div>
-
 
1501
                </div>
-
 
1502
                <div class="form-group">
-
 
1503
                    <button type="submit" form="form-main" class="btn btn-info btn-form-save-continue">LABEL_SAVE & LABEL_CONTINUE</button>
-
 
1504
                    <button type="button" class="btn btn-primary btn-form-save-close">LABEL_SAVE & LABEL_CLOSE</button>
-
 
1505
                    <button type="button" class="btn btn-secondary btn-edit-cancel">LABEL_CANCEL</button>
-
 
1506
                </div>
-
 
1507
            </form>
-
 
1508
        </div>
-
 
1509
    </div>
-
 
1510
 
-
 
1511
    <!-- Create/Edit Form-->
-
 
1512
 
-
 
1513
    <!-- Section Modal -->
-
 
1514
    <div id="modal-section" class="modal" tabindex="-1" role="dialog">
-
 
1515
        <div class="modal-dialog modal-lg" role="document">
-
 
1516
            <form action="#" name="form-section" id="form-section">
-
 
1517
                <input type="hidden" name="section-slug" id="section-slug" value="" />
-
 
1518
                <div class="modal-content">
-
 
1519
                    <div class="modal-header">
-
 
1520
                        <h4 class="modal-title">LABEL_ADD LABEL_SECTION</h4>
-
 
1521
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
-
 
1522
                            <span aria-hidden="true">&times;</span>
-
 
1523
                        </button>
-
 
1524
                    </div>
-
 
1525
                    <div class="modal-body">
-
 
1526
                        <div class="form-group">
-
 
1527
                            <label for="section-name">LABEL_FIRST_NAME</label>
-
 
1528
                            <input type="text" name="section-name" id="section-name" class="form-control" maxlength="50" value="" />
-
 
1529
                        </div>
-
 
1530
                        <div class="form-group">
-
 
1531
                            <label for="section-text">LABEL_TEXT</label>
-
 
1532
                            <!--  ckeditor -->
-
 
1533
                            <textarea name="section-text" id="section-text" rows="5" class="ckeditor form-control"></textarea>
-
 
1534
                        </div>
-
 
1535
                    </div>
-
 
1536
                    <div class="modal-footer">
-
 
1537
                        <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
-
 
1538
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
-
 
1539
                    </div>
-
 
1540
                </div>
-
 
1541
            </form>
-
 
1542
        </div>
-
 
1543
    </div>
-
 
1544
    <!-- End Modal Section -->
-
 
1545
 
-
 
1546
    <!-- Question Modal -->
-
 
1547
 
-
 
1548
    <div id="modal-question" class="modal" tabindex="-1" role="dialog">
-
 
1549
        <div class="modal-dialog modal-lg" role="document">
-
 
1550
            <form action="#" name="form-question" id="form-question">
-
 
1551
                <input type="hidden" name="question-section" id="question-section" />
-
 
1552
                <input type="hidden" name="question-slug" id="question-slug" />
-
 
1553
                <div class="modal-content">
-
 
1554
                    <div class="modal-header">
-
 
1555
                        <h4 class="modal-title">LABEL_ADD LABEL_QUESTION</h4>
-
 
1556
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
-
 
1557
                            <span aria-hidden="true">&times;</span>
-
 
1558
                        </button>
-
 
1559
                    </div>
-
 
1560
                    <div class="modal-body">
-
 
1561
                        <div class="form-group">
-
 
1562
                            <label for="question-text">LABEL_TEXT</label>
-
 
1563
                            <!--  ckeditor -->
-
 
1564
                            <textarea name="question-text" id="question-text" rows="5" class="ckeditor form-control"></textarea>
-
 
1565
                        </div>
-
 
1566
                        <div class="form-group">
-
 
1567
                            <label for="question-type">LABEL_TYPE</label>
-
 
1568
                            <select name="question-type" id="question-type" class="form-control">
-
 
1569
                                <option value="open">LABEL_OPEN</option>
-
 
1570
                                <option value="simple">Simple</option>
-
 
1571
                                <option value="multiple">Multiple</option>
-
 
1572
 
-
 
1573
                            </select>
-
 
1574
                        </div>
-
 
1575
                        <div class="form-group">
-
 
1576
                            <label for="question-max-length">LABEL_MAXLENGTH</label>
-
 
1577
                            <input type="text" name="question-max-length" id="question-max-length" class="form-control" />
-
 
1578
                        </div>
-
 
1579
                        <div class="form-group">
-
 
1580
                            <label for="question-multiline">LABEL_MULTI_LINE</label>
-
 
1581
                            <select name="question-multiline" id="question-multiline" class="form-control">
-
 
1582
                                <option value="1">LABEL_YES</option>
-
 
1583
                                <option value="0">LABEL_NOT</option>
-
 
1584
                            </select>
-
 
1585
                        </div>
-
 
1586
                        <div class="form-group">
-
 
1587
                            <label for="question-range">LABEL_RANGE</label>
-
 
1588
                            <select name="question-range" id="question-range" class="form-control">
-
 
1589
                                <option value="10">1-10</option>
-
 
1590
                                <option value="6">1-6</option>
-
 
1591
                                <option value="5">1-5</option>
-
 
1592
                            </select>
-
 
1593
                        </div>
-
 
1594
                    </div>
-
 
1595
                    <div class="modal-footer">
-
 
1596
                        <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
-
 
1597
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
-
 
1598
                    </div>
-
 
1599
                </div>
-
 
1600
            </form>
-
 
1601
        </div>
-
 
1602
    </div>
-
 
1603
 
-
 
1604
    <!-- End Modal Question -->
-
 
1605
 
-
 
1606
    <!-- Modal Options -->
-
 
1607
 
-
 
1608
    <div id="modal-option" class="modal" tabindex="-1" role="dialog">
-
 
1609
        <div class="modal-dialog modal-lg" role="document">
-
 
1610
            <form action="#" name="form-option" id="form-option">
-
 
1611
                <input type="hidden" name="option-section" id="option-section" value="" />
-
 
1612
                <input type="hidden" name="option-question" id="option-question" value="" />
-
 
1613
                <input type="hidden" name="option-slug" id="option-slug" value="" />
-
 
1614
                <div class="modal-content">
-
 
1615
                    <div class="modal-header">
-
 
1616
                        <h4 class="modal-title">LABEL_OPTION</h4>
-
 
1617
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
-
 
1618
                            <span aria-hidden="true">&times;</span>
-
 
1619
                        </button>
-
 
1620
                    </div>
-
 
1621
                    <div class="modal-body">
-
 
1622
                        <div class="form-group">
-
 
1623
                            <label for="option-text">LABEL_TEXT</label>
-
 
1624
                            <!--  ckeditor -->
-
 
1625
                            <textarea name="option-text" id="option-text" rows="5" class="ckeditor form-control"></textarea>
-
 
1626
                        </div>
-
 
1627
                    </div>
-
 
1628
                    <div class="modal-footer">
-
 
1629
                        <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
-
 
1630
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
-
 
1631
                    </div>
-
 
1632
                </div>
-
 
1633
            </form>
-
 
1634
        </div>
-
 
1635
    </div>
-
 
1636
 
-
 
1637
    <!-- End Modal Options -->
-
 
1638
 
-
 
1639
    <!---Template Sections --->
-
 
1640
    <script id="sectionTemplate" type="text/x-jsrender">
-
 
1641
        <div class="panel panel-default" id="panel-{{:slug_section}}">
-
 
1642
        <div class="panel-heading">
-
 
1643
            <h4 class="panel-title">
-
 
1644
                <a class="accordion-toggle" data-toggle="collapse" aria-expanded="true" data-parent="#panel-{{:slug_section}}" href="#collapse-{{:slug_section}}">
-
 
1645
                    <span class="section-name{{:slug_section}}">
-
 
1646
                        {{:name}}
-
 
1647
                    </span>
-
 
1648
                </a>
-
 
1649
            </h4>
-
 
1650
        </div>
-
 
1651
        <div id="collapse-{{:slug_section}}" class="panel-collapse in collapse show">
-
 
1652
            <div class="panel-body">
-
 
1653
                <div class="table-responsive">
-
 
1654
                    <table class="table table-bordered">
-
 
1655
                        <thead>
-
 
1656
                            <tr>
-
 
1657
                                <th style="width: 10%;">LABEL_ELEMENT</th>
-
 
1658
                                <th style="width: 50%;">LABEL_TEXT</th>
-
 
1659
                                <th style="width: 10%;">LABEL_TYPE</th>
-
 
1660
                                <th style="width: 20%;">LABEL_ACTIONS</th>
-
 
1661
                            </tr>
-
 
1662
                        </thead>
-
 
1663
                        <tbody>
-
 
1664
                            <tr class="tr-section">
-
 
1665
                                <td class="text-left">LABEL_SECTION</td>
-
 
1666
                                <td class="text-left">{{:name}}</td>
-
 
1667
                                <td></td>
-
 
1668
                                <td>
-
 
1669
                                    <button class="btn btn-default btn-edit-section" data-section="{{:slug_section}}" data-toggle="tooltip"  data-original-title="LABEL_EDIT LABEL_SECTION"><i class="fa fa-edit" aria-hidden="true"></i> LABEL_EDIT LABEL_SECTION </button>
-
 
1670
                                    <button class="btn btn-default btn-delete-section" data-section="{{:slug_section}}" data-toggle="tooltip"  data-original-title="LABEL_DELETE LABEL_SECTION"><i class="fa fa-ban" aria-hidden="true"></i> LABEL_DELETE LABEL_SECTION </button>
-
 
1671
                                    <button class="btn btn-default btn-add-question" data-section="{{:slug_section}}" data-toggle="tooltip"  data-original-title="LABEL_ADD  LABEL_QUESTION"><i class="fa fa-plus" aria-hidden="true"></i> LABEL_ADD  LABEL_QUESTION </button>
-
 
1672
                                </td>
-
 
1673
                            </tr>
-
 
1674
                            {{for questions}}
-
 
1675
                            <tr class="tr-question">
-
 
1676
                                <td class="text-left">--LABEL_QUESTION</td>
-
 
1677
                                <td class="text-left">
-
 
1678
                                    {{:~removeTags(text)}}
-
 
1679
                                </td>
-
 
1680
                                <td class="text-capitalize">
-
 
1681
                                    {{if type == 'open'}} LABEL_OPEN {{/if}}
-
 
1682
                                    {{if type == 'simple'}} Simple {{/if}}
-
 
1683
                                    {{if type == 'multiple'}} Multiple {{/if}}
-
 
1684
                                </td>
-
 
1685
                                <td>
-
 
1686
                                    <button class="btn btn-default btn-edit-question" data-section="{{:slug_section}}" data-question="{{:slug_question}}" data-toggle="tooltip"  data-original-title="LABEL_EDIT LABEL_QUESTION"><i class="fa fa-edit" aria-hidden="true"></i> LABEL_EDIT LABEL_QUESTION</button>
-
 
1687
                                    <button class="btn btn-default btn-delete-question" data-section="{{:slug_section}}" data-question="{{:slug_question}}" data-toggle="tooltip"  data-original-title="LABEL_DELETE LABEL_QUESTION"><i class="fa fa-ban" aria-hidden="true"></i> LABEL_DELETE LABEL_QUESTION</button>
-
 
1688
                                 
-
 
1689
                                    {{if type == 'simple' || type == 'rating-open' || type=='multiple' }}
-
 
1690
                                    <button class="btn btn-default btn-add-option" data-section="{{:slug_section}}" data-question="{{:slug_question}}" data-toggle="tooltip"  data-original-title="LABEL_ADD  LABEL_OPTION"><i class="fa fa-plus" aria-hidden="true"></i> LABEL_ADD  LABEL_OPTION</button>
-
 
1691
                                    {{/if}}
-
 
1692
                               
-
 
1693
                                </td>
-
 
1694
                            </tr>
-
 
1695
                            {{for options}}
-
 
1696
                            <tr class="tr-option">
-
 
1697
                                <td class="text-left">---LABEL_OPTION</td>
-
 
1698
                                <td class="text-left">
-
 
1699
                                    {{:~removeTags(text)}}
-
 
1700
                                </td>
-
 
1701
                                <td>
-
 
1702
 
-
 
1703
                                    {{if ~getType( slug_section, slug_question) == 'multiple' || ~getType( slug_section, slug_question) == 'rating-open'  }}
-
 
1704
                                    {{/if}}
-
 
1705
                                </td>
-
 
1706
                                <td>
-
 
1707
                                    <button class="btn btn-default btn-edit-option" data-section="{{:slug_section}}" data-question="{{:slug_question}}" data-slug="{{:slug_option}}" data-toggle="tooltip"  data-original-title="LABEL_EDIT LABEL_OPTION"><i class="fa fa-edit" aria-hidden="true"></i> LABEL_EDIT LABEL_OPTION</button>
-
 
1708
                                    <button class="btn btn-default btn-delete-option" data-section="{{:slug_section}}" data-question="{{:slug_question}}" data-slug="{{:slug_option}}" data-toggle="tooltip"  data-original-title="LABEL_DELETE LABEL_OPTION"><i class="fa fa-ban" aria-hidden="true"></i> LABEL_DELETE LABEL_OPTION</button>
-
 
1709
                                </td>
-
 
1710
                            </tr>
-
 
1711
                            {{/for}}
-
 
1712
                            {{/for}}
-
 
1713
                        </tbody>
-
 
1714
                    </table>
-
 
1715
                </div>
-
 
1716
            </div>
-
 
1717
        </div>
-
 
1718
    </div>
-
 
1719
    </script>
-
 
1720
 
-
 
1721
    <!-- End Template Sections-->
-
 
1722
 
-
 
1723
</section>
1391
<div id="organizational_climate-form">
-
 
1392
</div>
1724
1393