You've already forked joomla_test
first commit
This commit is contained in:
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_templates
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('behavior.keepalive');
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
Joomla.submitbutton = function(task)
|
||||
{
|
||||
if (task == 'source.cancel' || document.formvalidator.isValid(document.id('source-form')))
|
||||
{
|
||||
<?php echo $this->form->getField('source')->save(); ?>
|
||||
Joomla.submitform(task, document.getElementById('source-form'));
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_templates&layout=edit'); ?>" method="post" name="adminForm" id="source-form" class="form-validate">
|
||||
<?php if ($this->ftp) : ?>
|
||||
<?php echo $this->loadTemplate('ftp'); ?>
|
||||
<?php endif; ?>
|
||||
<fieldset class="adminform">
|
||||
<legend><?php echo JText::sprintf('COM_TEMPLATES_TEMPLATE_FILENAME', $this->source->filename, $this->template->element); ?></legend>
|
||||
|
||||
<?php echo $this->form->getLabel('source'); ?>
|
||||
<div class="clr"></div>
|
||||
<div class="editor-border">
|
||||
<?php echo $this->form->getInput('source'); ?>
|
||||
</div>
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</fieldset>
|
||||
|
||||
<?php echo $this->form->getInput('extension_id'); ?>
|
||||
<?php echo $this->form->getInput('filename'); ?>
|
||||
|
||||
</form>
|
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_templates
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
?>
|
||||
<fieldset class="adminform" title="<?php echo JText::_('COM_TEMPLATES_FTP_TITLE'); ?>">
|
||||
<legend><?php echo JText::_('COM_TEMPLATES_FTP_TITLE'); ?></legend>
|
||||
|
||||
<?php echo JText::_('COM_TEMPLATES_FTP_DESC'); ?>
|
||||
|
||||
<?php if ($this->ftp instanceof Exception) : ?>
|
||||
<p class="error"><?php echo JText::_($this->ftp->message); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<table class="adminform">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="120">
|
||||
<label for="username"><?php echo JText::_('JGLOBAL_USERNAME'); ?></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id="username" name="username" class="inputbox" size="70" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="120">
|
||||
<label for="password"><?php echo JText::_('JGLOBAL_PASSWORD'); ?></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="password" id="password" name="password" class="inputbox" size="70" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_templates
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* View to edit a template style.
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_templates
|
||||
* @since 1.6
|
||||
*/
|
||||
class TemplatesViewSource extends JViewLegacy
|
||||
{
|
||||
protected $form;
|
||||
|
||||
protected $ftp;
|
||||
|
||||
protected $source;
|
||||
|
||||
protected $state;
|
||||
|
||||
protected $template;
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$this->form = $this->get('Form');
|
||||
$this->ftp = JClientHelper::setCredentialsFromRequest('ftp');
|
||||
$this->source = $this->get('Source');
|
||||
$this->state = $this->get('State');
|
||||
$this->template = $this->get('Template');
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseError(500, implode("\n", $errors));
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar()
|
||||
{
|
||||
JFactory::getApplication()->input->set('hidemainmenu', true);
|
||||
|
||||
$canDo = TemplatesHelper::getActions();
|
||||
|
||||
JToolbarHelper::title(JText::_('COM_TEMPLATES_MANAGER_EDIT_FILE'), 'thememanager');
|
||||
|
||||
// Can save the item.
|
||||
if ($canDo->get('core.edit'))
|
||||
{
|
||||
JToolbarHelper::apply('source.apply');
|
||||
JToolbarHelper::save('source.save');
|
||||
}
|
||||
|
||||
JToolbarHelper::cancel('source.cancel');
|
||||
JToolbarHelper::divider();
|
||||
JToolbarHelper::help('JHELP_EXTENSIONS_TEMPLATE_MANAGER_TEMPLATES_EDIT_SOURCE');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user