Packages
torch
5.0.0-rc.2
6.0.0
5.6.0
5.5.0
5.4.0
5.3.2
5.3.1
5.2.0
5.1.2
5.1.1
5.1.0
5.0.0
5.0.0-rc.4
5.0.0-rc.3
5.0.0-rc.2
5.0.0-rc.1
5.0.0-rc.0
4.3.2
4.3.1
4.3.0
4.2.1
4.2.0
retired
4.1.0
4.0.0
4.0.0-rc.0
3.9.1
3.9.0
3.8.0
3.7.1
3.7.0-rc.0
3.6.4
3.6.3
3.6.2
3.6.1
3.6.0
3.5.0
3.4.1
3.4.0
3.3.1
3.3.0
3.2.1
3.2.0
3.1.0
3.0.0
2.1.0
2.0.0
2.0.0-rc.3
2.0.0-rc.2
2.0.0-rc.1
1.0.0-rc.6
1.0.0-rc.5
1.0.0-rc.4
1.0.0-rc.3
1.0.0-rc.2
1.0.0-rc.1
0.2.0-rc.5
0.2.0-rc.4
0.2.0-rc.3
0.2.0-rc.2
0.2.0-rc.1
0.1.0
Rapid admin generator for Phoenix
Current section
Files
Jump to
Current section
Files
priv/templates/phx.gen.html/edit.html.heex
<section id="torch-toolbar">
<div class="torch-container">
<%%= link "Cancel", to: ~p"<%= schema.route_prefix %>", class: "torch-button" %>
</div>
</section>
<section id="torch-header-and-content">
<div class="torch-container">
<div class="header">
<h3>Edit <%= String.capitalize(schema.human_singular) %></h3>
</div>
<.form :let={f} for={@changeset} action={~p"<%= schema.route_prefix %>/#{@<%= schema.singular %>}"} id="torch-form" enctype="multipart/form-data">
<fieldset class="torch-panel">
<legend>
<span>Details</span>
</legend>
<%%= if @changeset.action do %>
<p class="torch-form-error">Oops, something went wrong! Please check the errors below.</p>
<%% end %>
<%= for {label, input, error} <- Mix.Torch.torch_inputs(schema) do%>
<div class="torch-form-group">
<%= label %>
<div class="torch-form-group-input">
<%= input %>
<%= error %>
</div>
</div>
<% end %>
<div class="torch-submit-form">
<%%= submit "Submit", class: "torch-submit-button" %>
</div>
</fieldset>
</.form>
</div>
</section>