Exemple #1
0
<?php

/**
 * @package     Sibdiet.Administrator
 * @subpackage  com_sibdiet
 *
 * @copyright   Copyright (C) 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');
SibdietHelper::chosen();
// Import CSS
$document = JFactory::getDocument();
$document->addStyleSheet('components/com_sibdiet/assets/css/sibdiet.css');
?>
<script type="text/javascript">
	Joomla.submitbutton = function(task)
	{
		if (task == 'audio.cancel' || document.formvalidator.isValid(document.id('audio-form'))) {
			Joomla.submitform(task, document.getElementById('audio-form'));
		}
	}
</script>

<form action="<?php 
echo JRoute::_('index.php?option=com_sibdiet&layout=edit&id=' . (int) $this->item->id);
?>
" method="post" name="adminForm" id="audio-form" class="form-validate">
	<div class="form-horizontal">
Exemple #2
0
<?php

/**
 * @package     Sibdiet.Administrator
 * @subpackage  com_sibdiet
 *
 * @copyright   Copyright (C) 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');
SibdietHelper::chosen('select');
// Import CSS
$document = JFactory::getDocument();
$document->addStyleSheet('components/com_sibdiet/assets/css/sibdiet.css');
?>
<script type="text/javascript">
	Joomla.submitbutton = function(task)
	{
		if (task == 'nutrient.cancel' || document.formvalidator.isValid(document.id('nutrient-form')))
		{
			Joomla.submitform(task, document.getElementById('nutrient-form'));
		}
	}
</script>

<form action="<?php 
echo JRoute::_('index.php?option=com_sibdiet&layout=edit&id=' . (int) $this->item->id);
?>
" method="post" name="adminForm" id="nutrient-form" class="form-validate">