From 558de82c964dcfd57e55b4e994e7ece390d41162 Mon Sep 17 00:00:00 2001 From: Echo Date: Mon, 1 Dec 2025 11:02:24 -0500 Subject: [PATCH] readd full page edit when validation fails (#671) --- .../my/project_repo_mappings/edit.html.erb | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 app/views/my/project_repo_mappings/edit.html.erb diff --git a/app/views/my/project_repo_mappings/edit.html.erb b/app/views/my/project_repo_mappings/edit.html.erb new file mode 100644 index 0000000..f770594 --- /dev/null +++ b/app/views/my/project_repo_mappings/edit.html.erb @@ -0,0 +1,42 @@ +<% content_for(:title) { "Edit Project Mapping" } %> + +
+
+

Edit Project Mapping

+

We try to autodetect your Git repository, but you can manually specify it if needed.

+ + <% if flash[:alert] %> +
+ <%= flash[:alert] %> +
+ <% end %> + + <%= form_with model: @project_repo_mapping, + url: my_project_repo_mapping_path(CGI.escape(@project_repo_mapping.project_name)), + method: :patch, + local: true, + class: "w-full space-y-4" do |f| %> +
+ <%= f.label :project_name, "Project Name", class: "block text-sm font-semibold text-white" %> + <%= f.text_field :project_name, + value: @project_repo_mapping.project_name, + disabled: true, + class: "w-full px-4 py-3 bg-darkless text-secondary border border-darkless rounded-lg cursor-not-allowed" %> +

Project name cannot be changed.

+
+ +
+ <%= f.label :repo_url, "Repository URL", class: "block text-sm font-semibold text-white" %> + <%= f.url_field :repo_url, + value: @project_repo_mapping.repo_url, + placeholder: "https://github.com/username/repo", + class: "w-full px-4 py-3 bg-darkless text-white border border-darkless rounded-lg focus:border-primary focus:outline-none transition-colors" %> +
+ +
+ <%= link_to "Cancel", my_projects_path, class: "px-4 py-2 border border-gray-600 text-gray-300 hover:bg-darkless rounded-lg transition-colors" %> + <%= f.submit "Update Project", class: "px-4 py-2 bg-primary text-white hover:bg-red rounded-lg font-medium cursor-pointer transition-colors" %> +
+ <% end %> +
+