<?php
/*
 * @component UserPoints
 * @copyright Copyright (C) 2015-2022 Bernard Gilly - Adrien Roussel - Martin Brampton
 * @license : GNU/GPL
 * @Website : https://remository.com
 */

defined( '_JEXEC' ) or die( 'Restricted access' );

use Joomla\CMS\Factory;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Language\Text;

Factory::getApplication()->input->set('hidemainmenu', 1);
ToolbarHelper::title(   Text::_( 'AUP_CUSTOM_POINTS' ), 'searchtext' );
ToolbarHelper::custom( 'cpanel', 'default.png', 'default.png', Text::_('AUP_CPANEL'), false );
ToolbarHelper::back( 'Back' );
ToolbarHelper::save( 'savecustomrulepoints' );
ToolbarHelper::help( 'screen.userpoints', true );
// JHtml::_('behavior.formvalidation');
?>
<script type="text/javascript">
	Joomla.submitbutton = function(task)
	{
		//if (task == 'cpanel' || document.formvalidator.isValid(document.id('custom-form'))) {
			Joomla.submitform(task, document.getElementById('custom-form'));
		//}
		//else {
			//alert('<?php echo $this->escape(Text::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
		//}
	}
</script>
<form action="index.php" method="post" name="adminForm" autocomplete="off" id="custom-form" class="form-validate">
	<fieldset>
		<legend><?php echo Text::_( 'AUP_CUSTOM_POINTS' ); ?></legend>
		<table class="admintable">
		<tbody>
		<tr>
			<td class="key">
				<span class="editlinktip hasTip" title="<?php echo Text::_( 'AUP_POINTS' ); ?>::<?php echo Text::_('AUP_CUSTOM_POINTS_DESCRIPTION'); ?>">
					<?php echo Text::_( 'AUP_POINTS' ); ?>:
				</span>
			</td>
			<td>				
				<input class="inputbox" type="text" name="points" id="points" size="20" maxlength="255" value="" />
			</td>
		</tr>
		<tr>
			<td class="key">
				<span class="editlinktip hasTip" title="<?php echo Text::_( 'AUP_DESCRIPTION' ); ?>::<?php echo Text::_('AUP_DESCRIPTION'); ?>">
					<?php echo Text::_( 'AUP_DESCRIPTION' ); ?>:
				</span>
			</td>
			<td>
				<input class="inputbox" type="text" name="reason" id="reason" size="80" maxlength="255" value="" />
			</td>
		</tr>
		</tbody>
		</table>
	</fieldset>
	<input type="hidden" name="option" value="com_userpoints" />
	<input type="hidden" name="task" value="savecustompoints" />
	<input type="hidden" name="cid" value="<?php echo $this->cid; ?>" />
</form><br /><br />