<?php
namespace JetApplicationModule\Admin\ManageAccess\Visitors\Roles;

use Jet\UI_button;
use JetApplication\Auth_Visitor_Role as Role;

use Jet\Http_Request;
use Jet\UI;
use Jet\MVC_View;
use Jet\Tr;

/**
 * @var MVC_View $this
 * @var Role $role
 */
$router = $this->getController()->getControllerRouter();
$role = $this->getRaw( 'role' );
?>

<div class="col d-flex justify-content-center">

	<div class="card" style="margin-top:50px;">
		<div class="card-body">
			<p>
				<?= Tr::_( 'Do you really want to delete this role?' ); ?>
				<br/>
				<a href="<?= $router->action( 'edit' )->URI( $role->getId() ); ?>"
				   style="font-weight: bolder;font-size: 20px;"><?= $role->getName(); ?> (<?= $role->getId(); ?>)</a>
			</p>


			<div style="display: inline-block;width: 50%">
				<?= UI::button_goBack()->setUrl($this->getString( 'list_url' )) ?>
			</div>
			<div style="display: inline-block;width: 45%;text-align: right">
				<form action="<?= Http_Request::currentURI() ?>" method="post">
					<input type="hidden" name="delete" value="yes">
					<?= UI::button_delete()->setType( UI_button::TYPE_SUBMIT ) ?>
				</form>
			</div>
		</div>
	</div>
</div>

