Files
member-console/internal/embeds/templates/partials/workspace_create.html
Christian Galo 47a75e0873 Add products, entitlement sets, and workspace support
- Add SQL queries and generated methods for Create/List/Update products
- Add CountWorkspacesByOrgID and ListResourceKeys querier methods
- Register workspace partials and operator routes for products and sets
- Add workspace UI section and operator tabs; tweak grant/site forms
- Replace isValidDNSLabel with validateDNSLabel for site validation
2026-03-27 10:55:03 -05:00

35 lines
1.8 KiB
HTML

<!-- Workspace create form partial -->
<div class="card mb-3">
<div class="card-body">
<div class="d-flex justify-content-between align-items-center mb-3">
<h6 class="card-title mb-0">Create Workspace</h6>
<button class="btn btn-outline-secondary btn-sm"
hx-get="/partials/workspaces"
hx-target="#workspaceContent"
hx-swap="innerHTML">Back</button>
</div>
{{ if .Error }}
<div class="alert alert-danger" role="alert">{{ .Error }}</div>
{{ end }}
<form hx-post="/partials/workspaces" hx-target="#workspaceContent" hx-swap="innerHTML">
<div class="row g-3">
<div class="col-md-6">
<label for="workspaceName" class="form-label">Workspace Name</label>
<input type="text" class="form-control" id="workspaceName" name="name" required
placeholder="My Workspace"
oninput="document.getElementById('workspaceSlug').value = this.value.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '')">
</div>
<div class="col-md-6">
<label for="workspaceSlug" class="form-label">Slug</label>
<input type="text" class="form-control" id="workspaceSlug" name="slug" required
placeholder="my-workspace" pattern="[a-z0-9][a-z0-9-]*[a-z0-9]|[a-z0-9]">
<div class="form-text">URL-safe identifier. Auto-generated from name.</div>
</div>
<div class="col-12">
<button type="submit" class="btn btn-primary">Create Workspace</button>
</div>
</div>
</form>
</div>
</div>