Skip to content

Commit

Permalink
Merge pull request #11 from experius/required-entry
Browse files Browse the repository at this point in the history
Required entry
  • Loading branch information
Derrick Heesbeen authored Jul 4, 2017
2 parents e5e2c69 + 5d94f4d commit a9250ec
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions view/frontend/templates/experius/customer/form/register.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,20 @@
<legend class="legend"><span><?php /* @escapeNotVerified */ echo __('Address Information') ?></span></legend><br>
<input type="hidden" name="create_address" value="1" />
<?php if ($this->helper('Experius\AddressLines\Helper\Data')->isUsedInForm('company')): ?>
<div class="field company">
<?php $attributeValidationClass = $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('company'); ?>
<div class="field company<?php echo (strpos($attributeValidationClass, 'required-entry')) ? ' required' : '' ?>">
<label for="company" class="label"><span><?php /* @escapeNotVerified */ echo __('Company') ?></span></label>
<div class="control">
<input type="text" name="company" id="company" value="<?php echo $block->escapeHtml($block->getFormData()->getCompany()) ?>" title="<?php /* @escapeNotVerified */ echo __('Company') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('company') ?>">
<input type="text" name="company" id="company" value="<?php echo $block->escapeHtml($block->getFormData()->getCompany()) ?>" title="<?php /* @escapeNotVerified */ echo __('Company') ?>" class="input-text <?php /* @escapeNotVerified */ echo $attributeValidationClass ?>">
</div>
</div>
<?php endif; ?>
<?php if ($this->helper('Experius\AddressLines\Helper\Data')->isUsedInForm('telephone')): ?>
<div class="field telephone">
<?php $attributeValidationClass = $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('telephone'); ?>
<div class="field telephone<?php echo (strpos($attributeValidationClass, 'required-entry')) ? ' required' : '' ?>">
<label for="telephone" class="label"><span><?php /* @escapeNotVerified */ echo __('Phone Number') ?></span></label>
<div class="control">
<input type="text" name="telephone" id="telephone" value="<?php echo $block->escapeHtml($block->getFormData()->getTelephone()) ?>" title="<?php /* @escapeNotVerified */ echo __('Phone Number') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('telephone') ?>">
<input type="text" name="telephone" id="telephone" value="<?php echo $block->escapeHtml($block->getFormData()->getTelephone()) ?>" title="<?php /* @escapeNotVerified */ echo __('Phone Number') ?>" class="input-text <?php /* @escapeNotVerified */ echo $attributeValidationClass ?>">
</div>
</div>
<?php endif; ?>
Expand Down

0 comments on commit a9250ec

Please sign in to comment.