| Current Path : /home/rtorresani/www/app/design/frontend/Magento/indaco/Magento_Contact/templates/ |
| Current File : //home/rtorresani/www/app/design/frontend/Magento/indaco/Magento_Contact/templates/form.phtml |
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// phpcs:disable Magento2.Templates.ThisInTemplate
// phpcs:disable Generic.Files.LineLength.TooLong
/** @var \Magento\Contact\Block\ContactForm $block */
/** @var \Magento\Contact\ViewModel\UserDataProvider $viewModel */
$viewModel = $block->getViewModel();
?>
<form class="form contact"
action="<?= $block->escapeUrl($block->getFormAction()) ?>"
id="contact-form"
method="post"
data-hasrequired="<?= $block->escapeHtmlAttr(__('* Required Fields')) ?>"
data-mage-init='{"validation":{}}'>
<fieldset class="fieldset" data-bind="attr: {'data-hasrequired': jQuery('* Required Fields')}">
<div class="field note no-label">
<?= $block->escapeHtml(__('Jot us a note and we’ll get back to you as quickly as possible.')) ?>
</div>
<div class="field name required">
<label class="label" for="name"><span><?= $block->escapeHtml(__('Name')) ?></span></label>
<div class="control">
<input name="name"
id="name"
title="<?= $block->escapeHtmlAttr(__('Name')) ?>"
value="<?= $block->escapeHtmlAttr($viewModel->getUserName()) ?>"
class="input-text"
type="text"
data-validate="{required:true}"/>
</div>
</div>
<div class="field email required">
<label class="label" for="email"><span><?= $block->escapeHtml(__('Email')) ?></span></label>
<div class="control">
<input name="email"
id="email"
title="<?= $block->escapeHtmlAttr(__('Email')) ?>"
value="<?= $block->escapeHtmlAttr($viewModel->getUserEmail()) ?>"
class="input-text"
type="email"
data-validate="{required:true, 'validate-email':true}"
data-mage-init='{"mage/trim-input":{}}'
/>
</div>
</div>
<div class="field telephone">
<label class="label" for="telephone"><span><?= $block->escapeHtml(__('Phone Number')) ?></span></label>
<div class="control">
<input name="telephone"
id="telephone"
title="<?= $block->escapeHtmlAttr(__('Phone Number')) ?>"
value="<?= $block->escapeHtmlAttr($viewModel->getUserTelephone()) ?>"
class="input-text"
type="tel" />
</div>
</div>
<div class="field comment required">
<label class="label" for="comment">
<span><?= $block->escapeHtml(__('What’s on your mind?')) ?></span>
</label>
<div class="control">
<textarea name="comment"
id="comment"
title="<?= $block->escapeHtmlAttr(__('What’s on your mind?')) ?>"
class="input-text"
cols="5"
rows="3"
data-validate="{required:true}"
><?= $block->escapeHtml($viewModel->getUserComment()) ?></textarea>
</div>
</div>
<div class="field tcagreecreateaccount required">
<input type="checkbox" id="tcagreecreateaccount" name="tcagreecreateaccount" data-validate="{required:true}" class="input-checkbox checkbox required" value="1">
<label for="tcagreecreateaccount" class="label">
<?php echo __('informativeprivacy')?>
</label>
</div>
<div class="field tcagreecreateaccount " style="display: flex; align-items: flex-start;">
<button class="btn btn-primary" onclick="jQuery('.consent').prop( 'checked', true); return false;">Acconsenti a tutto</button>
</div>
<div class="field tcagreecreateaccount" style="display: flex; align-items: flex-start;">
<input type="checkbox" id="tcagreecreateaccountconsent1" name="tcagreecreateaccountconsent1" class="input-checkbox checkbox consent" value="1">
<label for="tcagreecreateaccountconsent1" class="label">
<?php echo __('consent1')?>
</label>
</div>
<div class="field tcagreecreateaccount" style="display: flex; align-items: flex-start;">
<input type="checkbox" id="tcagreecreateaccountconsent2" name="tcagreecreateaccountconsent2" class="input-checkbox checkbox consent" value="1">
<label for="tcagreecreateaccountconsent2" class="label">
<?php echo __('consent2')?>
</label>
</div>
<div class="field tcagreecreateaccount" style="display: flex; align-items: flex-start;">
<input type="checkbox" id="tcagreecreateaccountconsent3" name="tcagreecreateaccountconsent3" class="input-checkbox checkbox consent" value="1">
<label for="tcagreecreateaccountconsent3" class="label">
<?php echo __('consent3')?>
</label>
</div>
<?= $block->getChildHtml('form.additional.info') ?>
</fieldset>
<div class="actions-toolbar">
<div class="primary">
<input type="hidden" name="hideit" id="hideit" value="" />
<button type="submit" title="<?= $block->escapeHtmlAttr(__('Submit')) ?>" class="action submit primary">
<span><?= $block->escapeHtml(__('Submit')) ?></span>
</button>
</div>
</div>
</form>
<script type="text/x-magento-init">
{
"*": {
"Magento_Customer/js/block-submit-on-send": {
"formId": "contact-form"
}
}
}
</script>
<script>
_iub.cons_instructions.push(["load", {
form: {
selector: document.getElementById("contact-form"),
map: {
subject: {
full_name: "name",
phone: "telephone",
email: "email"
},
preferences: {
policy: "tcagreecreateaccount",
consent1: "tcagreecreateaccountconsent1",
consent2: "tcagreecreateaccountconsent2",
consent3: "tcagreecreateaccountconsent3"
}
}
},
consent: {
legal_notices: [{
identifier: "privacy_policy",
},
{
identifier: 'cookie_policy',
},
{
identifier: "terms",
}
],
}
}]);
</script>