2024-06-04 03:01:19 -04:00
|
|
|
<div class="fixed inset-0 flex items-center justify-center z-10 " _="on closeModal remove me">
|
|
|
|
|
<div class="bg-white rounded-md border border-black p-2">
|
|
|
|
|
<div class="text-lg">Clone Structure</div>
|
|
|
|
|
<form hx-post="/workshop/<%= it.structure.id %>/clone" hx-target="#response" class="flex flex-col gap-2">
|
|
|
|
|
<div class="flex flex-col">
|
|
|
|
|
<label class="text-xs">Name</label>
|
|
|
|
|
<input name="name" id="name" type="text" value="<%= it.structure.name %> clone" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flex flex-col">
|
|
|
|
|
<label class="text-xs">Route Prefix</label>
|
|
|
|
|
<input name="route_prefix" id="route_prefix" type="text" value="<%= it.defaultRoutePrefix %>" />
|
|
|
|
|
</div>
|
2024-06-08 11:42:27 -04:00
|
|
|
<div class="text-xs">Clone DBs</div>
|
|
|
|
|
<% for (let db of it.dbs) { %>
|
|
|
|
|
<div class="flex gap-2">
|
|
|
|
|
<input id="<%= db.id %>" type="checkbox" name="clone_dbs" value="<%= db.id %>" <% if (!db.is_aliased) { %> <%= "checked" %> <% } %>>
|
|
|
|
|
<label for="<%= db.id %>" class="text-xs"><%= db.alias %> <% if (db.is_aliased) { %>(aliased)<% } %></label>
|
|
|
|
|
</div>
|
|
|
|
|
<% } %>
|
2024-06-04 03:01:19 -04:00
|
|
|
<section class="flex flex-end gap-2" style="justify-content: flex-end">
|
|
|
|
|
<button class="bg-green-500 rounded p-2 hover:bg-green-700 text-white" type="submit">Clone</button>
|
|
|
|
|
<button class="bg-gray-400 rounded p-2 hover:bg-gray-700 text-white" type="button" _="on click trigger closeModal">Cancel</button>
|
|
|
|
|
</section>
|
|
|
|
|
</form>
|
|
|
|
|
<div id="response"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|