patrickdavey/caster

View on GitHub
web/templates/custom_cast/form.html.eex

Summary

Maintainability
Test Coverage
<%= form_for @changeset, @action, fn f -> %>
  <%= if @changeset.action do %>
    <div class="alert alert-danger">
      <p>Oops, something went wrong! Please check the errors below.</p>
    </div>
  <% end %>

  <div class="form-group">
    <%= label f, :url, class: "control-label" %>
    <%= text_input f, :url, class: "form-control" %>
    <%= error_tag f, :url %>
  </div>

  <div class="form-group">
    <%= submit "Submit", class: "btn btn-primary" %>
  </div>
<% end %>