projects-update.gohtml 2.66 KB
Newer Older
Lee Brown's avatar
Lee Brown committed
1 2 3 4 5
{{define "title"}}Update Project - {{ .project.Name }}{{end}}
{{define "style"}}

{{end}}
{{define "content"}}
6

Lucas Brown's avatar
Lucas Brown committed
7 8 9 10 11 12 13 14
    <nav aria-label="breadcrumb">
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="/projects">Projects</a></li>
            <li class="breadcrumb-item"><a href="{{ .urlProjectsView }}">{{ .form.Name }}</a></li>
            <li class="breadcrumb-item active" aria-current="page">Update</li>
        </ol>
    </nav>

15 16 17 18
    <div class="d-sm-flex align-items-center justify-content-between mb-4">
        <h1 class="h3 mb-0 text-gray-800">Update Project</h1>
    </div>

Lee Brown's avatar
Lee Brown committed
19
    <form class="user" method="post" novalidate>
20 21 22 23 24 25 26 27 28 29
        <div class="card shadow mb-4">
            <div class="card-body">
                <div class="row mb-2">
                    <div class="col-12">

                        <h4 class="card-title">Project Details</h4>
                    </div>
                </div>

                <div class="row">
Lee Brown's avatar
Lee Brown committed
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
                    <div class="col-md-6">
                        <div class="form-group">
                            <label for="inputName">Name</label>
                            <input type="text" id="inputName"
                                   class="form-control {{ ValidationFieldClass $.validationErrors "Name" }}"
                                   placeholder="enter name" name="Name" value="{{ .form.Name }}" required>
                            {{template "invalid-feedback" dict "fieldName" "Name" "validationDefaults" $.userValidationDefaults "validationErrors" $.validationErrors }}
                        </div>
                        <div class="form-group">
                            <label for="selectStatus">Status</label>
                            <select class="form-control {{ ValidationFieldClass $.validationErrors "Status" }}"
                                    id="selectStatus" name="Status">
                                {{ range $t := .project.Status.Options }}
                                    <option value="{{ $t.Value }}" {{ if $t.Selected }}selected="selected"{{ end }}>{{ $t.Title }}</option>
                                {{ end }}
                            </select>
                            {{template "invalid-feedback" dict "fieldName" "Status" "validationDefaults" $.validationDefaults "validationErrors" $.validationErrors }}
                        </div>
                    </div>
Lee Brown's avatar
Lee Brown committed
49
                </div>
50 51 52 53

            </div>
        </div>

Lee Brown's avatar
Lee Brown committed
54 55 56 57 58 59 60 61 62 63
        <div class="row">
            <div class="col">
                <input id="btnSubmit" type="submit" name="action" value="Save" class="btn btn-primary"/>
            </div>
        </div>
    </form>
{{end}}
{{define "js"}}

{{end}}