- Created Articles.php for rendering article views including full articles, miniature lists, and news sections. - Added Banners.php for handling banner displays. - Introduced Languages.php for rendering language options. - Implemented Menu.php for dynamic menu rendering. - Developed Newsletter.php for newsletter view rendering. - Created Scontainers.php for rendering specific containers. - Added ShopCategory.php for category descriptions and product listings. - Introduced ShopClient.php for managing client-related views such as address editing and order history. - Implemented ShopPaymentMethod.php for displaying payment methods in the basket. - Created ShopProduct.php for generating product URLs. - Added ShopSearch.php for rendering a simple search form. - Added .htaccess file to enhance security by restricting access to sensitive files and directories.
69 lines
2.3 KiB
PHP
69 lines
2.3 KiB
PHP
<?php
|
|
$value = is_array($this->value ?? null) ? $this->value : [];
|
|
$languages = is_array($this->languages ?? null) ? $this->languages : [];
|
|
$rowKey = (string)($this->rowKey ?? '');
|
|
$defaultLanguageId = (string)($this->defaultLanguageId ?? '');
|
|
$valueId = (int)($value['id'] ?? 0);
|
|
$isDefault = !empty($value['is_default']);
|
|
$impact = (string)($value['impact_on_the_price'] ?? '');
|
|
?>
|
|
<tr class="attribute-value-row" data-row-key="<?= htmlspecialchars($rowKey, ENT_QUOTES, 'UTF-8'); ?>">
|
|
<td class="text-center" style="width: 90px;">
|
|
<input
|
|
type="radio"
|
|
class="js-default-row"
|
|
name="default_row_key"
|
|
value="<?= htmlspecialchars($rowKey, ENT_QUOTES, 'UTF-8'); ?>"
|
|
<?= $isDefault ? 'checked="checked"' : ''; ?>
|
|
/>
|
|
</td>
|
|
<td style="width: 180px;">
|
|
<input type="hidden" class="js-value-id" value="<?= $valueId; ?>" />
|
|
<input
|
|
type="text"
|
|
class="form-control input-sm js-impact-on-price"
|
|
value="<?= htmlspecialchars($impact, ENT_QUOTES, 'UTF-8'); ?>"
|
|
placeholder="+10.00 / -5.50"
|
|
/>
|
|
</td>
|
|
<td>
|
|
<?php foreach ($languages as $language): ?>
|
|
<?php
|
|
if ((int)($language['status'] ?? 0) !== 1) {
|
|
continue;
|
|
}
|
|
|
|
$langId = (string)($language['id'] ?? '');
|
|
if ($langId === '') {
|
|
continue;
|
|
}
|
|
|
|
$langName = (string)($language['name'] ?? $langId);
|
|
$langValue = '';
|
|
if (is_array($value['languages'] ?? null) && isset($value['languages'][$langId]['name'])) {
|
|
$langValue = (string)$value['languages'][$langId]['name'];
|
|
}
|
|
?>
|
|
<div class="form-group mb10">
|
|
<label class="control-label" style="display:block;">
|
|
<?= htmlspecialchars($langName, ENT_QUOTES, 'UTF-8'); ?>
|
|
<?= $langId === $defaultLanguageId ? '<span style="color:#e74c3c;">*</span>' : ''; ?>
|
|
</label>
|
|
<input
|
|
type="text"
|
|
class="form-control input-sm js-value-name"
|
|
data-lang-id="<?= htmlspecialchars($langId, ENT_QUOTES, 'UTF-8'); ?>"
|
|
value="<?= htmlspecialchars($langValue, ENT_QUOTES, 'UTF-8'); ?>"
|
|
placeholder="Nazwa wartosci"
|
|
/>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
</td>
|
|
<td class="text-center" style="width: 100px;">
|
|
<button type="button" class="btn btn-xs btn-danger js-value-remove">
|
|
<i class="fa fa-trash"></i> Usun
|
|
</button>
|
|
</td>
|
|
</tr>
|
|
|