<?php
if (isset($tpl['status']))
{
	$status = __('status', true);
	switch ($tpl['status'])
	{
		case 2:
			pjUtil::printNotice(NULL, $status[2]);
			break;
	}
} else {
	include_once PJ_VIEWS_PATH . 'pjLayouts/elements/custmenu.php';
	pjUtil::printNotice(__('infoAddTokenTitle', true), __('infoAddTokenDesc', true)); 
	?>
	<form action="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminTokens&amp;action=pjActionCreate" method="post" id="frmCreateToken" class="form pj-form" autocomplete="off">
		<input type="hidden" name="token_create" value="1" />
		
		<p>
			<label class="title"><?php __('lblTitle'); ?></label>
			<span class="inline_block">
				<input type="text" name="title" id="title" class="pj-form-field w300 required" data-msg-required="<?php __('lblFieldRequired');?>"/>
			</span>
		</p>
		<p>
			<label class="title"><?php __('lblToken'); ?></label>
			<span class="inline_block">
				<input type="text" name="token" id="token" class="pj-form-field w300" readonly="readonly" data-msg-remote="<?php __('lblSameToken');?>"/>
			</span>
		</p>
		<p>
			<label class="title">&nbsp;</label>
			<input type="submit" value="<?php __('btnSave'); ?>" class="pj-button" />
			<input type="button" value="<?php __('btnCancel'); ?>" class="pj-button" onclick="window.location.href='<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjAdminTokens&action=pjActionIndex';" />
		</p>
	</form>
	<?php
}
?>