first commit

This commit is contained in:
alazhar
2020-01-02 22:20:31 +07:00
commit 10eb3340ad
5753 changed files with 631345 additions and 0 deletions

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,177 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_languages
*
* @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::_('formbehavior.chosen', 'select');
$canDo = LanguagesHelper::getActions();
?>
<script type="text/javascript">
Joomla.submitbutton = function(task)
{
if (task == 'language.cancel' || document.formvalidator.isValid(document.id('language-form')))
{
Joomla.submitform(task, document.getElementById('language-form'));
}
}
</script>
<form action="<?php echo JRoute::_('index.php?option=com_languages&layout=edit&lang_id='.(int) $this->item->lang_id); ?>" method="post" name="adminForm" id="language-form" class="form-validate form-horizontal">
<?php echo JLayoutHelper::render('joomla.edit.item_title', $this); ?>
<fieldset>
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'details')); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'details', JText::_('JDETAILS', true)); ?>
<div class="control-group">
<div class="controls">
<?php if ($this->item->lang_id) : ?>
<?php echo JText::sprintf('JGLOBAL_RECORD_NUMBER', $this->item->lang_id); ?>
<?php else : ?>
<?php echo JText::_('COM_LANGUAGES_VIEW_LANGUAGE_EDIT_NEW_TITLE'); ?>
<?php endif; ?>
</div>
</div>
<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('title_native'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('title_native'); ?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('sef'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('sef'); ?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('image'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('image'); ?>
<span id="flag">
<?php echo JHtml::_('image', 'mod_languages/' . $this->form->getValue('image') . '.gif', $this->form->getValue('image'), array('title' => $this->form->getValue('image')), true); ?>
</span>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('lang_code'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('lang_code'); ?>
</div>
</div>
<?php if ($canDo->get('core.edit.state')) : ?>
<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('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('description'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('description'); ?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('lang_id'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('lang_id'); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'metadata', JText::_('JGLOBAL_FIELDSET_METADATA_OPTIONS', true)); ?>
<?php foreach ($this->form->getFieldset('metadata') as $field) : ?>
<div class="control-group">
<?php if (!$field->hidden) : ?>
<div class="control-label">
<?php echo $field->label; ?>
</div>
<?php endif; ?>
<div class="controls">
<?php echo $field->input; ?>
</div>
</div>
<?php endforeach; ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'site_name', JText::_('COM_LANGUAGES_FIELDSET_SITE_NAME_LABEL', true)); ?>
<?php foreach ($this->form->getFieldset('site_name') as $field) : ?>
<div class="control-group">
<?php if (!$field->hidden) : ?>
<div class="control-label">
<?php echo $field->label; ?>
</div>
<?php endif; ?>
<div class="controls">
<?php echo $field->input; ?>
</div>
</div>
<?php endforeach; ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
</fieldset>
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>
<script type="text/javascript">
jQuery('#jform_image').on('change', function() {
var flag = this.value;
if (!jQuery('#flag img').attr('src'))
{
jQuery('#flag img').attr('src', '<?php echo JUri::root(true);?>' + '/media/mod_languages/images/' + flag + '.gif');
}
else
{
jQuery('#flag img').attr('src', function(index, attr) {
return attr.replace(jQuery('#flag img').attr('title') + '.gif', flag + '.gif')
})
}
jQuery('#flag img').attr('title', flag).attr('alt', flag);
});
</script>

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,95 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_languages
*
* @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;
/**
* HTML View class for the Languages component
*
* @package Joomla.Administrator
* @subpackage com_languages
* @since 1.5
*/
class LanguagesViewLanguage extends JViewLegacy
{
public $item;
public $form;
public $state;
/**
* Display the view
*/
public function display($tpl = null)
{
$this->item = $this->get('Item');
$this->form = $this->get('Form');
$this->state = $this->get('State');
// 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()
{
require_once JPATH_COMPONENT . '/helpers/languages.php';
JFactory::getApplication()->input->set('hidemainmenu', 1);
$isNew = empty($this->item->lang_id);
$canDo = LanguagesHelper::getActions();
JToolbarHelper::title(JText::_($isNew ? 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_NEW_TITLE' : 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_EDIT_TITLE'), 'langmanager.png');
// If a new item, can save.
if ($isNew && $canDo->get('core.create'))
{
JToolbarHelper::save('language.save');
}
//If an existing item, allow to Apply and Save.
if (!$isNew && $canDo->get('core.edit'))
{
JToolbarHelper::apply('language.apply');
JToolbarHelper::save('language.save');
}
// If an existing item, can save to a copy only if we have create rights.
if ($canDo->get('core.create'))
{
JToolbarHelper::save2new('language.save2new');
}
if ($isNew)
{
JToolbarHelper::cancel('language.cancel');
}
else
{
JToolbarHelper::cancel('language.cancel', 'JTOOLBAR_CLOSE');
}
JToolbarHelper::divider();
JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_EDIT');
$this->sidebar = JHtmlSidebar::render();
}
}