Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 7397 Rev 11214
Línea 1332... Línea 1332...
1332
     */
1332
     */
1333
    $('button.btn-refresh').click(function(e) {
1333
    $('button.btn-refresh').click(function(e) {
1334
        tableForm.fnDraw();
1334
        tableForm.fnDraw();
1335
    });
1335
    });
Línea 1336... Línea 1336...
1336
 
1336
 
-
 
1337
    CKEDITOR.replace('description', {
-
 
1338
				toolbar: [
-
 
1339
					{ name: 'editing', items: ['Scayt'] },
-
 
1340
					{ name: 'links', items: ['Link', 'Unlink'] },
-
 
1341
					{ name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'] },
-
 
1342
					{ name: 'basicstyles', items: ['Bold', 'Italic', 'Strike', 'RemoveFormat'] },
-
 
1343
					'/',
-
 
1344
					{ name: 'insert', items: ['Image', 'Table', 'HorizontalRule', 'SpecialChar'] },
-
 
1345
					{ name: 'styles', items: ['Styles', 'Format'] },
-
 
1346
					{ name: 'tools', items: ['Maximize'] }
-
 
1347
				],
-
 
1348
				removePlugins: 'elementspath,Anchor',
-
 
1349
				heigth: 100
1337
    CKEDITOR.replace('description');
1350
			});
-
 
1351
    CKEDITOR.replace('text', {
-
 
1352
				toolbar: [
-
 
1353
					{ name: 'editing', items: ['Scayt'] },
-
 
1354
					{ name: 'links', items: ['Link', 'Unlink'] },
-
 
1355
					{ name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'] },
-
 
1356
					{ name: 'basicstyles', items: ['Bold', 'Italic', 'Strike', 'RemoveFormat'] },
-
 
1357
					'/',
-
 
1358
					{ name: 'insert', items: ['Image', 'Table', 'HorizontalRule', 'SpecialChar'] },
-
 
1359
					{ name: 'styles', items: ['Styles', 'Format'] },
-
 
1360
					{ name: 'tools', items: ['Maximize'] }
-
 
1361
				],
-
 
1362
				removePlugins: 'elementspath,Anchor',
-
 
1363
				heigth: 100
Línea 1338... Línea 1364...
1338
    CKEDITOR.replace('text');
1364
			});
1339
     
1365
     
1340
});
1366
});
1341
JS;
1367
JS;
Línea 1389... Línea 1415...
1389
        <div class="col-xs-12 col-md-12">
1415
        <div class="col-xs-12 col-md-12">
1390
            <form action="#" name="form-main" id="form-main">
1416
            <form action="#" name="form-main" id="form-main">
1391
                <input type="hidden" name="form-id" id="form-id" value="0" />
1417
                <input type="hidden" name="form-id" id="form-id" value="0" />
1392
                <input type="hidden" name="form-continue" id="form-continue" value="0" />
1418
                <input type="hidden" name="form-continue" id="form-continue" value="0" />
1393
                <?php
1419
                <?php
1394
                     //$form = $this->formAdd;
1420
                //$form = $this->formAdd;
1395
                     $form->setAttributes([
1421
                $form->setAttributes([
1396
                         'method' => 'post',
1422
                    'method' => 'post',
1397
                         'name' => 'form-main',
1423
                    'name' => 'form-main',
1398
                         'action' => $routeAdd,
1424
                    'action' => $routeAdd,
1399
                         'id' => 'form-main'
1425
                    'id' => 'form-main'
1400
                     ]);
1426
                ]);
1401
                     $form->prepare();
1427
                $form->prepare();
1402
                     echo $this->form()->openTag($form);
1428
                echo $this->form()->openTag($form);
1403
                ?>
1429
                ?>
1404
               <div class="form-group">
1430
                <div class="form-group">
1405
                    <?php
1431
                    <?php
1406
                    $element = $form->get('name');
1432
                    $element = $form->get('name');
1407
                    $element->setOptions(['label' => 'LABEL_FIRST_NAME']);
1433
                    $element->setOptions(['label' => 'LABEL_FIRST_NAME']);
1408
                    $element->setAttributes(['class' => 'form-control']);
1434
                    $element->setAttributes(['class' => 'form-control']);
1409
                    echo $this->formLabel($element);
1435
                    echo $this->formLabel($element);
1410
                    echo $this->formText($element);
1436
                    echo $this->formText($element);
1411
                    ?>
1437
                    ?>
1412
                </div>
1438
                </div>
1413
                <div class="form-group">
1439
                <div class="form-group">
1414
                        <?php
1440
                    <?php
1415
                        $element = $form->get('description');
1441
                    $element = $form->get('description');
1416
                        $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
1442
                    $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
1417
                        $element->setAttributes(['class' => 'form-control']);
1443
                    $element->setAttributes(['class' => 'form-control']);
1418
                        echo $this->formLabel($element);
1444
                    echo $this->formLabel($element);
1419
                        echo $this->formTextArea($element);
1445
                    echo $this->formTextArea($element);
1420
                        ?>
1446
                    ?>
1421
                </div>
1447
                </div>
1422
                <div class="form-group">
1448
                <div class="form-group">
1423
                        <?php
1449
                    <?php
1424
                        $element = $form->get('text');
1450
                    $element = $form->get('text');
1425
                        $element->setOptions(['label' => 'LABEL_TEXT']);
1451
                    $element->setOptions(['label' => 'LABEL_TEXT']);
1426
                        $element->setAttributes(['class' => 'form-control']);
1452
                    $element->setAttributes(['class' => 'form-control']);
1427
                        echo $this->formLabel($element);
1453
                    echo $this->formLabel($element);
1428
                        echo $this->formTextArea($element);
1454
                    echo $this->formTextArea($element);
1429
                        ?>
1455
                    ?>
1430
                </div>
1456
                </div>
1431
                <div class="form-group">
1457
                <div class="form-group">
1432
                        <?php
1458
                    <?php
1433
                        $element = $form->get('status');
1459
                    $element = $form->get('status');
1434
                        $element->setAttributes(['class' => 'form-control']);
1460
                    $element->setAttributes(['class' => 'form-control']);
1435
                        $element->setOptions(['label' => 'LABEL_STATUS']);
1461
                    $element->setOptions(['label' => 'LABEL_STATUS']);
1436
                        echo $this->formLabel($element);
1462
                    echo $this->formLabel($element);
1437
                        echo $this->formSelect($element);
1463
                    echo $this->formSelect($element);
1438
                        ?>
1464
                    ?>
1439
                    </div>
1465
                </div>
1440
                <br/>
1466
                <br />
1441
                <div class="row">
1467
                <div class="row">
1442
                    <div class="col-xs-12 col-md-12 text-right">
1468
                    <div class="col-xs-12 col-md-12 text-right">
1443
                        <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>
1469
                        <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>
1444
                    </div>
1470
                    </div>
1445
                </div>
1471
                </div>
Línea 1459... Línea 1485...
1459
    </div>
1485
    </div>
Línea 1460... Línea 1486...
1460
 
1486
 
Línea 1461... Línea 1487...
1461
    <!-- Create/Edit Form-->
1487
    <!-- Create/Edit Form-->
1462
 
1488
 
1463
    <!-- Section Modal -->
1489
    <!-- Section Modal -->
1464
    <div  id="modal-section" class="modal" tabindex="-1" role="dialog">
1490
    <div id="modal-section" class="modal" tabindex="-1" role="dialog">
1465
        <div class="modal-dialog modal-lg" role="document">
1491
        <div class="modal-dialog modal-lg" role="document">
1466
            <form action="#" name="form-section" id="form-section">
1492
            <form action="#" name="form-section" id="form-section">
1467
                <input type="hidden" name="section-slug" id="section-slug" value="" />
1493
                <input type="hidden" name="section-slug" id="section-slug" value="" />
Línea 1478... Línea 1504...
1478
                            <input type="text" name="section-name" id="section-name" class="form-control" maxlength="50" value="" />
1504
                            <input type="text" name="section-name" id="section-name" class="form-control" maxlength="50" value="" />
1479
                        </div>
1505
                        </div>
1480
                        <div class="form-group">
1506
                        <div class="form-group">
1481
                            <label for="section-text">LABEL_TEXT</label>
1507
                            <label for="section-text">LABEL_TEXT</label>
1482
                            <!--  ckeditor -->
1508
                            <!--  ckeditor -->
1483
                            <textarea  name="section-text" id="section-text" rows="5" class="ckeditor form-control"></textarea>
1509
                            <textarea name="section-text" id="section-text" rows="5" class="ckeditor form-control"></textarea>
1484
                        </div>
1510
                        </div>
1485
                    </div>
1511
                    </div>
1486
                    <div class="modal-footer">
1512
                    <div class="modal-footer">
1487
                        <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
1513
                        <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
1488
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
1514
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
Línea 1493... Línea 1519...
1493
    </div>
1519
    </div>
1494
    <!-- End Modal Section -->
1520
    <!-- End Modal Section -->
Línea 1495... Línea 1521...
1495
 
1521
 
Línea 1496... Línea 1522...
1496
    <!-- Question Modal -->
1522
    <!-- Question Modal -->
1497
 
1523
 
1498
    <div  id="modal-question" class="modal" tabindex="-1" role="dialog">
1524
    <div id="modal-question" class="modal" tabindex="-1" role="dialog">
1499
        <div class="modal-dialog modal-lg" role="document">
1525
        <div class="modal-dialog modal-lg" role="document">
1500
            <form action="#" name="form-question" id="form-question">
1526
            <form action="#" name="form-question" id="form-question">
1501
                <input type="hidden" name="question-section" id="question-section" />
1527
                <input type="hidden" name="question-section" id="question-section" />
Línea 1509... Línea 1535...
1509
                    </div>
1535
                    </div>
1510
                    <div class="modal-body">
1536
                    <div class="modal-body">
1511
                        <div class="form-group">
1537
                        <div class="form-group">
1512
                            <label for="question-text">LABEL_TEXT</label>
1538
                            <label for="question-text">LABEL_TEXT</label>
1513
                            <!--  ckeditor -->
1539
                            <!--  ckeditor -->
1514
                            <textarea  name="question-text" id="question-text" rows="5" class="ckeditor form-control"></textarea>
1540
                            <textarea name="question-text" id="question-text" rows="5" class="ckeditor form-control"></textarea>
1515
                        </div>
1541
                        </div>
1516
                        <div class="form-group">
1542
                        <div class="form-group">
1517
                            <label for="question-type">LABEL_TYPE</label>
1543
                            <label for="question-type">LABEL_TYPE</label>
1518
                            <select name="question-type" id="question-type" class="form-control">
1544
                            <select name="question-type" id="question-type" class="form-control">
1519
                                <option value="open">LABEL_OPEN</option>
1545
                                <option value="open">LABEL_OPEN</option>
1520
                                <option value="simple">Simple</option>
1546
                                <option value="simple">Simple</option>
1521
                                <option value="multiple">Multiple</option>
1547
                                <option value="multiple">Multiple</option>
1522
                                
1548
 
1523
                            </select>
1549
                            </select>
1524
                        </div>
1550
                        </div>
1525
                        <div class="form-group">
1551
                        <div class="form-group">
1526
                            <label for="question-max-length">LABEL_MAXLENGTH</label>
1552
                            <label for="question-max-length">LABEL_MAXLENGTH</label>
1527
                            <input type="text" name="question-max-length" id="question-max-length"  class="form-control" />
1553
                            <input type="text" name="question-max-length" id="question-max-length" class="form-control" />
1528
                        </div>
1554
                        </div>
1529
                        <div class="form-group">
1555
                        <div class="form-group">
1530
                            <label for="question-multiline">LABEL_MULTI_LINE</label>
1556
                            <label for="question-multiline">LABEL_MULTI_LINE</label>
1531
                            <select name="question-multiline" id="question-multiline" class="form-control">
1557
                            <select name="question-multiline" id="question-multiline" class="form-control">
1532
                                <option value="1">LABEL_YES</option>
1558
                                <option value="1">LABEL_YES</option>
Línea 1553... Línea 1579...
1553
 
1579
 
Línea 1554... Línea 1580...
1554
    <!-- End Modal Question -->
1580
    <!-- End Modal Question -->
Línea 1555... Línea 1581...
1555
 
1581
 
1556
    <!-- Modal Options -->
1582
    <!-- Modal Options -->
1557
 
1583
 
1558
    <div  id="modal-option" class="modal" tabindex="-1" role="dialog">
1584
    <div id="modal-option" class="modal" tabindex="-1" role="dialog">
1559
        <div class="modal-dialog modal-lg" role="document">
1585
        <div class="modal-dialog modal-lg" role="document">
1560
            <form action="#" name="form-option" id="form-option">
1586
            <form action="#" name="form-option" id="form-option">
Línea 1570... Línea 1596...
1570
                    </div>
1596
                    </div>
1571
                    <div class="modal-body">
1597
                    <div class="modal-body">
1572
                        <div class="form-group">
1598
                        <div class="form-group">
1573
                            <label for="option-text">LABEL_TEXT</label>
1599
                            <label for="option-text">LABEL_TEXT</label>
1574
                            <!--  ckeditor -->
1600
                            <!--  ckeditor -->
1575
                            <textarea  name="option-text" id="option-text" rows="5" class="ckeditor form-control"></textarea>
1601
                            <textarea name="option-text" id="option-text" rows="5" class="ckeditor form-control"></textarea>
1576
                        </div>
1602
                        </div>
1577
                    </div>
1603
                    </div>
1578
                    <div class="modal-footer">
1604
                    <div class="modal-footer">
1579
                        <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
1605
                        <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
1580
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
1606
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
Línea 1586... Línea 1612...
1586
 
1612
 
Línea 1587... Línea 1613...
1587
    <!-- End Modal Options -->
1613
    <!-- End Modal Options -->
1588
 
1614
 
1589
    <!---Template Sections --->
1615
    <!---Template Sections --->
1590
    <script id="sectionTemplate" type="text/x-jsrender">
1616
    <script id="sectionTemplate" type="text/x-jsrender">
1591
    <div class="panel panel-default" id="panel-{{:slug_section}}">
1617
        <div class="panel panel-default" id="panel-{{:slug_section}}">
1592
        <div class="panel-heading">
1618
        <div class="panel-heading">
1593
            <h4 class="panel-title">
1619
            <h4 class="panel-title">
1594
                <a class="accordion-toggle" data-toggle="collapse" aria-expanded="true" data-parent="#panel-{{:slug_section}}" href="#collapse-{{:slug_section}}">
1620
                <a class="accordion-toggle" data-toggle="collapse" aria-expanded="true" data-parent="#panel-{{:slug_section}}" href="#collapse-{{:slug_section}}">