aboutsummaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2019-04-18 00:58:34 -0500
committerWilliam Harrington <kb0iic@berzerkula.org>2019-04-18 00:58:34 -0500
commitdd2642cf9b012e4006dd14eafbaf85a4f62c110d (patch)
tree007ffc3429ddb471603761ee2a91bc8100b47d39 /views
parent85da8c51668610aa3ca45541f07aff71c93f7cd7 (diff)
Use a form for adding members and redirect after form submission so that the list of members is displayed and not json output.
Diffstat (limited to 'views')
-rw-r--r--views/index.handlebars12
1 files changed, 12 insertions, 0 deletions
diff --git a/views/index.handlebars b/views/index.handlebars
index 1b430da..d31363a 100644
--- a/views/index.handlebars
+++ b/views/index.handlebars
@@ -1,4 +1,16 @@
<h1 class="text-center mb-3">{{title}}</h1>
+
+<form action="/nodejs/api/members" method="POST" class="mb-4">
+ <div class="form-group">
+ <label for="name">Name</label>
+ <input type="text" name="name" class="form-control">
+ </div>
+ <div class="form-group">
+ <label for="email">E-mail</label>
+ <input type="email" name="email" class="form-control">
+ </div>
+ <input type="submit" value="Add Member" class="btn btn-primary btn-block">
+</form>
<h4>Members</h4>
<ul class="list-group">
{{#each members}}