themes/lavender/manage-apps-edit.go.html

84 lines
4.3 KiB
HTML
Raw Permalink Normal View History

<!DOCTYPE html>
<html lang="en">
<head>
<title>{{.ServiceName}}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="/assets/style.css">
</head>
<body>
{{template "header.go.html" .}}
<main>
<div class="center-box sm:max-w-2xl">
<h1 class="box-title">Edit Client Application</h1>
2024-05-16 23:11:34 +01:00
<form id="manage-apps-edit" method="POST" action="/manage/apps" class="space-y-4 md:space-y-6">
<input type="hidden" name="action" value="edit"/>
<input type="hidden" name="offset" value="{{.Offset}}"/>
<input type="hidden" name="subject" value="{{.EditApp.Subject}}"/>
<div>
<label for="field_subject">Subject: {{.EditApp.Subject}}</label>
</div>
<div>
<label for="field_name">Name:</label>
<input type="text" name="name" id="field_name" value="{{.EditApp.Name}}" required/>
</div>
<div>
<label for="field_domain">Domain:</label>
<input type="text" name="domain" id="field_domain" value="{{.EditApp.Domain}}" placeholder="https://example.com" required/>
</div>
{{if .IsAdmin}}
<div>
<label for="field_perms">Perms:</label>
<input type="text" name="perms" id="field_perms" value="{{.EditApp.Perms}}" size="100"/>
</div>
{{end}}
<div class="flex flex-row justify-center">
<div class="space-y-4 md:space-y-6">
<div class="flex">
<div class="flex items-center h-5">
<input id="field_public" name="public" type="checkbox" {{if .EditApp.Public}}checked{{end}}/>
<svg class="check" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round">
<polyline points="20 6 9 17 4 12"></polyline>
</svg>
</div>
<div class="ml-3 text-sm">
<label for="field_public">Make this a client-only application</label>
</div>
</div>
{{if .IsAdmin}}
<div class="flex">
<div class="flex items-center h-5">
<input id="field_sso" name="sso" type="checkbox" {{if .EditApp.Sso}}checked{{end}}/>
<svg class="check" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round">
<polyline points="20 6 9 17 4 12"></polyline>
</svg>
</div>
<div class="ml-3 text-sm">
<label for="field_sso">Enable automatic SSO flow</label>
</div>
</div>
{{end}}
<div class="flex">
<div class="flex items-center h-5">
<input id="field_active" name="active" type="checkbox" {{if .EditApp.Active}}checked{{end}}/>
<svg class="check" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round">
<polyline points="20 6 9 17 4 12"></polyline>
</svg>
</div>
<div class="ml-3 text-sm">
<label for="field_active">Enable the application</label>
</div>
</div>
</div>
</div>
</form>
2024-05-16 23:11:34 +01:00
<div class="grid grid-cols-2 gap-4">
<button type="submit" class="btn-green" form="manage-apps-edit">Save</button>
<form method="GET" action="/manage/apps">
<button type="submit" class="btn-red">Cancel</button>
</form>
</div>
</div>
</main>
</body>
</html>