forked from PrestaShop/hummingbird
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontactform.tpl
More file actions
98 lines (87 loc) · 3.33 KB
/
contactform.tpl
File metadata and controls
98 lines (87 loc) · 3.33 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
<section class="contact-form">
<form action="{$urls.pages.contact}" method="post" {if $contact.allow_file_upload}enctype="multipart/form-data"{/if}>
{if $notifications}
<div class="alert {if $notifications.nw_error}alert-danger{else}alert-success{/if}">
<ul>
{foreach $notifications.messages as $notif}
<li>{$notif}</li>
{/foreach}
</ul>
</div>
{/if}
{if !$notifications || $notifications.nw_error}
<section class="form-fields">
<h1 class="second-title mb-4">{l s='Contact us' d='Shop.Theme.Global'}</h1>
<div class="mb-3">
<label class="form-label">{l s='Subject' d='Shop.Forms.Labels'}</label>
<select name="id_contact" class="form-select">
{foreach from=$contact.contacts item=contact_elt}
<option value="{$contact_elt.id_contact}">{$contact_elt.name}</option>
{/foreach}
</select>
</div>
<div class="mb-3">
<label class="form-label">{l s='Email address' d='Shop.Forms.Labels'}</label>
<input
class="form-control"
name="from"
type="email"
value="{$contact.email}"
placeholder="{l s='your@email.com' d='Shop.Forms.Help'}"
>
</div>
{if $contact.orders}
<div class="mb-3">
<label class="form-label">{l s='Order reference' d='Shop.Forms.Labels'}</label>
<select name="id_order" class="form-select">
<option value="">{l s='Select reference' d='Shop.Forms.Help'}</option>
{foreach from=$contact.orders item=order}
<option value="{$order.id_order}">{$order.reference}</option>
{/foreach}
</select>
<span class="form-text">
{l s='optional' d='Shop.Forms.Help'}
</span>
</div>
{/if}
{if $contact.allow_file_upload}
<div class="mb-3">
<label class="form-label" for="fileUpload">{l s='Attachment' d='Shop.Forms.Labels'}</label>
<input type="file" name="fileUpload" class="form-control">
<span class="form-text">
{l s='optional' d='Shop.Forms.Help'}
</span>
</div>
{/if}
<div class="mb-3">
<label class="form-label">{l s='Message' d='Shop.Forms.Labels'}</label>
<textarea
class="form-control"
name="message"
placeholder="{l s='How can we help?' d='Shop.Forms.Help'}"
rows="3"
>{if $contact.message}{$contact.message}{/if}</textarea>
</div>
{if isset($id_module)}
<div class="mb-3">
{hook h='displayGDPRConsent' id_module=$id_module}
</div>
{/if}
</section>
<footer class="form-footer">
<style>
input[name=url] {
display: none !important;
}
</style>
<input type="text" name="url" value=""/>
<input type="hidden" name="token" value="{$token}" />
<input class="btn btn-primary" type="submit" name="submitMessage" value="{l s='Send' d='Shop.Theme.Actions'}">
</footer>
{/if}
</form>
</section>