Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ SNIP ]
- <?php
- $this->setShowAddressFields(true);
- if($this->getShowAddressFields()): ?>
- <div class="fieldset">
- <input type="hidden" name="create_address" value="1" />
- <h2 class="legend"><?php echo $this->__('Billing Address Information') ?></h2>
- <ul class="form-list">
- <li class="fields">
- <div class="field" id="businessName">
- <label for="company" class="required"><?php echo $this->__('Business Name') ?> <em>*</em></label>
- <div class="input-box">
- <input type="text" name="company" id="company" value="<?php echo $this->htmlEscape($this->getFormData()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text required-entry" />
- </div>
- </div>
- <div class="field">
- <label for="telephone" class="required"><?php echo $this->__('Telephone') ?> <em>*</em></label>
- <div class="input-box">
- <input type="text" name="telephone" id="telephone" value="<?php echo $this->htmlEscape($this->getFormData()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" />
- </div>
- </div>
- </li>
- <li class="wide">
- <label for="street_1" class="required"><?php echo $this->__('Street Address') ?> <em>*</em></label>
- <div class="input-box" style="clear: both;">
- <input type="text" name="street[]" value="<?php echo $this->htmlEscape($this->getFormData()->getStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text required-entry" />
- </div>
- </li>
- <?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
- <li class="wide">
- <div class="input-box">
- <input type="text" name="street[]" value="<?php echo $this->htmlEscape($this->getFormData()->getStreet($_i)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="street_<?php echo $_i?>" class="input-text" />
- </div>
- </li>
- <?php endfor ?>
- <li class="fields">
- <div class="field">
- <label for="city" class="required"><?php echo $this->__('City') ?> <em>*</em></label>
- <div class="input-box">
- <input type="text" name="city" value="<?php echo $this->htmlEscape($this->getFormData()->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text required-entry" id="city" />
- </div>
- </div>
- <div class="field">
- <label for="region_id" class="required"><?php echo $this->__('State/Province') ?> <em>*</em></label>
- <div class="input-box">
- <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
- <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
- </select>
- <script type="text/javascript">
- //<![CDATA[
- $('region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>");
- //]]>
- </script>
- <input type="text" id="region" name="region" value="<?php echo $this->htmlEscape($this->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
- </div>
- </div>
- </li>
- <li class="fields">
- <div class="field">
- <label for="zip" class="required"><?php echo $this->__('Zip/Postal Code') ?> <em>*</em></label>
- <div class="input-box">
- <input type="text" name="postcode" value="<?php echo $this->htmlEscape($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international required-entry" />
- </div>
- </div>
- <div class="field">
- <label for="country" class="required"><?php echo $this->__('Country') ?> <em>*</em></label>
- <div class="input-box">
- <?php echo $this->getCountryHtmlSelect() ?>
- </div>
- </div>
- </li>
- </ul>
- <input type="hidden" name="default_billing" value="1" />
- <input type="hidden" name="default_shipping" value="1" />
- </div>
- <!-- Shipping address -->
- <div class="fieldset">
- <input type="hidden" name="create_shipping_address" value="0" />
- <h2 class="legend"><?php echo $this->__('Shipping Address Information') ?></h2>
- <div id="shipping_profAddressInstruction">Samples will only be sent to registered clinic addresses.</div>
- <ul class="form-list">
- <li class="fields">
- <div class="field">
- <div class="input-box">
- <label for="shipping_same_as_billing">
- <input id="shipping_same_as_billing" type="checkbox" checked="checked"/>
- <?php echo $this->__('Same as Billing Address') ?>
- </label>
- </div>
- </div>
- </li>
- </ul>
- <div id="shipping_address_fields" style="display: none;">
- <ul class="form-list">
- <li class="fields">
- <div class="field" id="shipping_businessName">
- <label for="shipping_company" class="required"><?php echo $this->__('Business Name') ?> <em>*</em></label>
- <div class="input-box">
- <input type="text" name="shipping_company" id="shipping_company" value="<?php echo $this->htmlEscape($this->getFormData()->getShippingCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text required-entry" />
- </div>
- </div>
- <div class="field">
- <label for="shipping_telephone" class="required"><?php echo $this->__('Telephone') ?> <em>*</em></label>
- <div class="input-box">
- <input type="text" name="shipping_telephone" id="shipping_telephone" value="<?php echo $this->htmlEscape($this->getFormData()->getShippingTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" />
- </div>
- </div>
- </li>
- <li class="wide">
- <label for="shipping_street_1" class="required"><?php echo $this->__('Street Address') ?> <em>*</em></label>
- <div class="input-box" style="clear: both;">
- <input type="text" name="shipping_street[]" value="<?php echo $this->htmlEscape($this->getFormData()->getShippingStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="shipping_street_1" class="input-text required-entry" />
- </div>
- </li>
- <?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
- <li class="wide">
- <div class="input-box">
- <input type="text" name="shipping_street[]" value="<?php echo $this->htmlEscape($this->getFormData()->getShippingStreet($_i)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="shipping_street_<?php echo $_i?>" class="input-text" />
- </div>
- </li>
- <?php endfor ?>
- <li class="fields">
- <div class="field">
- <label for="shipping_city" class="required"><?php echo $this->__('City') ?> <em>*</em></label>
- <div class="input-box">
- <input type="text" name="shipping_city" value="<?php echo $this->htmlEscape($this->getFormData()->getShippingCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text required-entry" id="shipping_city" />
- </div>
- </div>
- <div class="field">
- <label for="shipping_region_id" class="required"><?php echo $this->__('State/Province') ?> <em>*</em></label>
- <div class="input-box">
- <select id="shipping_region_id" name="shipping_region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
- <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
- </select>
- <script type="text/javascript">
- //<![CDATA[
- $('shipping_region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getShippingRegionId() ?>");
- //]]>
- </script>
- <input type="text" id="shipping_region" name="shipping_region" value="<?php echo $this->htmlEscape($this->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
- </div>
- </div>
- </li>
- <li class="fields">
- <div class="field">
- <label for="shipping_zip" class="required"><?php echo $this->__('Zip/Postal Code') ?> <em>*</em></label>
- <div class="input-box">
- <input type="text" name="shipping_postcode" value="<?php echo $this->htmlEscape($this->getFormData()->getShippingPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="shipping_zip" class="input-text validate-zip-international required-entry" />
- </div>
- </div>
- <div class="field">
- <label for="shipping_country" class="required"><?php echo $this->__('Country') ?> <em>*</em></label>
- <div class="input-box">
- <?php echo $this->getCountryHtmlSelect(null, 'shipping_country_id', 'shipping_country_id') ?>
- </div>
- </div>
- </li>
- </ul>
- <input type="hidden" name="shipping_default_billing" value="0" />
- <input type="hidden" name="shipping_default_shipping" value="1" />
- </div>
- </div>
- <?php endif; ?>
- <div class="fieldset last">
- <h2 class="legend"><?php echo $this->__('Login Information') ?></h2>
- <ul class="form-list">
- <li class="fields">
- <div class="field">
- <label for="password" class="required"><?php echo $this->__('Password') ?> <em>*</em></label>
- <div class="input-box">
- <input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
- </div>
- </div>
- <div class="field">
- <label for="confirmation" class="required"><?php echo $this->__('Confirm Password') ?> <em>*</em></label>
- <div class="input-box">
- <input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" />
- </div>
- </div>
- </li>
- </ul>
- </div>
- <input type="hidden" name="amcustomerattr[sample_selection]" value="0" id="sample_selection" />
- <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()) ?>" class="back-link"><small>« </small><?php echo $this->__('Back') ?></a></p>
- <button type="submit" title="<?php echo $this->__('Submit') ?>"></button>
- </div>
- </form>
- </div>
- <script type="text/javascript">
- //<![CDATA[
- var dataForm = new VarienForm('form-validate', true);
- <?php if($this->getShowAddressFields()): ?>
- new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
- new RegionUpdater('country', 'shipping_region', 'shipping_region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
- <?php endif; ?>
- (function($) {
- $('#shipping_same_as_billing').change(function() {
- if ( $(this).is(':checked') ) {
- $('#shipping_address_fields').hide();
- $('input[name=create_shipping_address]').val('0');
- $('input[name=default_shipping]' ).val('1');
- } else {
- $('#shipping_address_fields').show();
- $('input[name=create_shipping_address]').val('1');
- $('input[name=default_shipping]' ).val('0');
- }
- });
- }(jQuery));
- //]]>
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement