VPNManager/templates/main/index.html.ep
2024-07-16 23:49:24 +02:00

23 lines
884 B
Plaintext

% my $users = stash 'users';
<html>
<head>
<link rel="stylesheet" href="/style.css"/>
</head>
<body class="main">
<p><a href="/vpn/create-user">Create new vpn user</a>.</p>
% if (defined $users && @$users) {
<ul>
% for my $user (@$users) {
<li>Id: <b><%=$user->id%></b> Name: <b><%=$user->name%></b> Internal IP Address: <b><%=$user->ip_to_text%></b> <a href="/vpn/user/<%=$user->id%>/details">View details</a>
<form class="inline" method="post" action="/vpn/user/<%=$user->id%>/<%=$user->is_enabled ? 'disable' : 'enable'%>">
<input type="submit" value="<%=$user->is_enabled? 'Disable' : 'Enable'%>"/>
</form></li>
% }
% }
</ul>
<form action="/vpn/save" method="post">
<input type="submit" value="Save VPN Settings"/>
</form>
</body>
</html>