item ?? []; $products = $this -> products ?? []; $provinces = $this -> provinces ?? []; /** Województwa */ $province_values = [ 0 => '--- wybierz województwo ---' ]; if (is_array($provinces)) { foreach ($provinces as $p) { $province_values[(int)$p['id']] = $p['name']; } } /** Typ salonu */ $salon_type_values = [ 'sales' => 'SALON SPRZEDAŻY', 'partner' => 'SALON PARTNERSKI', ]; /** Produkty */ $selected_products = $item['products'] ?? []; if (!is_array($selected_products)) $selected_products = []; ob_start(); ?>
'Województwo', 'name' => 'province_id', 'id' => 'province_id', 'values' => $province_values, 'value' => (int)($item['province_id'] ?? 0), ]);?> 'Typ salonu', 'name' => 'salon_type', 'id' => 'salon_type', 'values' => $salon_type_values, 'value' => ($item['salon_type'] ?? 'sales'), ]);?> 'Nazwa salonu', 'name' => 'salon_name', 'id' => 'salon_name', 'value' => ($item['salon_name'] ?? ''), 'inline' => true ]);?> 'Miasto', 'name' => 'city', 'id' => 'city', 'value' => ($item['city'] ?? ''), 'inline' => true ]);?> 'Adres', 'name' => 'address', 'id' => 'address', 'value' => ($item['address'] ?? ''), 'inline' => true ]);?> 'Koordynaty (lat, lng)', 'name' => 'coords', 'id' => 'coords', 'value' => ($item['coords'] ?? ''), 'inline' => true, 'desc' => 'Np. 50.07576365941408, 21.973886126521034' ]);?> 'Godziny otwarcia', 'name' => 'opening_hours', 'id' => 'opening_hours', 'value' => ($item['opening_hours'] ?? ''), 'inline' => true, 'desc' => 'Np. Pn-Pt: 8-17 | Sob: 9-13 | Nd: nieczynne' ]);?> 'Baner (obrazek salonu)', 'name' => 'banner_image', 'id' => 'banner_image', 'value' => ($item['banner_image'] ?? ''), 'icon_content' => 'przeglądaj', 'inline' => true, 'icon_js' => "window.open('/libraries/filemanager-9.14.1/dialog.php?type=1&popup=1&field_id=banner_image&akey=c3cb2537d25c0efc9e573d059d79c3b8','mywindow','location=1,status=1,scrollbars=1,width=1100,height=700');" ]);?>
'Telefony (1 numer = 1 linia)', 'name' => 'phones', 'id' => 'phones', 'value' => $phones_txt, 'inline' => true ]);?> 'E-maile (1 email = 1 linia)', 'name' => 'emails', 'id' => 'emails', 'value' => $emails_txt, 'inline' => true ]);?> 'Tekst przycisku', 'name' => 'button_label', 'id' => 'button_label', 'value' => ($item['button_label'] ?? 'SKONTAKTUJ SIĘ Z NAMI'), 'inline' => true ]);?> 'Link przycisku (URL)', 'name' => 'button_url', 'id' => 'button_url', 'value' => ($item['button_url'] ?? ''), 'inline' => true, 'desc' => 'Np. https://twojadomena.pl/kontakt' ]);?>
Dostępne produkty
Brak produktów w pp_contacts_maps_products.
'Aktywny', 'name' => 'is_active', 'checked' => (!isset($item['is_active']) || (int)$item['is_active'] === 1) ? true : false ]);?> 'Sortowanie', 'name' => 'sort', 'id' => 'sort', 'value' => (int)($item['sort'] ?? 0), ]);?>
id = 'contacts-maps-edit'; $grid -> gdb_opt = $gdb; $grid -> include_plugins = true; $grid -> title = 'Edycja autora'; $grid -> title = $id ? 'Edycja salonu' : 'Dodaj salon'; $grid->fields = [ [ 'db' => 'id', 'type' => 'hidden', 'value' => $this->item['id'] ] ]; $grid -> external_code = $out; $grid -> actions = [ 'save' => [ 'url' => '/admin/contacts_maps/save/', 'back_url' => '/admin/contacts_maps/view_list/' ], 'cancel' => [ 'url' => '/admin/contacts_maps/view_list/' ] ]; $grid -> persist_edit = true; $grid -> id_param = 'id'; echo $grid -> draw(); ?>