PageRenderTime 78ms CodeModel.GetById 72ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/administrator/components/com_templates/views/source/tmpl/edit.php

https://bitbucket.org/eternaware/joomus
PHP | 48 lines | 35 code | 6 blank | 7 comment | 5 complexity | 6a89f638748ba1a4ea4de10c2f8b4473 MD5 | raw file
Possible License(s): LGPL-2.1
 1<?php
 2/**
 3 * @package     Joomla.Administrator
 4 * @subpackage  com_templates
 5 *
 6 * @copyright   Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 7 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 8 */
 9
10defined('_JEXEC') or die;
11
12JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
13JHtml::_('behavior.tooltip');
14JHtml::_('behavior.formvalidation');
15JHtml::_('behavior.keepalive');
16?>
17<script type="text/javascript">
18	Joomla.submitbutton = function(task)
19	{
20		if (task == 'source.cancel' || document.formvalidator.isValid(document.id('source-form'))) {
21			<?php echo $this->form->getField('source')->save(); ?>
22			Joomla.submitform(task, document.getElementById('source-form'));
23		} else {
24			alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
25		}
26	}
27</script>
28
29<form action="<?php echo JRoute::_('index.php?option=com_templates&layout=edit'); ?>" method="post" name="adminForm" id="source-form" class="form-validate">
30	<?php if ($this->ftp) : ?>
31		<?php echo $this->loadTemplate('ftp'); ?>
32	<?php endif; ?>
33	<fieldset class="adminform">
34		<legend><?php echo JText::sprintf('COM_TEMPLATES_TEMPLATE_FILENAME', $this->source->filename, $this->template->element); ?></legend>
35
36		<?php echo $this->form->getLabel('source'); ?>
37		<div class="clr"></div>
38		<div class="editor-border">
39		<?php echo $this->form->getInput('source'); ?>
40		</div>
41		<input type="hidden" name="task" value="" />
42		<?php echo JHtml::_('form.token'); ?>
43	</fieldset>
44
45	<?php echo $this->form->getInput('extension_id'); ?>
46	<?php echo $this->form->getInput('filename'); ?>
47
48</form>