Update Server edit to allow change only sync_on? for other server's data.
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -16,8 +16,14 @@ defmodule DecentralisedBookIndexWeb.DbiServerLive.FormComponent do
|
||||
phx-change="validate"
|
||||
phx-submit="save"
|
||||
>
|
||||
<.input field={@form[:name]} type="text" label="Name" />
|
||||
<.input field={@form[:url]} type="text" label="Url" />
|
||||
<%= if @form.source.type == :create do %>
|
||||
<.input field={@form[:name]} type="text" label="Name" />
|
||||
<.input field={@form[:url]} type="text" label="Url" />
|
||||
<% end %>
|
||||
<%= if @form.source.type == :update and is_nil(@form[:dbi_server].value) do %>
|
||||
<.input field={@form[:name]} type="text" label="Name" />
|
||||
<.input field={@form[:url]} type="text" label="Url" />
|
||||
<% end %>
|
||||
<.input field={@form[:sync_on?]} type="checkbox" label="Sync on" />
|
||||
|
||||
<:actions>
|
||||
|
||||
Reference in New Issue
Block a user