![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/app/design/frontend/Cnc/default/Magento_Customer/templates/form/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ /** @var \Magento\Customer\Block\Form\Edit $block */ $addresses = $block->getPrimaryAddresses(); $customer = $block->getCustomer(); $basicContactBlock = $block->getChildBlock('customer_edit_my_contacts_field'); ?> <form class="form form-edit-account" action="<?= $block->escapeUrl($block->getUrl('customer/account/editPost')) ?>" method="post" id="form-validate" enctype="multipart/form-data" data-hasrequired="<?= $block->escapeHtmlAttr(__('* Required Fields')) ?>" autocomplete="off"> <?php $_dob = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Dob::class) ?> <?php $_taxvat = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Taxvat::class) ?> <?php $_gender = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Gender::class) ?> <div class="form-section"> <fieldset class="fieldset info"> <?= $block->getBlockHtml('formkey') ?> <legend class="legend"> <span><?= $block->escapeHtml(__('My informations')) ?></span> </legend> <div class="fieldset-section"> <div class="field"> <label for="company"> <?= $block->escapeHtml(__('Company: ')) ?> </label> <?php if ($addresses) : ?> <div id="company" class="control"> <span><?= $block->escapeHtml($addresses[0]->getCompany()); ?></span> </div> <?php endif; ?> </div> </div> <div class="fieldset-section"> <div class="field field-name-lastname"> <label class="label" for="<?= $block->escapeHtml('lastname') ?>"> <span><?= $block->escapeHtml(__('Lastname:')) ?></span> </label> <div class="control"> <span id="<?= $block->escapeHtml('lastname') ?>" name="<?= $block->escapeHtml('lastname') ?>" title="<?= $block->escapeHtml('lastname') ?>"> <?= $block->escapeHtmlAttr($customer->getLastname()) ?> </span> <input type="hidden" name="<?= $block->escapeHtml('lastname') ?>" value="<?= $block->escapeHtmlAttr($customer->getLastname()) ?>" /> </div> </div> <div class="field field-name-firstname"> <label class="label" for="<?= $block->escapeHtml('firstname') ?>"> <span><?= $block->escapeHtml(__('Firstname:')) ?></span> </label> <div class="control"> <span id="<?= $block->escapeHtml('firstname') ?>" name="<?= $block->escapeHtml('firstname') ?>" title="<?= $block->escapeHtml('firstname') ?>"> <?= $block->escapeHtmlAttr($customer->getFirstname()) ?> </span> <input type="hidden" name="<?= $block->escapeHtml('firstname') ?>" value="<?= $block->escapeHtmlAttr($customer->getFirstname()) ?>" /> </div> </div> </div> <div class="fieldset-section"> <div class="field field-email"> <span class="label"> <?= $block->escapeHtml(__('Email: ')) ?> </span> <div id="cnc-customer-email" class="control"> <span><?= $block->escapeHtml($customer->getEmail()); ?></span> </div> <div class="field choice"> <input type="checkbox" name="change_email" id="change-email" data-role="change-email" value="1" title="<?= $block->escapeHtmlAttr(__('Change Email')) ?>" class="checkbox" /> <label class="label" for="change-email"> <span class="label-change"><?= $block->escapeHtml(__('Change')) ?></span> <span class="label-cancel"><?= $block->escapeHtml(__('Cancel')) ?></span> </label> </div> </div> <div class="field field-password"> <span class="label"> <?= $block->escapeHtml(__('Password: ')) ?> </span> <div class="control choice"> <input type="checkbox" name="change_password" id="change-password" data-role="change-password" value="1" title="<?= $block->escapeHtmlAttr(__('Change Password')) ?>" <?php if ($block->getChangePassword()) : ?> checked="checked"<?php endif; ?> class="checkbox" /> <label class="label" for="change-password"> <span class="label-change"><?= $block->escapeHtml(__('Change')) ?></span> <span class="label-cancel"><?= $block->escapeHtml(__('Cancel')) ?></span> </label> </div> </div> </div> <div class="fieldset-section"> <?php if ($addresses) : ?> <div class="field field-telephone"> <span class="label"> <?= $block->escapeHtml(__('Telephone: ')) ?> </span> <div id="cnc-customer-telephone" class="control"> <span><?= $block->escapeHtml($addresses[0]->getTelephone()); ?></span> </div> <div class="field choice"> <input type="checkbox" name="change_telephone" id="change-telephone" data-role="change-telephone" value="1" title="<?= $block->escapeHtmlAttr(__('Change Telephone')) ?>" class="checkbox" /> <label class="label" for="change-telephone"> <span class="label-change"><?= $block->escapeHtml(__('Change')) ?></span> <span class="label-cancel"><?= $block->escapeHtml(__('Cancel')) ?></span> </label> </div> </div> <?php endif; ?> <div class="field field-taxvat"> <?php if ($_taxvat->isEnabled()) : ?> <span class="label"> <?= $block->escapeHtml(__('Tax/VAT Number')) ?> </span> <?php if ($customer->getTaxvat()) : ?> <div class="customer-taxvat"> <div id="cnc-customer-vat-number"> <span><?= $block->escapeHtml($customer->getTaxvat()); ?></span> </div> </div> <?php endif; ?> <div class="field choice"> <input type="checkbox" name="change_vat" id="change-vat" data-role="change-vat" value="1" title="<?= $block->escapeHtmlAttr(__('Change Customer VAT')) ?>" class="checkbox" /> <label class="label" for="change-vat"> <span class="label-change"><?= $block->escapeHtml(__('Change')) ?></span> <span class="label-cancel"><?= $block->escapeHtml(__('Cancel')) ?></span> </label> </div> <?php endif ?> </div> </div> </fieldset> <fieldset class="fieldset update-info" data-container="change-email-password" style="display:none;"> <legend class="legend"> <span data-title="change-email-password"> <?= $block->escapeHtml(__('Change Email and Password')) ?> </span> </legend> <div class="fieldset-section"> <div class="field email required" data-container="change-email"> <label class="label" for="email"> <span><?= $block->escapeHtml(__('Email')) ?></span> </label> <div class="control"> <input type="email" name="email" id="email" autocomplete="email" data-input="change-email" value="<?= $block->escapeHtmlAttr($customer->getEmail()) ?>" title="<?= $block->escapeHtmlAttr(__('Email')) ?>" placeholder="<?= $block->escapeHtmlAttr(__('Email')) ?>" class="input-text" data-validate="{required:true, 'validate-email':true}" /> </div> </div> </div> <div class="fieldset-section"> <div class="field password current required" data-container="current-password"> <label class="label" for="current-password"> <span><?= $block->escapeHtml(__('Current Password')) ?></span> </label> <div class="control"> <input type="password" class="input-text" name="current_password" id="current-password" data-input="current-password" autocomplete="off" /> </div> </div> </div> <div class="fieldset-section"> <div class="field new password required" data-container="new-password"> <label class="label" for="password"> <span><?= $block->escapeHtml(__('New Password')) ?></span> </label> <div class="control"> <input type="password" class="input-text" name="password" id="password" data-password-min-length="<?= $block->escapeHtmlAttr($block->getMinimumPasswordLength()) ?>" data-password-min-character-sets="<?= $block-> escapeHtmlAttr($block->getRequiredCharacterClassesNumber()) ?>" data-input="new-password" data-validate="{required:true, 'validate-customer-password':true}" autocomplete="off" /> <div id="password-strength-meter-container" data-role="password-strength-meter" aria-live="polite"> <div id="password-strength-meter" class="password-strength-meter"> <?= $block->escapeHtml(__('Password Strength')) ?>: <span id="password-strength-meter-label" data-role="password-strength-meter-label"> <?= $block->escapeHtml(__('No Password')) ?> </span> </div> </div> </div> </div> </div> <div class="fieldset-section"> <div class="field confirm password required" data-container="confirm-password"> <label class="label" for="password-confirmation"> <span><?= $block->escapeHtml(__('Confirm New Password')) ?></span> </label> <div class="control"> <input type="password" class="input-text" placeholder="<?= $block->escapeHtml(__('Confirm New Password')) ?>" name="password_confirmation" id="password-confirmation" data-input="confirm-password" autocomplete="off" /> </div> </div> </div> <?php if ($addresses) : ?> <div class="fieldset-section"> <div class="field telephone required" data-container="change-telephone"> <label class="label" for="telephone"><span><?= $block->escapeHtml(__('Telephone')) ?></span></label> <div class="control"> <input type=tel name="telephone" id="telephone" autocomplete="telephone" data-input="change-telephone" value="<?= $block->escapeHtmlAttr($addresses[0]->getTelephone()) ?>" title="<?= $block->escapeHtmlAttr(__('Telephone')) ?>" placeholder="<?= $block->escapeHtmlAttr(__('Telephone')) ?>" class="input-text" data-validate="{required:true}" /> </div> </div> </div> <?php endif; ?> <div class="fieldset-section"> <div data-container="cnc-customer-vat"> <?= $_taxvat->setTaxvat($customer->getTaxvat())->toHtml() ?> </div> </div> </fieldset> </div> <!-- START OF MY CONTACTS SECTION --> <div class="form-section"> <fieldset class="fieldset fieldset-contacts"> <legend class="legend"> <span><?= $block->escapeHtml(__('Accounting')) ?></span> </legend> <div class="additional-edit-form-fieldset"> <!-- Purchasing department email --> <div class="fieldset-section"> <div class="field"> <?= $basicContactBlock->setFieldType('email') ->setFieldCode('cnc_purchasing_department_email') ->setFieldLabel('Purchasing department email') ->setValidationRules('{required:true, \'validate-email\':true}') ->toHtml(); ?> </div> </div> <!-- Purchasing department phone --> <div class="fieldset-section"> <div class="field"> <?= $basicContactBlock->setFieldType('tel') ->setFieldCode('cnc_purchasing_department_phone') ->setFieldLabel('Purchasing department phone') ->setValidationRules('{required:true, \'validate-phoneStrict\':true}') ->toHtml(); ?> </div> </div> <!-- Accounts department email --> <div class="fieldset-section"> <div class="field"> <?= $basicContactBlock->setFieldType('email') ->setFieldCode('cnc_accounts_department_email') ->setFieldLabel('Accounts department email') ->setValidationRules('{required:true, \'validate-email\':true}') ->toHtml(); ?> </div> </div> <!-- Accounts department phone --> <div class="fieldset-section"> <div class="field"> <?= $basicContactBlock->setFieldType('phone') ->setFieldCode('cnc_accounts_department_phone') ->setFieldLabel('Accounts department phone') ->setValidationRules('{required:true, \'validate-phoneStrict\':true}') ->toHtml(); ?> </div> </div> <!-- Technical service phone --> <div class="fieldset-section"> <div class="field"> <?= $basicContactBlock->setFieldType('phone') ->setFieldCode('cnc_technical_service_phone') ->setFieldLabel('Technical service phone') ->setValidationRules('{required:true, \'validate-phoneStrict\':true}') ->toHtml(); ?> </div> </div> </div> </fieldset> </div> <!-- END OF MY CONTACTS SECTION --> <?= $block->getChildHtml('form_additional_info') ?> <div class="actions-toolbar"> <div class="primary"> <button type="submit" class="action save primary" title="<?= $block->escapeHtmlAttr(__('Validate this information')) ?>"> <span><?= $block->escapeHtml(__('Validate this information')) ?></span> </button> </div> <div class="secondary"> <a class="action back" href="<?= $block->escapeUrl($block->getBackUrl()) ?>"> <span><?= $block->escapeHtml(__('Go back')) ?></span> </a> </div> </div> </form> <script> require([ "jquery", "mage/mage" ], function($){ var dataForm = $('#form-validate'); var ignore = <?= /* @noEscape */ $_dob->isEnabled() ? '\'input[id$="full"]\'' : 'null' ?>; dataForm.mage('validation', { <?php if ($_dob->isEnabled()) : ?> errorPlacement: function(error, element) { if (element.prop('id').search('full') !== -1) { var dobElement = $(element).parents('.customer-dob'), errorClass = error.prop('class'); error.insertAfter(element.parent()); dobElement.find('.validate-custom').addClass(errorClass) .after('<div class="' + errorClass + '"></div>'); } else { error.insertAfter(element); } }, ignore: ':hidden:not(' + ignore + ')' <?php else : ?> ignore: ignore ? ':hidden:not(' + ignore + ')' : ':hidden' <?php endif ?> }); }); </script> <script type="text/x-magento-init"> { "[data-role=change-email], [data-role=change-password], [data-role=change-telephone], [data-role=change-vat], [data-role=change-cnc-purchasing-department-email], [data-role=change-cnc-purchasing-department-phone], [data-role=change-cnc-accounts-department-email], [data-role=change-cnc-accounts-department-phone], [data-role=change-cnc-technical-service-phone]": { "changeEmailPassword": { "titleChangeInformations": "<?= $block->escapeJs($block->escapeHtml(__('Change my informations')))?>" } }, "[data-container=new-password]": { "passwordStrengthIndicator": { "formSelector": "form.form-edit-account" } } } </script>