t00-multiuser/server/views/admin/party.ejs

43 lines
No EOL
1.7 KiB
Text

<%- include("../base/header", { title: typeof(id) === "undefined" || id.trim().length === 0 ? "Add Party" : `Edit ${name}`, userId: session.userId, isAdmin: true }) %>
<div class="row">
<div class="col">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/admin">Admin</a></li>
<li class="breadcrumb-item"><a href="/admin/parties">Party Management</a></li>
<li class="breadcrumb-item active"><a><%= typeof(id) === "undefined" || id.trim().length === 0 ? "Add Party" : `Edit ${name}` %></a></li>
</ol>
</nav>
</div>
</div>
<div class="row">
<div class="col">
<h1><%= typeof(id) === "undefined" || id.trim().length === 0 ? "Add Party" : `Edit ${name}` %></h1>
</div>
</div>
<form method="post" class="needs-validation" novalidate>
<input type="hidden" name="id" value="<%= typeof(id) === "undefined" ? "" : id %>" />
<div class="row my-5 row-cols-1 row-cols-sm-2">
<div class="col col-sm-3 mb-3">
<label for="partyRef" class="form-label">Party Ref</label>
<input class="form-control" id="partyRef" name="partyRef" value="<%= typeof(partyRef) === "undefined" ? "" : partyRef %>" required maxlength="5" />
</div>
<div class="col col-sm-9 col-sm-9">
<label for="name" class="form-label">Name</label>
<input class="form-control" id="name" name="name" value="<%= typeof(name) === "undefined" ? "" : name %>" required maxlength="255" />
</div>
</div>
<div class="row mb-3">
<div class="col text-center">
<button type="submit" class="btn btn-primary">Save</button>
<a type="submit" class="btn btn-danger" href="/admin/parties">Cancel</a>
</div>
</div>
</form>
<%- include("../base/footer") %>