2024-04-24 00:05:57 +01:00
|
|
|
<%- include("../base/header", { title: typeof(party) === "undefined" ? "Create Party" : `Editing ${party.Name}`, userId: session.userId }) %>
|
2024-04-23 17:01:25 +01:00
|
|
|
<% if (typeof(party) === "undefined") { %>
|
|
|
|
<h1 class="text-center mb-5">Create Party</h1>
|
|
|
|
<% } else { %>
|
|
|
|
<h1 class="text-center mb-5">Editing <%= party.Name %></h1>
|
|
|
|
<% } %>
|
|
|
|
<form method="post">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-4"></div>
|
|
|
|
<div class="col-4">
|
2024-04-24 00:05:57 +01:00
|
|
|
<% if (typeof(error) === "string") { %>
|
|
|
|
<div class="alert alert-danger">
|
|
|
|
<%= error %>
|
|
|
|
</div>
|
|
|
|
<% } %>
|
|
|
|
|
2024-04-23 17:01:25 +01:00
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-label">Party Name</label>
|
2024-04-24 00:05:57 +01:00
|
|
|
<input class="form-control" type="text" name="partyName" maxlength="64" value="<%= typeof(partyName) === "undefined" ? "" : partyName %>" required />
|
2024-04-23 17:01:25 +01:00
|
|
|
</div>
|
|
|
|
<div class="form-group mt-3">
|
|
|
|
<label class="form-label">Join Code / Party ID<br><span style="font-size: 10pt;">Pick something nice, e.g. "<b>3EGGS</b>"</span></label>
|
2024-04-24 00:05:57 +01:00
|
|
|
<input class="form-control" type="text" name="partyRef" minlength="5" maxlength="5" value="<%= typeof(partyRef) === "undefined" ? "" : partyRef %>" required />
|
2024-04-23 17:01:25 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="text-center mt-5">
|
|
|
|
<input class="btn btn-primary" type="submit" value="Save" />
|
|
|
|
<a class="btn btn-danger ms-2" href="/">Cancel</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-4"></div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<%- include("../base/footer") %>
|