diff --git a/apps/andi/lib/andi_web/live/ingestion_live_view/extract_steps/extract_date_step_form.ex b/apps/andi/lib/andi_web/live/ingestion_live_view/extract_steps/extract_date_step_form.ex index a4ba5d5ab..95a8f0351 100644 --- a/apps/andi/lib/andi_web/live/ingestion_live_view/extract_steps/extract_date_step_form.ex +++ b/apps/andi/lib/andi_web/live/ingestion_live_view/extract_steps/extract_date_step_form.ex @@ -33,26 +33,26 @@ defmodule AndiWeb.ExtractSteps.ExtractDateStepForm do
- <%= label(f, :destination, DisplayNames.get(:destination), class: "label label--required") %> + <%= label(f, :destination, DisplayNames.get(:destination), class: "label label--required", for: "step-#{@id}__date-destination") %> <%= text_input(f, :destination, [id: "step-#{@id}__date-destination", class: "extract-date-step-form__destination input", phx_focus: :get_example_output, phx_target: "#step-#{@id}", required: true]) %> <%= ErrorHelpers.error_tag(f, :destination) %>
- <%= label(f, :deltaTimeUnit, DisplayNames.get(:deltaTimeUnit), class: "label") %> + <%= label(f, :deltaTimeUnit, DisplayNames.get(:deltaTimeUnit), class: "label", for: "step_#{@id}__date_delta_time_unit") %> <%= select(f, :deltaTimeUnit, get_time_units(), id: "step_#{@id}__date_delta_time_unit", class: "extract-date-step-form__delta_time_unit select", phx_focus: :get_example_output, phx_target: "#step-#{@id}") %> <%= ErrorHelpers.error_tag(f, :deltaTimeUnit) %>
- <%= label(f, :deltaTimeValue, DisplayNames.get(:deltaTimeValue), class: "label") %> + <%= label(f, :deltaTimeValue, DisplayNames.get(:deltaTimeValue), class: "label", for: "step_#{@id}__date_delta_time_value") %> <%= text_input(f, :deltaTimeValue, id: "step_#{@id}__date_delta_time_value", class: "extract-date-step-form__delta_time_value input", phx_focus: :get_example_output, phx_target: "#step-#{@id}") %> <%= ErrorHelpers.error_tag(f, :deltaTimeValue) %>
- <%= label(f, :format, "Format", class: "label label--required") %> + <%= label(f, :format, "Format", class: "label label--required", for: "step_#{@id}__date_format") %> Help
<%= text_input(f, :format, [id: "step_#{@id}__date_format", class: "extract-date-step-form__format input", phx_focus: :get_example_output, phx_target: "#step-#{@id}", required: true]) %> diff --git a/apps/andi/lib/andi_web/live/ingestion_live_view/extract_steps/extract_http_step_form.ex b/apps/andi/lib/andi_web/live/ingestion_live_view/extract_steps/extract_http_step_form.ex index 62abc671a..f41049e56 100644 --- a/apps/andi/lib/andi_web/live/ingestion_live_view/extract_steps/extract_http_step_form.ex +++ b/apps/andi/lib/andi_web/live/ingestion_live_view/extract_steps/extract_http_step_form.ex @@ -45,13 +45,13 @@ defmodule AndiWeb.ExtractSteps.ExtractHttpStepForm do
- <%= label(f, :action, DisplayNames.get(:method), class: "label label--required") %> + <%= label(f, :action, DisplayNames.get(:method), class: "label label--required", for: "step_#{@id}__http_method") %> <%= select(f, :action, get_http_methods(), [id: "step_#{@id}__http_method", class: "extract-http-step-form__method select", required: true]) %> <%= ErrorHelpers.error_tag(f, :action) %>
- <%= label(f, :url, DisplayNames.get(:url), class: "label label--required") %> + <%= label(f, :url, DisplayNames.get(:url), class: "label label--required", for: "step_#{@id}__url") %> <%= url_input(f, :url, [id: "step_#{@id}__url", class: "input full-width", disabled: @testing, required: true]) %> <%= ErrorHelpers.error_tag(f, :url, bind_to_input: false) %>
@@ -62,7 +62,7 @@ defmodule AndiWeb.ExtractSteps.ExtractHttpStepForm do <%= if input_value(f, :action) == "POST" do %>
- <%= label(f, :body, DisplayNames.get(:body), class: "label") %> + <%= label(f, :body, DisplayNames.get(:body), class: "label", for: "step_#{@id}__body") %> <%= textarea(f, :body, id: "step_#{@id}__body", class: "input full-width", phx_hook: "prettify", disabled: @testing) %> <%= ErrorHelpers.error_tag(f, :body, bind_to_input: false) %>
diff --git a/apps/andi/lib/andi_web/live/ingestion_live_view/extract_steps/extract_step_form.ex b/apps/andi/lib/andi_web/live/ingestion_live_view/extract_steps/extract_step_form.ex index c316cb866..dca657dcc 100644 --- a/apps/andi/lib/andi_web/live/ingestion_live_view/extract_steps/extract_step_form.ex +++ b/apps/andi/lib/andi_web/live/ingestion_live_view/extract_steps/extract_step_form.ex @@ -70,7 +70,7 @@ defmodule AndiWeb.IngestionLiveView.ExtractSteps.ExtractStepForm do
- <%= select(:form, :step_type, get_extract_step_types(), phx_blur: "update_new_step_type", selected: @new_step_type, id: "extract_step_type", class: "extract-step-form__step-type select") %> + <%= select(:form, :step_type, get_extract_step_types(), phx_blur: "update_new_step_type", selected: @new_step_type, id: "extract_step_type", class: "extract-step-form__step-type select", aria_label: "Select New Step Type") %>
@@ -143,10 +143,17 @@ defmodule AndiWeb.IngestionLiveView.ExtractSteps.ExtractStepForm do |> update_validation_status()} end - def handle_event("move-extract-step", %{"id" => extract_step_id, "move-index" => move_index_string}, socket) do + def handle_event( + "move-extract-step", + %{"id" => extract_step_id, "move-index" => move_index_string}, + socket + ) do move_index = String.to_integer(move_index_string) - extract_step_index = Enum.find_index(socket.assigns.extract_steps, fn extract_step -> extract_step.id == extract_step_id end) + extract_step_index = + Enum.find_index(socket.assigns.extract_steps, fn extract_step -> + extract_step.id == extract_step_id + end) target_index = extract_step_index + move_index @@ -163,10 +170,14 @@ defmodule AndiWeb.IngestionLiveView.ExtractSteps.ExtractStepForm do ) do ExtractSteps.delete(extract_step_id) updated_changeset_map = Map.delete(socket.assigns.extract_step_changesets, extract_step_id) + all_steps_for_ingestion = ExtractSteps.all_for_ingestion(ingestion_id) |> StructTools.sort_if_sequenced() {:noreply, - assign(socket, extract_steps: all_steps_for_ingestion, extract_step_changesets: updated_changeset_map) + assign(socket, + extract_steps: all_steps_for_ingestion, + extract_step_changesets: updated_changeset_map + ) |> update_validation_status()} end diff --git a/apps/andi/lib/andi_web/live/ingestion_live_view/finalize/finalize_form.ex b/apps/andi/lib/andi_web/live/ingestion_live_view/finalize/finalize_form.ex index f0c7720a7..49aec6cb9 100644 --- a/apps/andi/lib/andi_web/live/ingestion_live_view/finalize/finalize_form.ex +++ b/apps/andi/lib/andi_web/live/ingestion_live_view/finalize/finalize_form.ex @@ -86,11 +86,11 @@ defmodule AndiWeb.IngestionLiveView.FinalizeForm do
- <%= label(f, :cadence, "Immediately", class: "finalize-form__schedule-option-label") %> + <%= label(f, :cadence, "Immediately", class: "finalize-form__schedule-option-label", for: "form_data_cadence_once") %> <%= radio_button(f, :cadence, "once")%>
- <%= label(f, :cadence, "Repeat", class: "finalize-form__schedule-option-label") %> + <%= label(f, :cadence, "Repeat", class: "finalize-form__schedule-option-label", for: "form_data_cadence_0__________") %> <%= radio_button(f, :cadence, @crontab) %>
diff --git a/apps/andi/lib/andi_web/live/ingestion_live_view/metadata/metadata_form.ex b/apps/andi/lib/andi_web/live/ingestion_live_view/metadata/metadata_form.ex index a7d09db3e..63a93c7c0 100644 --- a/apps/andi/lib/andi_web/live/ingestion_live_view/metadata/metadata_form.ex +++ b/apps/andi/lib/andi_web/live/ingestion_live_view/metadata/metadata_form.ex @@ -47,10 +47,11 @@ defmodule AndiWeb.IngestionLiveView.MetadataForm do