|
|
@ -21,19 +21,11 @@ defmodule DecentralisedBookIndexWeb.BookLive.FormComponent do
|
|
|
|
<%= if @form.source.type == :create do %>
|
|
|
|
<%= if @form.source.type == :create do %>
|
|
|
|
<.input field={@form[:title]} type="text" label="Title" />
|
|
|
|
<.input field={@form[:title]} type="text" label="Title" />
|
|
|
|
<.input field={@form[:cover_image_url]} type="text" label="Cover image url" />
|
|
|
|
<.input field={@form[:cover_image_url]} type="text" label="Cover image url" />
|
|
|
|
<.input
|
|
|
|
<.input field={@form[:description]} type="textarea" label="Description" />
|
|
|
|
field={@form[:description]}
|
|
|
|
|
|
|
|
type="textarea"
|
|
|
|
|
|
|
|
label="Description"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<.bids_inputs form={@form} myself={@myself} />
|
|
|
|
<.bids_inputs form={@form} myself={@myself} />
|
|
|
|
<.author_roles_inputs form={@form} myself={@myself} notify_component={@myself} />
|
|
|
|
<.author_roles_inputs form={@form} myself={@myself} notify_component={@myself} />
|
|
|
|
<.input field={@form[:format]} type="text" label="Format" />
|
|
|
|
<.input field={@form[:format]} type="text" label="Format" />
|
|
|
|
<.input
|
|
|
|
<.input field={@form[:language]} type="text" label="Language" />
|
|
|
|
field={@form[:language]}
|
|
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
|
|
label="Language"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<.input field={@form[:page_count]} type="number" label="Page count" />
|
|
|
|
<.input field={@form[:page_count]} type="number" label="Page count" />
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<.input field={@form[:publisher_id]} type="text" label="Publisher" type="hidden" show_errors?={false} />
|
|
|
|
<.input field={@form[:publisher_id]} type="text" label="Publisher" type="hidden" show_errors?={false} />
|
|
|
@ -48,19 +40,11 @@ defmodule DecentralisedBookIndexWeb.BookLive.FormComponent do
|
|
|
|
<%= if @form.source.type == :update do %>
|
|
|
|
<%= if @form.source.type == :update do %>
|
|
|
|
<.input field={@form[:title]} type="text" label="Title" />
|
|
|
|
<.input field={@form[:title]} type="text" label="Title" />
|
|
|
|
<.input field={@form[:cover_image_url]} type="text" label="Cover image url" />
|
|
|
|
<.input field={@form[:cover_image_url]} type="text" label="Cover image url" />
|
|
|
|
<.input
|
|
|
|
<.input field={@form[:description]} type="textarea" label="Description" />
|
|
|
|
field={@form[:description]}
|
|
|
|
|
|
|
|
type="textarea"
|
|
|
|
|
|
|
|
label="Description"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<.bids_inputs form={@form} myself={@myself} />
|
|
|
|
<.bids_inputs form={@form} myself={@myself} />
|
|
|
|
<.author_roles_inputs form={@form} myself={@myself} notify_component={@myself} />
|
|
|
|
<.author_roles_inputs form={@form} myself={@myself} notify_component={@myself} />
|
|
|
|
<.input field={@form[:format]} type="text" label="Format" />
|
|
|
|
<.input field={@form[:format]} type="text" label="Format" />
|
|
|
|
<.input
|
|
|
|
<.input field={@form[:language]} type="text" label="Language" />
|
|
|
|
field={@form[:language]}
|
|
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
|
|
label="Language"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<.input field={@form[:page_count]} type="number" label="Page count" />
|
|
|
|
<.input field={@form[:page_count]} type="number" label="Page count" />
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<.input field={@form[:publisher_id]} type="text" label="Publisher" type="hidden" show_errors?={false} />
|
|
|
|
<.input field={@form[:publisher_id]} type="text" label="Publisher" type="hidden" show_errors?={false} />
|
|
|
@ -181,8 +165,20 @@ defmodule DecentralisedBookIndexWeb.BookLive.FormComponent do
|
|
|
|
size="xs"
|
|
|
|
size="xs"
|
|
|
|
inverse
|
|
|
|
inverse
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<svg class="w-6 h-6 text-gray-800 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
|
|
|
|
<svg
|
|
|
|
<path fill-rule="evenodd" d="M8.586 2.586A2 2 0 0 1 10 2h4a2 2 0 0 1 2 2v2h3a1 1 0 1 1 0 2v12a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V8a1 1 0 0 1 0-2h3V4a2 2 0 0 1 .586-1.414ZM10 6h4V4h-4v2Zm1 4a1 1 0 1 0-2 0v8a1 1 0 1 0 2 0v-8Zm4 0a1 1 0 1 0-2 0v8a1 1 0 1 0 2 0v-8Z" clip-rule="evenodd"/>
|
|
|
|
class="w-6 h-6 text-gray-800 dark:text-white"
|
|
|
|
|
|
|
|
aria-hidden="true"
|
|
|
|
|
|
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
|
|
|
|
|
|
width="24"
|
|
|
|
|
|
|
|
height="24"
|
|
|
|
|
|
|
|
fill="currentColor"
|
|
|
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<path
|
|
|
|
|
|
|
|
fill-rule="evenodd"
|
|
|
|
|
|
|
|
d="M8.586 2.586A2 2 0 0 1 10 2h4a2 2 0 0 1 2 2v2h3a1 1 0 1 1 0 2v12a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V8a1 1 0 0 1 0-2h3V4a2 2 0 0 1 .586-1.414ZM10 6h4V4h-4v2Zm1 4a1 1 0 1 0-2 0v8a1 1 0 1 0 2 0v-8Zm4 0a1 1 0 1 0-2 0v8a1 1 0 1 0 2 0v-8Z"
|
|
|
|
|
|
|
|
clip-rule="evenodd"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</svg>
|
|
|
|
</svg>
|
|
|
|
</.button_link>
|
|
|
|
</.button_link>
|
|
|
|
</td>
|
|
|
|
</td>
|
|
|
@ -285,8 +281,20 @@ defmodule DecentralisedBookIndexWeb.BookLive.FormComponent do
|
|
|
|
size="xs"
|
|
|
|
size="xs"
|
|
|
|
inverse
|
|
|
|
inverse
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<svg class="w-6 h-6 text-gray-800 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
|
|
|
|
<svg
|
|
|
|
<path fill-rule="evenodd" d="M8.586 2.586A2 2 0 0 1 10 2h4a2 2 0 0 1 2 2v2h3a1 1 0 1 1 0 2v12a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V8a1 1 0 0 1 0-2h3V4a2 2 0 0 1 .586-1.414ZM10 6h4V4h-4v2Zm1 4a1 1 0 1 0-2 0v8a1 1 0 1 0 2 0v-8Zm4 0a1 1 0 1 0-2 0v8a1 1 0 1 0 2 0v-8Z" clip-rule="evenodd"/>
|
|
|
|
class="w-6 h-6 text-gray-800 dark:text-white"
|
|
|
|
|
|
|
|
aria-hidden="true"
|
|
|
|
|
|
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
|
|
|
|
|
|
width="24"
|
|
|
|
|
|
|
|
height="24"
|
|
|
|
|
|
|
|
fill="currentColor"
|
|
|
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<path
|
|
|
|
|
|
|
|
fill-rule="evenodd"
|
|
|
|
|
|
|
|
d="M8.586 2.586A2 2 0 0 1 10 2h4a2 2 0 0 1 2 2v2h3a1 1 0 1 1 0 2v12a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V8a1 1 0 0 1 0-2h3V4a2 2 0 0 1 .586-1.414ZM10 6h4V4h-4v2Zm1 4a1 1 0 1 0-2 0v8a1 1 0 1 0 2 0v-8Zm4 0a1 1 0 1 0-2 0v8a1 1 0 1 0 2 0v-8Z"
|
|
|
|
|
|
|
|
clip-rule="evenodd"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</svg>
|
|
|
|
</svg>
|
|
|
|
</.button_link>
|
|
|
|
</.button_link>
|
|
|
|
</td>
|
|
|
|
</td>
|
|
|
|