<% content_for :title, "Edit DSN - #{@dsn.name}" %>

Edit DSN

<%= link_to "Back to DSN", @dsn, class: "inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50" %>
<%= form_with(model: @dsn, local: true, class: "space-y-6") do |form| %> <% if @dsn.errors.any? %>

There were <%= pluralize(@dsn.errors.count, "error") %> with your submission:

    <% @dsn.errors.full_messages.each do |message| %>
  • <%= message %>
  • <% end %>
<% end %>
<%= form.label :name, class: "block text-sm font-medium text-gray-700" %>
<%= form.text_field :name, class: "shadow-sm focus:ring-blue-500 focus:border-blue-500 block w-full sm:text-sm border-gray-300 rounded-md", placeholder: "e.g., Production DSN, Development DSN" %>

A descriptive name to help you identify this DSN key.

<%= form.check_box :enabled, class: "focus:ring-blue-500 h-4 w-4 text-blue-600 border-gray-300 rounded" %>
<%= form.label :enabled, class: "font-medium text-gray-700" %>

Enable this DSN for agent authentication

DSN Key

<%= @dsn.key %>

DSN keys cannot be changed after creation.

<%= link_to "Cancel", @dsn, class: "bg-white py-2 px-4 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" %> <%= form.submit "Update DSN", class: "ml-3 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" %>
<% end %>