Current section

Files

Jump to
mavu_be_user_ui lib live edit_component.html.heex
Raw

lib/live/edit_component.html.heex

<section id={"#{ @id }"} class="be_userlist_edit_component">
<%= if @local_edit_component do %>
<%= live_component @local_edit_component,
context: @context,
base_path: @base_path,
changeset: @changeset,
parent_id: @id,
rec_id: @rec_id
%>
<% else %>
<%= live_component MyAppBe.Live.Components.CenteredModalComponent, phx_target: "##{@id}", class: "sm:max-w-[90vw] sm:w-[400px] w-full" do %>
<div class="my-8 be_userlist_component_inner">
<.form let={f} for={@changeset} url="#" as={:fdata} phx-change={:validate} phx-submit={:save} phx-target="##{@id}">
<%= input f, :email , label: "Email" %>
<%= input f, :is_active ,using: :checkbox, label: "Is Active" %>
<div class="my-4 text-right">
<%= content_tag :button, "OK",class: "btn-outline-primary px-10" %>
</div>
</.form>
</div>
<% end %>
<% end %>
</section>