-
Notifications
You must be signed in to change notification settings - Fork 13
/
default.php
110 lines (102 loc) · 4.06 KB
/
default.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?php
/**
* JComments - Joomla Comment System
*
* @version 4.0
* @package JComments
* @author Sergey M. Litvinov (smart@joomlatune.ru) & exstreme (info@protectyoursite.ru) & Vladimir Globulopolis
* @copyright (C) 2006-2022 by Sergey M. Litvinov (http://www.joomlatune.ru) & exstreme (https://protectyoursite.ru) & Vladimir Globulopolis (https://xn--80aeqbhthr9b.com/ru/)
* @license GNU/GPL: http://www.gnu.org/copyleft/gpl.html
*/
defined('_JEXEC') or die;
/** @var JCommentsViewSettings $this */
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
$wa = $this->document->getWebAssetManager();
$wa->useScript('keepalive')
->useScript('form.validate')
->useScript('bootstrap.modal');
?>
<script type="text/javascript">
Joomla.submitbutton = function(task) {
if (task === 'settings.saveConfig') {
window.location = '<?php echo Uri::base(); ?>index.php?option=com_jcomments&task=settings.saveConfig&format=raw';
} else if (task === 'settings.restoreConfig') {
Joomla.submitform(task, document.getElementById('adminRestoreConfig'));
} else {
Joomla.submitform(task, document.getElementById('item-form'));
}
return false;
}
</script>
<form action="<?php echo Route::_('index.php?option=com_jcomments'); ?>" method="post" name="adminForm"
id="item-form" class="form-validate">
<div class="main-card">
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'general', 'recall' => true, 'breakpoint' => 768]); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'common', Text::_('A_COMMON')); ?>
<?php echo $this->loadTemplate('general'); ?>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'layout', Text::_('A_LAYOUT')); ?>
<?php echo $this->loadTemplate('layout'); ?>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'restrictions', Text::_('A_RESTRICTIONS')); ?>
<div class="row">
<div class="col-lg-6">
<fieldset class="options-form">
<legend><?php echo Text::_('A_RESTRICTIONS'); ?></legend>
<?php echo $this->form->renderFieldset('restrictions'); ?>
</fieldset>
</div>
<div class="col-lg-6">
<fieldset class="options-form">
<legend><?php echo Text::_('A_SECURITY'); ?></legend>
<?php echo $this->form->renderFieldset('security'); ?>
</fieldset>
</div>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'censor', Text::_('A_CENSOR')); ?>
<div class="row">
<div class="col-lg-12">
<fieldset class="options-form">
<legend><?php echo Text::_('A_CENSOR'); ?></legend>
<?php echo $this->form->renderFieldset('censor'); ?>
</fieldset>
</div>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'messages', Text::_('A_MESSAGES')); ?>
<div class="row">
<div class="col-lg-12">
<fieldset class="options-form">
<legend><?php echo Text::_('A_MESSAGES'); ?></legend>
<?php echo $this->form->renderFieldset('messages'); ?>
</fieldset>
</div>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.endTabSet'); ?>
</div>
<input type="hidden" name="return" value="<?php echo Factory::getApplication()->input->getBase64('return'); ?>">
<input type="hidden" name="task" value=""/>
<?php echo HTMLHelper::_('form.token'); ?>
</form>
<?php // File Modal
$fileModalData = array(
'selector' => 'fileModal',
'params' => array(
'title' => Text::_('A_SETTINGS_BUTTON_RESTORECONFIG'),
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">' . Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>',
'height' => '400px',
'width' => '800px',
'bodyHeight' => 70,
'modalWidth' => 80,
),
'body' => $this->loadTemplate('modal_file_body')
);
?>
<?php echo LayoutHelper::render('libraries.html.bootstrap.modal.main', $fileModalData);