2021-03-03 16:07:59 -05:00
|
|
|
<%= form_for @changeset, "#", [
|
2021-03-04 23:15:20 -05:00
|
|
|
id: "property-form",
|
2021-03-03 16:07:59 -05:00
|
|
|
phx_target: @myself,
|
|
|
|
phx_change: "validate",
|
|
|
|
phx_submit: "save"
|
|
|
|
], fn f -> %>
|
2020-09-14 12:22:25 -04:00
|
|
|
|
2021-03-05 15:32:01 -05:00
|
|
|
<div class="modal-body">
|
2020-09-14 12:22:25 -04:00
|
|
|
|
2021-03-08 22:23:19 -05:00
|
|
|
<%= label f, :name, class: "form-label" %>
|
|
|
|
<div class="mb-3" phx-feedback-for="<%= input_id(f, :name) %>">
|
|
|
|
<%= text_input f, :name,
|
|
|
|
class: input_class(f, :name, "form-control"),
|
|
|
|
aria_describedby: error_ids(f, :name)
|
|
|
|
%>
|
|
|
|
<%= error_tag f, :name %>
|
2021-03-03 16:07:59 -05:00
|
|
|
</div>
|
2020-09-14 12:22:25 -04:00
|
|
|
|
2021-03-08 22:23:19 -05:00
|
|
|
<%= label f, :price, class: "form-label" %>
|
|
|
|
<div class="mb-3" phx-feedback-for="<%= input_id(f, :price) %>">
|
|
|
|
<%= number_input f, :price,
|
|
|
|
class: input_class(f, :price, "form-control"),
|
|
|
|
step: "any",
|
|
|
|
aria_describedby: error_ids(f, :price)
|
|
|
|
%>
|
|
|
|
<%= error_tag f, :price %>
|
2021-03-03 16:07:59 -05:00
|
|
|
</div>
|
2020-09-14 12:22:25 -04:00
|
|
|
|
2021-03-08 22:23:19 -05:00
|
|
|
<%= label f, :description, class: "form-label" %>
|
|
|
|
<div class="mb-3" phx-feedback-for="<%= input_id(f, :description) %>">
|
|
|
|
<%= textarea f, :description,
|
|
|
|
class: input_class(f, :description, "form-control"),
|
|
|
|
aria_describedby: error_ids(f, :description)
|
|
|
|
%>
|
|
|
|
<%= error_tag f, :description %>
|
2021-03-03 16:07:59 -05:00
|
|
|
</div>
|
2021-03-05 15:32:01 -05:00
|
|
|
|
2021-03-03 16:07:59 -05:00
|
|
|
</div>
|
2021-03-05 15:32:01 -05:00
|
|
|
<div class="modal-footer">
|
2020-09-14 12:22:25 -04:00
|
|
|
|
2021-03-05 15:32:01 -05:00
|
|
|
<%= link "Cancel", to: "#", class: "btn btn-secondary me-2", phx_click: "cancel", phx_target: @myself %>
|
|
|
|
<%= submit "Save",
|
|
|
|
class: "btn btn-primary ",
|
|
|
|
disabled: !@changeset.valid?,
|
|
|
|
aria_disabled: !@changeset.valid? && "true" || false,
|
|
|
|
phx_disable_with: "Saving..."
|
|
|
|
%>
|
|
|
|
|
|
|
|
</div>
|
2021-03-03 16:07:59 -05:00
|
|
|
|
|
|
|
<% end %>
|