<?php defined('BASEPATH') or exit('No direct script access allowed'); ?>

<?= message_box('success'); ?>
<?= message_box('error'); ?>
<?php
if ($type == 'income') {
	$created = can_action('125', 'created');
	$edited = can_action('125', 'edited');
} else {
	$created = can_action('124', 'created');
	$edited = can_action('124', 'edited');
}
?>



	<?php if (!empty($created) || !empty($edited)) { ?>
		<?php echo form_open(base_url('admin/transactions/update_categories/' . $type), array('id' => 'transaction_modal', 'class' => 'space-y-4')); ?>
			<div class="grid gap-4">
				<?= form_input_group('categories', lang($category), '', 'text', true, array('placeholder' => lang($category))); ?>
				<?= form_input_group('description', lang('description'), '', 'text', false, array('placeholder' => lang('description'))); ?>
			</div>
			<div class="flex justify-end gap-2 pt-2">
				<button type="submit" class="btn btn-primary btn-sm"><?= lang('save'); ?></button>
				<button type="button" class="btn btn-default btn-sm" data-dismiss="modal"><?= lang('close'); ?></button>
			</div>
		<?php echo form_close(); ?>
	<?php } ?>
