Last active
September 5, 2015 10:47
-
-
Save MartinElvar/63e76a95dfa927f7e1d0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= form_for @changeset, @action, [multipart: true], fn f -> %> | |
<%= if @changeset.action do %> | |
<div class="alert alert-danger"> | |
<p>Oops, something went wrong! Please check the errors below:</p> | |
<ul> | |
<%= for {attr, message} <- f.errors do %> | |
<li><%= humanize(attr) %> <%= message %></li> | |
<% end %> | |
</ul> | |
</div> | |
<% end %> | |
<div class="form-group"> | |
<%= label f, :name, "Name", class: "control-label" %> | |
<%= text_input f, :name, class: "form-control" %> | |
</div> | |
<div class="form-group"> | |
<%= unless @conn.assigns[:company] do %> | |
<%= Logo.url({@company.logo, @company}, :thumb) %> | |
<% end %> | |
<%= label f, :logo, "Logo", class: "control-label" %> | |
<%= file_input f, :logo, class: "form-control" %> | |
</div> | |
<div class="form-group"> | |
<%= submit "Save", class: "btn btn-primary" %> | |
</div> | |
<% end %> | |
----- | |
<div class="row"> | |
<div class="col-lg-12"> | |
<h1 class="page-header">New company</h1> | |
</div> | |
</div> | |
<%= render "form.html", changeset: @changeset, | |
action: admin_company_path(@conn, :create) %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment