<?php
if (isset($tpl['status']))
{
	$status = __('status', true);
	switch ($tpl['status'])
	{
		case 2:
			pjUtil::printNotice(NULL, $status[2]);
			break;
	}
} else {
	include PJ_VIEWS_PATH . 'pjLayouts/elements/optmenu.php';

	$titles = __('error_titles', true);
	$bodies = __('error_bodies', true);
	pjUtil::printNotice($titles['PST01'], $bodies['PST01'], false, true);
	if (isset($_GET['err']))
	{
		pjUtil::printNotice(@$titles[$_GET['err']], @$bodies[$_GET['err']]);
	}
	?>
	<fieldset class="fieldset white">
		<legend><?php __('plugin_stripe_config'); ?></legend>
		<form action="<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjStripe&amp;action=pjActionIndex" method="post" class="pj-form form">
			<input type="hidden" name="stripe_post" value="1" />
			<p>
				<label class="title"><?php __('plugin_stripe_public_key'); ?></label>
				<span class="left">
					<input type="text" name="plugin_stripe_public_key" id="plugin_stripe_public_key" class="pj-form-field w400" value="<?php echo pjSanitize::html(@$tpl['option_arr']['plugin_stripe_public_key']); ?>" />
				</span>
			</p>
			<p>
				<label class="title"><?php __('plugin_stripe_secret_key'); ?></label>
				<span class="left">
					<input type="text" name="plugin_stripe_secret_key" id="plugin_stripe_secret_key" class="pj-form-field w400" value="<?php echo pjSanitize::html(@$tpl['option_arr']['plugin_stripe_secret_key']); ?>" />
				</span>
			</p>
			<p>
				<label class="title"><?php __('plugin_stripe_cancel_url'); ?></label>
				<span class="left">
					<input type="text" name="plugin_stripe_cancel_url" id="plugin_stripe_cancel_url" class="pj-form-field w400" value="<?php echo pjSanitize::html(@$tpl['option_arr']['plugin_stripe_cancel_url']); ?>" />
				</span>
			</p>
			<p>
				<label class="title">&nbsp;</label>
				<input type="submit" value="<?php __('btnSave'); ?>" class="pj-button float_left align_middle" />
			</p>
		</form>
	</fieldset>

	<div class="b10">
		<form action="" method="get" class="pj-form frm-filter">
			<input type="text" name="q" class="pj-form-field pj-form-field-search w150" placeholder="<?php __('btnSearch'); ?>" />
		</form>
	</div>

	<div id="grid"></div>
	<script type="text/javascript">
	var pjGrid = pjGrid || {};
	pjGrid.queryString = "";
	var myLabel = myLabel || {};
	myLabel.created = "<?php __('plugin_stripe_created'); ?>";
	myLabel.reference_id = "<?php __('plugin_stripe_reference_id'); ?>";
	myLabel.txn_id = "<?php __('plugin_stripe_txn_id'); ?>";
	myLabel.amount = "<?php __('plugin_stripe_amount'); ?>";
	myLabel.currency = "<?php __('plugin_stripe_currency'); ?>";
	myLabel.status = "<?php __('plugin_stripe_status'); ?>";
	</script>
	<?php
}
?>
