You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.8 KiB
46 lines
1.8 KiB
extends ../layout/main
|
|
block view-content
|
|
|
|
section.uk-section.uk-section-default.uk-section-small
|
|
.uk-container
|
|
|
|
.uk-margin
|
|
- var actionUrl = !!client ? `/client/${client._id}` : "/client";
|
|
form(method="POST", action= actionUrl).uk-form
|
|
.uk-card.uk-card-default.uk-card-small
|
|
.uk-card-header
|
|
h1.uk-card-title #[span= !!client ? "Edit" : "New"] Client
|
|
|
|
.uk-card-body
|
|
.uk-margin
|
|
label(for="name").uk-form-label Client name
|
|
input(
|
|
id="name",
|
|
name="name",
|
|
type="text",
|
|
value= !!client ? client.name : undefined,
|
|
placeholder="Enter client name",
|
|
).uk-input
|
|
|
|
.uk-margin
|
|
label(for="description").uk-form-label Client description
|
|
textarea(
|
|
id="name",
|
|
name="description",
|
|
rows=4,
|
|
placeholder="Enter client description",
|
|
).uk-textarea.uk-resize-vertical= !!client ? client.description : undefined
|
|
|
|
.uk-margin
|
|
label(for="hours-limit").uk-form-label Max. hours per week
|
|
input(
|
|
id="hours-limit",
|
|
name="hoursLimit",
|
|
type="number",
|
|
value= !!client ? (client.hoursLimit || 40) : 40,
|
|
placeholder="Enter max. hours/week (0=unlimited)",
|
|
).uk-input
|
|
.uk-text-small.uk-text-muted Use zero or 168 (7 x 24) for unlimited hours per week.
|
|
|
|
.uk-card-footer.uk-flex.uk-flex-right
|
|
button(type="submit").uk-button.uk-button-default.uk-border-rounded #[span= !!client ? "Update" : "Create"] Client
|