Zmiany w API
This commit is contained in:
@@ -24,27 +24,16 @@ $shops = $stmt->fetchAll();
|
||||
<div class="bg-white shadow-lg rounded-lg p-8">
|
||||
<h1 class="text-2xl font-bold mb-6">Edytuj miejsce / salon</h1>
|
||||
<form method="post" action="../actions/edit.php?id=<?= $id ?>" class="space-y-4">
|
||||
|
||||
<!-- Typ -->
|
||||
<div>
|
||||
<label class="block mb-1 font-medium text-gray-700">Typ miejsca</label>
|
||||
<select name="type" class="w-full p-3 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
<option value="city" <?= $place['type']=='city'?'selected':'' ?>>City</option>
|
||||
<option value="woj" <?= $place['type']=='woj'?'selected':'' ?>>Woj</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Nazwa -->
|
||||
<div>
|
||||
<label class="block mb-1 font-medium text-gray-700">Nazwa</label>
|
||||
<input name="name" type="text" value="<?= htmlspecialchars($place['name']) ?>" class="w-full p-3 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
<label class="block mb-1 font-medium text-gray-700">Nazwa *</label>
|
||||
<input name="name" type="text" value="<?= htmlspecialchars($place['name']) ?>" class="w-full p-3 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500" required>
|
||||
</div>
|
||||
|
||||
<!-- Woj -->
|
||||
<div>
|
||||
<label class="block mb-1 font-medium text-gray-700">Woj (opcjonalnie)</label>
|
||||
<select name="woj" class="w-full p-3 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
<option value="" <?= !$place['woj']?'selected':'' ?>>Brak</option>
|
||||
<label class="block mb-1 font-medium text-gray-700">Województwo *</label>
|
||||
<select name="woj" class="w-full p-3 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500" required>
|
||||
<option value="Dolnośląskie" <?= $place['woj']=='Dolnośląskie'?'selected':'' ?>>Dolnośląskie</option>
|
||||
<option value="Kujawsko-Pomorskie" <?= $place['woj']=='Kujawsko-Pomorskie'?'selected':'' ?>>Kujawsko-Pomorskie</option>
|
||||
<option value="Lubelskie" <?= $place['woj']=='Lubelskie'?'selected':'' ?>>Lubelskie</option>
|
||||
@@ -68,28 +57,33 @@ $shops = $stmt->fetchAll();
|
||||
<h2 class="text-xl font-semibold mb-4">Dane sklepu</h2>
|
||||
|
||||
<div>
|
||||
<label class="block mb-1 font-medium text-gray-700">Adres</label>
|
||||
<input name="address" type="text" value="<?= htmlspecialchars($shops[0]['address'] ?? '') ?>" class="w-full p-3 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
<label class="block mb-1 font-medium text-gray-700">Adres *</label>
|
||||
<input name="address" type="text" placeholder="ul. Kościuszki 67" value="<?= htmlspecialchars($shops[0]['address'] ?? '') ?>" class="w-full p-3 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500" required>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block mb-1 font-medium text-gray-700">Godziny otwarcia</label>
|
||||
<input name="open_hours" type="text" value="<?= htmlspecialchars($shops[0]['open_hours'] ?? '') ?>" class="w-full p-3 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
<input name="open_hours" type="text" placeholder="pn.-pt. 8-16 sob. 9-15" value="<?= htmlspecialchars($shops[0]['open_hours'] ?? '') ?>" class="w-full p-3 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block mb-1 font-medium text-gray-700">Link do strony</label>
|
||||
<input name="url_shop" type="text" placeholder="https://moodo.pl/Salon-Moodo-...-123.html" value="<?= htmlspecialchars($shops[0]['url_shop'] ?? '') ?>" class="w-full p-3 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block mb-1 font-medium text-gray-700">Google Maps URL</label>
|
||||
<input name="url_address" type="text" value="<?= htmlspecialchars($shops[0]['url_address'] ?? '') ?>" class="w-full p-3 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
<input name="url_address" type="text" placeholder="https://maps.google.com/..." value="<?= htmlspecialchars($shops[0]['url_address'] ?? '') ?>" class="w-full p-3 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label class="block mb-1 font-medium text-gray-700">Lat</label>
|
||||
<input name="lat" type="text" value="<?= htmlspecialchars($shops[0]['lat'] ?? '') ?>" class="w-full p-3 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
<label class="block mb-1 font-medium text-gray-700">Lat *</label>
|
||||
<input name="lat" type="text" value="<?= htmlspecialchars($shops[0]['lat'] ?? '') ?>" class="w-full p-3 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500" required>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block mb-1 font-medium text-gray-700">Lng</label>
|
||||
<input name="lng" type="text" value="<?= htmlspecialchars($shops[0]['lng'] ?? '') ?>" class="w-full p-3 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
<label class="block mb-1 font-medium text-gray-700">Lng *</label>
|
||||
<input name="lng" type="text" value="<?= htmlspecialchars($shops[0]['lng'] ?? '') ?>" class="w-full p-3 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user