Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="page-title">
- <h1><?php echo $this->__('Edit Account Information') ?></h1>
- </div>
- <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
- <form action="<?php echo $this->getUrl('customer/account/editPost') ?>" method="post" id="form-validate" autocomplete="off">
- <div class="fieldset">
- <?php
- $attribute = Mage::getModel('eav/config')->getAttribute('customer', 'tipopessoa');
- $_tipopessoaLabel = $attribute->getSource()->getOptionText($this->getCustomer()->getTipopessoa());
- ?>
- <?php echo $this->getBlockHtml('formkey') ?>
- <h2 class="legend"><?php echo $this->__('Account Information') ?></h2>
- <ul class="form-list">
- <?php $_tipopessoa = $this->getLayout()->createBlock('onestepcheckout/widget_tipopessoa') ?>
- <?php if ($_tipopessoa->isEnabled()): ?>
- <li class="wide hide">
- <?php echo $_tipopessoa->setTipopessoa($this->getCustomer()->getTipopessoa())->setFieldParams('disabled')->toHtml() ?>
- </li>
- <?php endif ?>
- <li class="fields">
- <?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getCustomer())->toHtml() ?>
- </li>
- <li>
- <label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
- <div class="input-box">
- <input type="text" name="email" id="email" readonly="" value="<?php echo $this->escapeHtml($this->getCustomer()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text required-entry validate-email" />
- </div>
- </li>
- <li class="control">
- <input type="checkbox" name="change_password" id="change_password" value="1" onclick="setPasswordForm(this.checked)" title="<?php echo $this->__('Change Password') ?>"<?php if ($this->getCustomer()->getChangePassword() == 1): ?> checked="checked"<?php endif; ?> class="checkbox" /><label for="change_password"><?php echo $this->__('Change Password') ?></label>
- </li>
- </ul>
- </div>
- <div class="fieldset" style="display:none;">
- <h2 class="legend"><?php echo $this->__('Change Password') ?></h2>
- <ul class="form-list">
- <li>
- <label for="current_password" class="required"><em>*</em><?php echo $this->__('Current Password') ?></label>
- <div class="input-box">
- <!-- Este é um campo fictÃcio escondido para enganar o Firefox no auto preenchimento de senha -->
- <input type="text" class="input-text no-display" name="dummy" id="dummy" />
- <input type="password" title="<?php echo $this->__('Current Password') ?>" class="input-text" name="current_password" id="current_password" />
- </div>
- </li>
- <li class="fields">
- <div class="field">
- <label for="password" class="required"><em>*</em><?php echo $this->__('New Password') ?></label>
- <div class="input-box">
- <input type="password" title="<?php echo $this->__('New Password') ?>" class="input-text validate-password" name="password" id="password" />
- </div>
- </div>
- <div class="field">
- <label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm New Password') ?></label>
- <div class="input-box">
- <input type="password" title="<?php echo $this->__('Confirm New Password') ?>" class="input-text validate-cpassword" name="confirmation" id="confirmation" />
- </div>
- </div>
- </li>
- </ul>
- </div>
- <div class="fieldset">
- <h2 class="legend"><?php echo $this->__('Personal Information') ?></h2>
- <ul class="form-list">
- <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
- <?php if ($_taxvat->isEnabled()): ?>
- <li><?php echo $_taxvat->setTaxvat($this->getCustomer()->getTaxvat())->toHtml() ?></li>
- <?php endif ?>
- <li class="wide">
- <?php $_ie = $this->getLayout()->createBlock('onestepcheckout/widget_ie') ?>
- <?php if ($_ie->isEnabled()): ?>
- <?php echo $_ie->setIe($this->getCustomer()->getIe())->toHtml() ?>
- <?php endif ?>
- </li>
- <li>
- <ul id="tipopessoa-area" style="overflow: hidden;display:block;">
- <li class="fields">
- <div class="field">
- <?php $_dob = $this->getLayout()->createBlock('onestepcheckout/widget_dob') ?>
- <?php if ($_dob->isEnabled()): ?>
- <?php echo $_dob->setDate($this->getCustomer()->getDob())->toHtml() ?>
- <?php endif ?>
- </div>
- <div class="field">
- <?php $_gender = $this->getLayout()->createBlock('onestepcheckout/widget_gender') ?>
- <?php if ($_gender->isEnabled()): ?>
- <?php echo $_gender->setGender($this->getCustomer()->getGender())->toHtml() ?>
- <?php endif ?>
- </div>
- </li>
- </ul>
- </li>
- </ul>
- </div>
- <div class="buttons-set">
- <p class="required"><?php echo $this->__('* Required Fields') ?></p>
- <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><small>« </small><?php echo $this->__('Back') ?></a></p>
- <button type="submit" title="<?php echo $this->__('Save') ?>" class="button"><span><span><?php echo $this->__('Save') ?></span></span></button>
- </div>
- </form>
- <script type="text/javascript">
- //<![CDATA[
- var dataForm = new VarienForm('form-validate', true);
- dataForm.submit = function(button, url) {
- if (this.validator.validate()) {
- if (button && button != 'undefined') {
- button.disabled = true;
- }
- }
- }.bind(dataForm);
- setTipopessoaArea('<?php echo $_tipopessoaLabel ?>');
- function setTipopessoaArea(arg) {
- if (arg == 'JurÃdica') {
- if ($('taxvat')) {
- $('taxvat').maxLength = 18;
- $('ie').maxLength = 30;
- $$('label[for="ie"]').first().update('<em>*</em>IE (Inscrição Estadual)');
- $$('label[for="taxvat"]').first().update('<em>*</em>CNPJ');
- $$('label[for="firstname"]').first().update('<em>*</em>Razão social');
- $$('label[for="lastname"]').first().update('<em>*</em>N. Fantasia');
- $$('input[name="taxvat"]').first().writeAttribute('title','CNPJ');
- $$('input[name="ie"]').first().writeAttribute('title','IE (Inscrição Estadual)');
- $$('input[name="firstname"]').first().writeAttribute('title','Razão social');
- $$('input[name="lastname"]').first().writeAttribute('title','N. Fantasia');
- $('tipopessoa-area').hide();
- }
- } else {
- if ($('taxvat')) {
- $('taxvat').maxLength = 14;
- $('ie').maxLength = 30;
- $$('label[for="taxvat"]').first().update('<em>*</em>CPF');
- $$('label[for="ie"]').first().update('<em>*</em>RG');
- $$('label[for="firstname"]').first().update('<em>*</em>Nome');
- $$('label[for="lastname"]').first().update('<em>*</em>Sobrenome');
- $$('input[name="taxvat"]').first().writeAttribute('title','CPF');
- $$('input[name="ie"]').first().writeAttribute('title','RG');
- $$('input[name="firstname"]').first().writeAttribute('title','Nome');
- $$('input[name="lastname"]').first().writeAttribute('title','Sobrenome');
- $('tipopessoa-area').show();
- }
- }
- }
- function setPasswordForm(arg) {
- if (arg) {
- $('current_password').up(3).show();
- $('current_password').addClassName('required-entry');
- $('password').addClassName('required-entry');
- $('confirmation').addClassName('required-entry');
- } else {
- $('current_password').up(3).hide();
- $('current_password').removeClassName('required-entry');
- $('password').removeClassName('required-entry');
- $('confirmation').removeClassName('required-entry');
- }
- }
- if ($('taxvat')) {
- $('taxvat').addClassName('validate-taxvat');
- $('taxvat').observe('keyup', function(event) {
- mascara(this, mdocumento);
- });
- }
- <?php if ($this->getCustomer()->getChangePassword()): ?>
- setPasswordForm(true);
- <?php endif; ?>
- //]]>
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement