2020-11-07 14:32:25 -05:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
|
|
|
<title>{{ .Static.WebsiteTitle }} - Admin</title>
|
|
|
|
<meta name="description" content="{{ .Static.WebsiteTitle }}">
|
|
|
|
<link rel="stylesheet" href="/css/jquery-ui.min.css">
|
|
|
|
<link rel="stylesheet" href="/css/bootstrap.min.css">
|
|
|
|
<link rel="stylesheet" href="/fonts/fontawesome-all.min.css">
|
|
|
|
<link rel="stylesheet" href="/css/bootstrap-tokenfield.min.css">
|
|
|
|
<link rel="stylesheet" href="/css/tokenfield-typeahead.min.css">
|
|
|
|
<link rel="stylesheet" href="/css/custom.css">
|
|
|
|
</head>
|
|
|
|
|
2020-11-09 08:32:20 -05:00
|
|
|
<body id="page-top" class="d-flex flex-column min-vh-100">
|
2020-11-07 14:32:25 -05:00
|
|
|
{{template "prt_nav.html" .}}
|
2020-11-09 08:32:20 -05:00
|
|
|
<div class="container mt-5">
|
2020-11-07 14:32:25 -05:00
|
|
|
<h1>Create new clients</h1>
|
2020-11-09 05:06:02 -05:00
|
|
|
<h2>Enter valid LDAP user email addresses to quickly create new accounts.</h2>
|
2020-11-10 16:23:05 -05:00
|
|
|
{{template "prt_flashes.html" .}}
|
2020-11-07 14:32:25 -05:00
|
|
|
<form method="post" enctype="multipart/form-data">
|
2021-03-22 17:51:37 -04:00
|
|
|
<input type="hidden" name="_csrf" value="{{.Csrf}}">
|
2020-11-07 14:32:25 -05:00
|
|
|
<div class="form-row">
|
2020-12-18 16:26:36 -05:00
|
|
|
<div class="form-group required col-md-12">
|
2020-11-07 14:32:25 -05:00
|
|
|
<label for="inputEmail">Email Addresses</label>
|
2021-04-03 17:54:35 -04:00
|
|
|
<input type="text" name="email" class="form-control" id="inputEmail" value="{{.FormData.Emails}}" required>
|
2020-11-07 14:32:25 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
2020-12-18 16:26:36 -05:00
|
|
|
<div class="form-group required col-md-12">
|
2020-11-07 14:32:25 -05:00
|
|
|
<label for="inputIdentifier">Client Friendly Name (will be added as suffix to the name of the user)</label>
|
2021-04-03 17:54:35 -04:00
|
|
|
<input type="text" name="identifier" class="form-control" id="inputIdentifier" value="{{.FormData.Identifier}}" required>
|
2020-11-07 14:32:25 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<button type="submit" class="btn btn-primary">Create</button>
|
|
|
|
<a href="/admin" class="btn btn-secondary">Cancel</a>
|
|
|
|
</form>
|
|
|
|
</div>
|
2020-11-10 03:31:02 -05:00
|
|
|
{{template "prt_footer.html" .}}
|
2020-11-07 14:32:25 -05:00
|
|
|
<script src="/js/jquery.min.js"></script>
|
|
|
|
<script src="/js/bootstrap.bundle.min.js"></script>
|
|
|
|
<script src="/js/jquery.easing.js"></script>
|
|
|
|
<script src="/js/jquery-ui.min.js"></script>
|
|
|
|
<script src="/js/bootstrap-tokenfield.min.js"></script>
|
|
|
|
<script src="/js/custom.js"></script>
|
|
|
|
<script>$('#inputEmail').on('tokenfield:createdtoken', function (e) {
|
|
|
|
// Über-simplistic e-mail validation
|
|
|
|
var re = /\S+@\S+\.\S+/
|
|
|
|
var valid = re.test(e.attrs.value)
|
|
|
|
if (!valid) {
|
|
|
|
$(e.relatedTarget).addClass('invalid')
|
|
|
|
}
|
|
|
|
}).tokenfield({
|
|
|
|
autocomplete: {
|
2021-02-24 15:24:45 -05:00
|
|
|
source: [{{range $i, $u :=.Users}}{{$u.Email}},{{end}}],
|
2020-11-07 14:32:25 -05:00
|
|
|
delay: 100
|
|
|
|
},
|
|
|
|
showAutocompleteOnFocus: false
|
|
|
|
})</script>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|