summaryrefslogtreecommitdiff
path: root/views/mods/mod_printshop/basket_row.phtml
blob: ab063c0a56bf87b948f7a1b645476675389aa1c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php

    declare(strict_types=1);

    /**
     * User: Daschmi (https://daschmi.de)
     * Date: 13.02.2020
     * Time: 06:25
     */

    $view = $this->view['wpsg_mod_printshop'];

?>

<div class="product_action product_action_printshop">
	<div class="label">

        <?php echo __("Bestellupload", "wpsg"); ?><br />

        <input type="file" name="wpsg_mod_printshop[<?php echo $view['product_index']; ?>][]" <?php echo (($view['length'] > 1)?'multiple':''); ?> />

    </div>
    <div class="files">

        <?php if (wpsg_isSizedArray($view['files'])) { ?>

            <ul>
                <?php foreach ($view['files'] as $file_index => $f) { ?>
                <li>
                    <input type="checkbox" name="wpsg_mod_printshop[<?php echo $view['product_index'] ?>][delete_file][]" value="<?php echo $file_index; ?>" class="checkbox" style="display:none;" />
                    <a href="<?php echo $this->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_printshop', 'downloadFile', ['product_index' => $view['product_index'], 'file_index' => $file_index], false); ?>" target="_blank">
                        <?php echo $f['file_name']; ?>
                    </a>
                    <img
                            onclick="event.target.parentElement.querySelector('.checkbox').checked = 'checked'; event.target.parentElement.style.display = 'none'; return false"
                            class="delete" title="<?php echo __('Datei entfernen.', 'wpsg'); ?>" src="<?php echo WPSG_URL; ?>views/gfx/bin_x.png" alt="<?php echo __('Löschen', 'wpsg'); ?>" alt="X" />
                </li>
                <?php } ?>
            </ul>

        <?php } else { ?>

            <p><?php echo __('Noch keine Uploads durchgeführt.', 'wpsg'); ?></p>

        <?php } ?>

    </div>
</div>