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,7 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<view
title="Form">
<message><![CDATA[TYPEARTICLAYDESC]]></message>
</view>
</metadata>

View File

@ -0,0 +1,123 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_weblinks
*
* @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::_('behavior.keepalive');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
// Create shortcut to parameters.
$params = $this->state->get('params');
?>
<script type="text/javascript">
Joomla.submitbutton = function(task)
{
if (task == 'weblink.cancel' || document.formvalidator.isValid(document.id('adminForm')))
{
<?php echo $this->form->getField('description')->save(); ?>
Joomla.submitform(task);
}
}
</script>
<div class="edit<?php echo $this->pageclass_sfx; ?>">
<?php if ($this->params->get('show_page_heading')) : ?>
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
<?php endif; ?>
<form action="<?php echo JRoute::_('index.php?option=com_weblinks&view=form&w_id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="adminForm" class="form-validate form-vertical">
<div class="btn-toolbar">
<div class="btn-group">
<button type="button" class="btn btn-primary" onclick="Joomla.submitbutton('weblink.save')">
<span class="icon-ok"></span> <?php echo JText::_('JSAVE') ?>
</button>
</div>
<div class="btn-group">
<button type="button" class="btn" onclick="Joomla.submitbutton('weblink.cancel')">
<span class="icon-cancel"></span> <?php echo JText::_('JCANCEL') ?>
</button>
</div>
</div>
<hr class="hr-condensed" />
<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('alias'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('alias'); ?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('catid'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('catid'); ?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('url'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('url'); ?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('tags'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('tags'); ?>
</div>
</div>
<?php if ($this->user->authorise('core.edit.state', 'com_weblinks.weblink')) : ?>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('state'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('state'); ?>
</div>
</div>
<?php endif; ?>
<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('description'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('description'); ?>
</div>
</div>
<input type="hidden" name="return" value="<?php echo $this->return_page;?>" />
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>
</div>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout
title="com_weblinks_form_view_default_title" option="com_weblinks_form_view_default_option">
<help
key="JHELP_MENUS_MENU_ITEM_WEBLINK_SUBMIT"
/>
<message>
<![CDATA[com_weblinks_form_view_default_desc]]>
</message>
</layout>
</metadata>

View File

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

View File

@ -0,0 +1,137 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_weblinks
*
* @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 Article View class for the Weblinks component
*
* @package Joomla.Site
* @subpackage com_weblinks
* @since 1.5
*/
class WeblinksViewForm extends JViewLegacy
{
protected $form;
protected $item;
protected $return_page;
protected $state;
public function display($tpl = null)
{
$user = JFactory::getUser();
// Get model data.
$this->state = $this->get('State');
$this->item = $this->get('Item');
$this->form = $this->get('Form');
$this->return_page = $this->get('ReturnPage');
if (empty($this->item->id))
{
$authorised = ($user->authorise('core.create', 'com_weblinks') || (count($user->getAuthorisedCategories('com_weblinks', 'core.create'))));
}
else
{
$authorised = $user->authorise('core.edit', 'com_weblinks.category.'.$this->item->catid);
}
if ($authorised !== true)
{
JError::raiseError(403, JText::_('JERROR_ALERTNOAUTHOR'));
return false;
}
if (!empty($this->item))
{
$this->form->bind($this->item);
}
// Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseWarning(500, implode("\n", $errors));
return false;
}
// Create a shortcut to the parameters.
$params = &$this->state->params;
//Escape strings for HTML output
$this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx'));
$this->params = $params;
$this->user = $user;
$this->_prepareDocument();
parent::display($tpl);
}
/**
* Prepares the document
*/
protected function _prepareDocument()
{
$app = JFactory::getApplication();
$menus = $app->getMenu();
$title = null;
// Because the application sets a default page title,
// we need to get it from the menu item itself
$menu = $menus->getActive();
if (empty($this->item->id))
{
$head = JText::_('COM_WEBLINKS_FORM_SUBMIT_WEBLINK');
}
else
{
$head = JText::_('COM_WEBLINKS_FORM_EDIT_WEBLINK');
}
if ($menu)
{
$this->params->def('page_heading', $this->params->get('page_title', $menu->title));
}
else
{
$this->params->def('page_heading', $head);
}
$title = $this->params->def('page_title', $head);
if ($app->getCfg('sitename_pagetitles', 0) == 1)
{
$title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title);
}
elseif ($app->getCfg('sitename_pagetitles', 0) == 2)
{
$title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename'));
}
$this->document->setTitle($title);
if ($this->params->get('menu-meta_description'))
{
$this->document->setDescription($this->params->get('menu-meta_description'));
}
if ($this->params->get('menu-meta_keywords'))
{
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
}
if ($this->params->get('robots'))
{
$this->document->setMetadata('robots', $this->params->get('robots'));
}
}
}