Initial commit: there's still tons of base Phoenix boilerplate to remove, but the...
[tech-radar-editor.git] / web / templates / radar_data_point / form.html.eex
1 <%= form_for @changeset, @action, fn f -> %>
2 <%= if @changeset.action do %>
3 <div class="alert alert-danger">
4 <p>Oops, something went wrong! Please check the errors below.</p>
5 </div>
6 <% end %>
7
8 <div class="form-group">
9 <%= label f, :quadrant, class: "control-label" %>
10 <%= select f, :quadrant, Enum.with_index(TechRadarEditor.RadarDataPoint.quadrants,1), class: "form-control" %>
11 <%= error_tag f, :quadrant %>
12 </div>
13
14 <div class="form-group">
15 <%= label f, :cycle, class: "control-label" %>
16 <%= select f, :cycle, Enum.with_index(TechRadarEditor.RadarDataPoint.cycles,1), class: "form-control" %>
17 <!-- <%= select f, :cycle, ["Adapt": 1, "Trial": 2, "Assess": 3, "Hold": 4], class: "form-control" %> -->
18 <%= error_tag f, :cycle %>
19 </div>
20
21 <div class="form-group">
22 <%= label f, :is_new, class: "control-label" %>
23 <%= checkbox f, :is_new, class: "form-control" %>
24 <%= error_tag f, :is_new %>
25 </div>
26
27 <div class="form-group">
28 <%= label f, :name, class: "control-label" %>
29 <%= text_input f, :name, class: "form-control" %>
30 <%= error_tag f, :name %>
31 </div>
32
33 <div class="form-group">
34 <%= label f, :description, class: "control-label" %>
35 <%= text_input f, :description, class: "form-control" %>
36 <%= error_tag f, :description %>
37 </div>
38
39 <div class="form-group">
40 <%= submit "Submit", class: "btn btn-primary" %>
41 </div>
42 <% end %>