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.
17 lines
767 B
17 lines
767 B
extends ../layouts/main
|
|
block content
|
|
|
|
- var formAction = category ? `/admin/category/${category._id}` : '/admin/category';
|
|
|
|
pre= JSON.stringify(category, null, 2)
|
|
|
|
form(method="POST", action= formAction).uk-form
|
|
.uk-margin
|
|
label(for="name").uk-form-label Category Name
|
|
input(id="name", name="name", type="text", placeholder="Enter category name", value= category ? category.name : undefined).uk-input
|
|
|
|
.uk-margin
|
|
label(for="description").uk-form-label Description
|
|
textarea(id="description", name="description", rows="3", placeholder="Enter category description").uk-textarea= category ? category.description : undefined
|
|
|
|
button(type="submit").uk-button.uk-button-primary= category ? 'Update Category' : 'Create Category' |