template fix

pull/78/head
Hunter Long 2018-10-02 08:59:41 -07:00
parent 64bedb7afb
commit 6b5660b8d8
3 changed files with 3 additions and 11 deletions

View File

@ -1,4 +1,4 @@
VERSION=0.71
VERSION=0.72
BINARY_NAME=statup
GOPATH:=$(GOPATH)
GOCMD=go

View File

@ -1,9 +1,5 @@
{{define "form_service"}}
{{$url := "/service"}}
{{if .}}
{{$url = "/service/{{.Id}}"}}
{{end}}
<form action="{{$url}}" method="POST">
<form action="{{if .}}/service/{{.Id}}{{else}}/service{{end}}" method="POST">
<div class="form-group row">
<label for="service_name" class="col-sm-4 col-form-label">Service Name</label>
<div class="col-sm-8">

View File

@ -1,9 +1,5 @@
{{define "form_user"}}
{{$url := "/user"}}
{{if .}}
{{$url = "/user/{{.Id}}"}}
{{end}}
<form action="{{$url}}" method="POST">
<form action="{{if .}}/user/{{.Id}}{{else}}/user{{end}}" method="POST">
<div class="form-group row">
<label for="username" class="col-sm-4 col-form-label">Username</label>
<div class="col-6 col-md-4">