<?php
namespace JetApplicationModule\Admin\ManageAccess\RESTClients\Users;

use Jet\UI_button;
use JetApplication\Auth_RESTClient_User as User;

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

/**
 * @var MVC_View $this
 * @var User $user
 */
$user = $this->getRaw( 'user' );
$router = $this->getController()->getControllerRouter();

?>
<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 user?' ); ?>
				<br/>
				<a href="<?= $router->action( 'edit' )->URI( $user->getId() ); ?>"
				   style="font-weight: bolder;font-size: 20px;"><?= $user->getUsername(); ?></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>

