mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
46 lines
1.5 KiB
Text
46 lines
1.5 KiB
Text
|
|
<% content_for :title, "Background jobs" %>
|
||
|
|
|
||
|
|
<div class="min-h-content w-full my-5">
|
||
|
|
<%= render 'settings/navigation' %>
|
||
|
|
|
||
|
|
<div class="flex justify-between items-center mt-5">
|
||
|
|
<h1 class="font-bold text-4xl">Maps settings</h1>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mt-5" data-controller="map-preview">
|
||
|
|
<%= form_for :maps,
|
||
|
|
url: settings_maps_path,
|
||
|
|
method: :patch,
|
||
|
|
autocomplete: "off",
|
||
|
|
data: { turbo_method: :patch, turbo: false },
|
||
|
|
class: "lg:col-span-1" do |f| %>
|
||
|
|
<div class="form-control my-2">
|
||
|
|
<%= f.label :name %>
|
||
|
|
<%= f.text_field :name, value: @maps['name'], placeholder: 'Example: OpenStreetMap', class: "input input-bordered" %>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="form-control my-2">
|
||
|
|
<%= f.label :url, 'URL' %>
|
||
|
|
<%= f.text_field :url,
|
||
|
|
value: @maps['url'],
|
||
|
|
autocomplete: "off",
|
||
|
|
placeholder: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||
|
|
class: "input input-bordered",
|
||
|
|
data: {
|
||
|
|
map_preview_target: "urlInput",
|
||
|
|
action: "input->map-preview#updatePreview"
|
||
|
|
} %>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<%= f.submit 'Save', class: "btn btn-primary", data: { map_preview_target: "saveButton" } %>
|
||
|
|
<% end %>
|
||
|
|
|
||
|
|
<div class="lg:col-span-2" style="height: 500px;">
|
||
|
|
<div
|
||
|
|
data-map-preview-target="mapContainer"
|
||
|
|
class="w-full h-full rounded-lg border"
|
||
|
|
></div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|