default.php
6.05 KB
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<?php
/**
* @package Joomla.Site
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_('behavior.combobox');
JHtml::_('formbehavior.chosen', 'select');
jimport('joomla.filesystem.file');
$editorText = false;
$moduleXml = JPATH_SITE . '/modules/' . $this->item['module'] . '/' . $this->item['module'] . '.xml';
if (JFile::exists($moduleXml))
{
$xml = simplexml_load_file($moduleXml);
if (isset($xml->customContent))
{
$editorText = true;
}
}
// If multi-language site, make language read-only
if (JLanguageMultilang::isEnabled())
{
$this->form->setFieldAttribute('language', 'readonly', 'true');
}
JFactory::getDocument()->addScriptDeclaration("
Joomla.submitbutton = function(task)
{
if (task == 'config.cancel.modules' || document.formvalidator.isValid(document.getElementById('modules-form')))
{
Joomla.submitform(task, document.getElementById('modules-form'));
}
}
");
?>
<form
action="<?php echo JRoute::_('index.php?option=com_config'); ?>"
method="post" name="adminForm" id="modules-form"
class="form-validate">
<div class="row-fluid">
<!-- Begin Content -->
<div class="span12">
<div class="btn-toolbar" role="toolbar" aria-label="<?php echo JText::_('JTOOLBAR'); ?>">
<div class="btn-group">
<button type="button" class="btn btn-primary"
onclick="Joomla.submitbutton('config.save.modules.apply')">
<span class="icon-apply" aria-hidden="true"></span>
<?php echo JText::_('JAPPLY'); ?>
</button>
</div>
<div class="btn-group">
<button type="button" class="btn"
onclick="Joomla.submitbutton('config.save.modules.save')">
<span class="icon-save" aria-hidden="true"></span>
<?php echo JText::_('JSAVE'); ?>
</button>
</div>
<div class="btn-group">
<button type="button" class="btn"
onclick="Joomla.submitbutton('config.cancel.modules')">
<span class="icon-cancel" aria-hidden="true"></span>
<?php echo JText::_('JCANCEL'); ?>
</button>
</div>
</div>
<hr class="hr-condensed" />
<legend><?php echo JText::_('COM_CONFIG_MODULES_SETTINGS_TITLE'); ?></legend>
<div>
<?php echo JText::_('COM_CONFIG_MODULES_MODULE_NAME'); ?>
<span class="label label-default"><?php echo $this->item['title']; ?></span>
<?php echo JText::_('COM_CONFIG_MODULES_MODULE_TYPE'); ?>
<span class="label label-default"><?php echo $this->item['module']; ?></span>
</div>
<hr />
<div class="row-fluid">
<div class="span12">
<fieldset class="form-horizontal">
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('title'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('title'); ?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('showtitle'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('showtitle'); ?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('position'); ?>
</div>
<div class="controls">
<?php echo $this->loadTemplate('positions'); ?>
</div>
</div>
<hr />
<?php if (JFactory::getUser()->authorise('core.edit.state', 'com_modules.module.' . $this->item['id'])) : ?>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('published'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('published'); ?>
</div>
</div>
<?php endif ?>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('publish_up'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('publish_up'); ?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('publish_down'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('publish_down'); ?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('access'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('access'); ?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('ordering'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('ordering'); ?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('language'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('language'); ?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('note'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('note'); ?>
</div>
</div>
<hr />
<div id="options">
<?php echo $this->loadTemplate('options'); ?>
</div>
<?php if ($editorText) : ?>
<div class="tab-pane" id="custom">
<?php echo $this->form->getInput('content'); ?>
</div>
<?php endif; ?>
</fieldset>
</div>
<input type="hidden" name="id" value="<?php echo $this->item['id']; ?>" />
<input type="hidden" name="return" value="<?php echo JFactory::getApplication()->input->get('return', null, 'base64'); ?>" />
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</div>
</div>
<!-- End Content -->
</div>
</form>