@@ -1286,30 +1286,9 @@ public function showFormToolsHelpdesk()
1286
1286
return false ;
1287
1287
}
1288
1288
1289
- echo "<div class='spaced'> " ;
1290
- if ($ canedit = Session::haveRightsOr (self ::$ rightname , [CREATE , UPDATE , PURGE ])) {
1291
- echo "<form method='post' action=' " . $ this ->getFormURL () . "' data-track-changes='true'> " ;
1292
- }
1293
-
1294
- $ matrix_options = ['canedit ' => $ canedit ,
1295
- 'default_class ' => 'tab_bg_2 ' ,
1296
- ];
1297
-
1298
- $ matrix_options ['title ' ] = __ ('Tools ' );
1299
- $ this ->displayRightsChoiceMatrix (self ::getRightsForForm ('helpdesk ' , 'tools ' , 'general ' ), $ matrix_options );
1300
-
1301
- if ($ canedit ) {
1302
- echo "<div class='center'> " ;
1303
- echo "<input type='hidden' name='id' value=' " . $ this ->getID () . "'> " ;
1304
- echo Html::submit (_x ('button ' , 'Save ' ), [
1305
- 'class ' => 'btn btn-primary mt-2 ' ,
1306
- 'icon ' => 'ti ti-device-floppy ' ,
1307
- 'name ' => 'update ' ,
1308
- ]);
1309
- echo "</div> " ;
1310
- Html::closeForm ();
1311
- }
1312
- echo "</div> " ;
1289
+ TemplateRenderer::getInstance ()->display ('pages/admin/profile/tools_simple.html.twig ' , [
1290
+ 'item ' => $ this ,
1291
+ ]);
1313
1292
}
1314
1293
1315
1294
/**
@@ -1382,55 +1361,9 @@ public function showFormManagement($openform = true, $closeform = true)
1382
1361
return false ;
1383
1362
}
1384
1363
1385
- echo "<div class='spaced'> " ;
1386
-
1387
- if (
1388
- ($ canedit = Session::haveRightsOr (self ::$ rightname , [UPDATE , CREATE , PURGE ]))
1389
- && $ openform
1390
- ) {
1391
- echo "<form method='post' action=' " . $ this ->getFormURL () . "' data-track-changes='true'> " ;
1392
- }
1393
-
1394
- $ matrix_options = ['canedit ' => $ canedit ,
1395
- 'default_class ' => 'tab_bg_2 ' ,
1396
- ];
1397
-
1398
- $ matrix_options ['title ' ] = __ ('Management ' );
1399
- $ this ->displayRightsChoiceMatrix (self ::getRightsForForm ('central ' , 'management ' , 'general ' ), $ matrix_options );
1400
-
1401
- echo "<div class='tab_cadre_fixehov mx-n2'> " ;
1402
- $ rand = rand ();
1403
- echo "<label for='dropdown_managed_domainrecordtypes $ rand'> " . __s ('Manageable domain records ' ) . "</label> " ;
1404
- $ values = ['-1 ' => __ ('All ' )];
1405
- $ values += $ this ->getDomainRecordTypes ();
1406
- Dropdown::showFromArray (
1407
- 'managed_domainrecordtypes ' ,
1408
- $ values ,
1409
- [
1410
- 'display ' => true ,
1411
- 'multiple ' => true ,
1412
- 'size ' => 3 ,
1413
- 'rand ' => $ rand ,
1414
- 'values ' => $ this ->fields ['managed_domainrecordtypes ' ],
1415
- ]
1416
- );
1417
- echo "</div> " ;
1418
-
1419
- if (
1420
- $ canedit
1421
- && $ closeform
1422
- ) {
1423
- echo "<div class='center'> " ;
1424
- echo "<input type='hidden' name='id' value=' " . $ this ->getID () . "'> " ;
1425
- echo Html::submit (_x ('button ' , 'Save ' ), [
1426
- 'class ' => 'btn btn-primary mt-2 ' ,
1427
- 'icon ' => 'ti ti-device-floppy ' ,
1428
- 'name ' => 'update ' ,
1429
- ]);
1430
- echo "</div> " ;
1431
- Html::closeForm ();
1432
- }
1433
- echo "</div> " ;
1364
+ TemplateRenderer::getInstance ()->display ('pages/admin/profile/management.html.twig ' , [
1365
+ 'item ' => $ this ,
1366
+ ]);
1434
1367
}
1435
1368
1436
1369
/**
@@ -1447,40 +1380,9 @@ public function showFormTools($openform = true, $closeform = true)
1447
1380
return false ;
1448
1381
}
1449
1382
1450
- echo "<div class='spaced'> " ;
1451
-
1452
- if (
1453
- ($ canedit = Session::haveRightsOr (self ::$ rightname , [UPDATE , CREATE , PURGE ]))
1454
- && $ openform
1455
- ) {
1456
- echo "<form method='post' action=' " . $ this ->getFormURL () . "' data-track-changes='true'> " ;
1457
- }
1458
-
1459
- $ matrix_options = ['canedit ' => $ canedit ,
1460
- 'default_class ' => 'tab_bg_2 ' ,
1461
- ];
1462
-
1463
- $ matrix_options ['title ' ] = __ ('Tools ' );
1464
- $ this ->displayRightsChoiceMatrix (self ::getRightsForForm ('central ' , 'tools ' , 'general ' ), $ matrix_options );
1465
-
1466
- $ matrix_options ['title ' ] = _n ('Project ' , 'Projects ' , Session::getPluralNumber ());
1467
- $ this ->displayRightsChoiceMatrix (self ::getRightsForForm ('central ' , 'tools ' , 'projects ' ), $ matrix_options );
1468
-
1469
- if (
1470
- $ canedit
1471
- && $ closeform
1472
- ) {
1473
- echo "<div class='center'> " ;
1474
- echo "<input type='hidden' name='id' value=' " . $ this ->getID () . "'> " ;
1475
- echo Html::submit (_x ('button ' , 'Save ' ), [
1476
- 'class ' => 'btn btn-primary mt-2 ' ,
1477
- 'icon ' => 'ti ti-device-floppy ' ,
1478
- 'name ' => 'update ' ,
1479
- ]);
1480
- echo "</div> " ;
1481
- Html::closeForm ();
1482
- }
1483
- echo "</div> " ;
1383
+ TemplateRenderer::getInstance ()->display ('pages/admin/profile/tools.html.twig ' , [
1384
+ 'item ' => $ this ,
1385
+ ]);
1484
1386
}
1485
1387
1486
1388
/**
@@ -1740,54 +1642,9 @@ public function showFormLifeCycle($openform = true, $closeform = true)
1740
1642
return false ;
1741
1643
}
1742
1644
1743
- echo "<div class='spaced'> " ;
1744
-
1745
- if (
1746
- ($ canedit = Session::haveRightsOr (self ::$ rightname , [CREATE , UPDATE , PURGE ]))
1747
- && $ openform
1748
- ) {
1749
- echo "<form method='post' action=' " . $ this ->getFormURL () . "' data-track-changes='true'> " ;
1750
- }
1751
-
1752
- $ this ->displayLifeCycleMatrix (
1753
- __ ('Life cycle of tickets ' ),
1754
- '_cycle_ticket ' ,
1755
- 'ticket_status ' ,
1756
- Ticket::getAllStatusArray (),
1757
- $ canedit
1758
- );
1759
-
1760
- $ this ->displayLifeCycleMatrix (
1761
- __ ('Life cycle of problems ' ),
1762
- '_cycle_problem ' ,
1763
- 'problem_status ' ,
1764
- Problem::getAllStatusArray (),
1765
- $ canedit
1766
- );
1767
-
1768
- $ this ->displayLifeCycleMatrix (
1769
- __ ('Life cycle of changes ' ),
1770
- '_cycle_change ' ,
1771
- 'change_status ' ,
1772
- Change::getAllStatusArray (),
1773
- $ canedit
1774
- );
1775
-
1776
- if (
1777
- $ canedit
1778
- && $ closeform
1779
- ) {
1780
- echo "<div class='center'> " ;
1781
- echo "<input type='hidden' name='id' value=' " . $ this ->getID () . "'> " ;
1782
- echo Html::submit (_x ('button ' , 'Save ' ), [
1783
- 'class ' => 'btn btn-primary mt-2 ' ,
1784
- 'icon ' => 'ti ti-device-floppy ' ,
1785
- 'name ' => 'update ' ,
1786
- ]);
1787
- echo "</div> " ;
1788
- Html::closeForm ();
1789
- }
1790
- echo "</div> " ;
1645
+ TemplateRenderer::getInstance ()->display ('pages/admin/profile/lifecycle.html.twig ' , [
1646
+ 'item ' => $ this ,
1647
+ ]);
1791
1648
}
1792
1649
1793
1650
/**
@@ -1874,37 +1731,9 @@ public function showFormLifeCycleHelpdesk($openform = true, $closeform = true)
1874
1731
return false ;
1875
1732
}
1876
1733
1877
- echo "<div class='spaced'> " ;
1878
-
1879
- if (
1880
- ($ canedit = Session::haveRightsOr (self ::$ rightname , [CREATE , UPDATE , PURGE ]))
1881
- && $ openform
1882
- ) {
1883
- echo "<form method='post' action=' " . $ this ->getFormURL () . "' data-track-changes='true'> " ;
1884
- }
1885
-
1886
- $ this ->displayLifeCycleMatrixTicketHelpdesk (
1887
- __ ('Life cycle of tickets ' ),
1888
- '_cycle_ticket ' ,
1889
- 'ticket_status ' ,
1890
- $ canedit
1891
- );
1892
-
1893
- if (
1894
- $ canedit
1895
- && $ closeform
1896
- ) {
1897
- echo "<div class='center'> " ;
1898
- echo "<input type='hidden' name='id' value=' " . $ this ->getID () . "'> " ;
1899
- echo Html::submit (_x ('button ' , 'Save ' ), [
1900
- 'class ' => 'btn btn-primary mt-2 ' ,
1901
- 'icon ' => 'ti ti-device-floppy ' ,
1902
- 'name ' => 'update ' ,
1903
- ]);
1904
- echo "</div> " ;
1905
- Html::closeForm ();
1906
- }
1907
- echo "</div> " ;
1734
+ TemplateRenderer::getInstance ()->display ('pages/admin/profile/lifecycle_simple.html.twig ' , [
1735
+ 'item ' => $ this ,
1736
+ ]);
1908
1737
}
1909
1738
1910
1739
/**
0 commit comments