Browse Source

moar better forms

master
Inhji Y. 1 year ago
parent
commit
fa3767f3e2
  1. 34
      lib/dagon_web/templates/album/form.html.eex
  2. 10
      lib/dagon_web/templates/artist/edit.html.eex
  3. 42
      lib/dagon_web/templates/artist/form.html.eex

34
lib/dagon_web/templates/album/form.html.eex

@ -5,23 +5,31 @@
</div>
<% end %>
<%= label f, :name, class: "label" %>
<%= text_input f, :name, class: "input" %>
<%= error_tag f, :name %>
<div class="field">
<%= label f, :name, class: "label" %>
<%= text_input f, :name, class: "input" %>
<%= error_tag f, :name %>
</div>
<%= label f, "Musicbrainz Id", class: "label" %>
<%= text_input f, :mbid, class: "input" %>
<%= error_tag f, :mbid %>
<div class="field">
<%= label f, "Musicbrainz Id", class: "label" %>
<%= text_input f, :mbid, class: "input" %>
<%= error_tag f, :mbid %>
</div>
<%= label f, "Messybrainz Id", class: "label" %>
<%= text_input f, :msid, class: "input" %>
<%= error_tag f, :msid %>
<div class="field">
<%= label f, "Messybrainz Id", class: "label" %>
<%= text_input f, :msid, class: "input" %>
<%= error_tag f, :msid %>
</div>
<%= label f, :discogs_id, class: "label" %>
<%= text_input f, :discogs_id, class: "input" %>
<%= error_tag f, :discogs_id %>
<div class="field">
<%= label f, :discogs_id, class: "label" %>
<%= text_input f, :discogs_id, class: "input" %>
<%= error_tag f, :discogs_id %>
</div>
<div>
<%= submit "Save", class: "button" %>
<%= submit "Save", class: "button is-primary" %>
</div>
<% end %>

10
lib/dagon_web/templates/artist/edit.html.eex

@ -1,5 +1,5 @@
<h1>Edit Artist</h1>
<%= render "form.html", Map.put(assigns, :action, Routes.artist_path(@conn, :update, @artist)) %>
<span><%= link "Back", to: Routes.artist_path(@conn, :index) %></span>
<div class="card">
<div class="card-content">
<%= render "form.html", Map.put(assigns, :action, Routes.artist_path(@conn, :update, @artist)) %>
</div>
</div>

42
lib/dagon_web/templates/artist/form.html.eex

@ -4,24 +4,32 @@
<p>Oops, something went wrong! Please check the errors below.</p>
</div>
<% end %>
<%= label f, :name %>
<%= text_input f, :name %>
<%= error_tag f, :name %>
<%= label f, :msid %>
<%= text_input f, :msid %>
<%= error_tag f, :msid %>
<%= label f, :mbid %>
<%= text_input f, :mbid %>
<%= error_tag f, :mbid %>
<%= label f, :discogs_id %>
<%= text_input f, :discogs_id %>
<%= error_tag f, :discogs_id %>
<div class="field">
<%= label f, :name, class: "label" %>
<%= text_input f, :name, class: "input" %>
<%= error_tag f, :name %>
</div>
<div class="field">
<%= label f, :msid, class: "label" %>
<%= text_input f, :msid, class: "input" %>
<%= error_tag f, :msid %>
</div>
<div class="field">
<%= label f, :mbid, class: "label" %>
<%= text_input f, :mbid, class: "input" %>
<%= error_tag f, :mbid %>
</div>
<div class="field">
<%= label f, :discogs_id, class: "label" %>
<%= text_input f, :discogs_id, class: "input" %>
<%= error_tag f, :discogs_id %>
</div>
<div>
<%= submit "Save" %>
<%= submit "Save", class: "button is-primary" %>
</div>
<% end %>
Loading…
Cancel
Save