Advertisement
Guest User

Untitled

a guest
Feb 7th, 2012
1,522
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 12.74 KB | None | 0 0
  1. [ SNIP ]
  2.    
  3.     <?php
  4.     $this->setShowAddressFields(true);
  5.     if($this->getShowAddressFields()): ?>
  6.         <div class="fieldset">
  7.             <input type="hidden" name="create_address" value="1" />
  8.             <h2 class="legend"><?php echo $this->__('Billing Address Information') ?></h2>
  9.             <ul class="form-list">
  10.                 <li class="fields">
  11.                     <div class="field" id="businessName">
  12.                         <label for="company" class="required"><?php echo $this->__('Business Name') ?> <em>*</em></label>
  13.                         <div class="input-box">
  14.                             <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" />
  15.                         </div>
  16.                     </div>
  17.                     <div class="field">
  18.                         <label for="telephone" class="required"><?php echo $this->__('Telephone') ?> <em>*</em></label>
  19.                         <div class="input-box">
  20.                             <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" />
  21.                         </div>
  22.                     </div>
  23.                 </li>
  24.                 <li class="wide">
  25.                     <label for="street_1" class="required"><?php echo $this->__('Street Address') ?> <em>*</em></label>
  26.                     <div class="input-box" style="clear: both;">
  27.                         <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" />
  28.                     </div>
  29.                 </li>
  30.             <?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
  31.                 <li class="wide">
  32.                     <div class="input-box">
  33.                         <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" />
  34.                     </div>
  35.                 </li>
  36.             <?php endfor ?>
  37.                 <li class="fields">
  38.                     <div class="field">
  39.                         <label for="city" class="required"><?php echo $this->__('City') ?> <em>*</em></label>
  40.                         <div class="input-box">
  41.                             <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" />
  42.                         </div>
  43.                     </div>
  44.                     <div class="field">
  45.                         <label for="region_id" class="required"><?php echo $this->__('State/Province') ?> <em>*</em></label>
  46.                         <div class="input-box">
  47.                             <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
  48.                                 <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
  49.                             </select>
  50.                             <script type="text/javascript">
  51.                             //<![CDATA[
  52.                                $('region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>");
  53.                            //]]>
  54.                             </script>
  55.                             <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;" />
  56.                         </div>
  57.                     </div>
  58.                 </li>
  59.                 <li class="fields">
  60.                     <div class="field">
  61.                         <label for="zip" class="required"><?php echo $this->__('Zip/Postal Code') ?> <em>*</em></label>
  62.                         <div class="input-box">
  63.                             <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" />
  64.                         </div>
  65.                     </div>
  66.                     <div class="field">
  67.                         <label for="country" class="required"><?php echo $this->__('Country') ?> <em>*</em></label>
  68.                         <div class="input-box">
  69.                             <?php echo $this->getCountryHtmlSelect() ?>
  70.                         </div>
  71.                     </div>
  72.                 </li>
  73.             </ul>
  74.             <input type="hidden" name="default_billing" value="1" />
  75.             <input type="hidden" name="default_shipping" value="1" />
  76.         </div>
  77.  
  78.         <!-- Shipping address -->
  79.  
  80.         <div class="fieldset">
  81.             <input type="hidden" name="create_shipping_address" value="0" />
  82.             <h2 class="legend"><?php echo $this->__('Shipping Address Information') ?></h2>
  83.  
  84.             <div id="shipping_profAddressInstruction">Samples will only be sent to registered clinic addresses.</div>
  85.  
  86.             <ul class="form-list">
  87.                 <li class="fields">
  88.                     <div class="field">
  89.                         <div class="input-box">
  90.                             <label for="shipping_same_as_billing">
  91.                                 <input id="shipping_same_as_billing" type="checkbox" checked="checked"/>
  92.  
  93.                                 <?php echo $this->__('Same as Billing Address') ?>
  94.                             </label>
  95.                         </div>
  96.                     </div>
  97.                 </li>
  98.             </ul>
  99.  
  100.             <div id="shipping_address_fields" style="display: none;">
  101.                 <ul class="form-list">
  102.                     <li class="fields">
  103.                         <div class="field" id="shipping_businessName">
  104.                             <label for="shipping_company" class="required"><?php echo $this->__('Business Name') ?> <em>*</em></label>
  105.                             <div class="input-box">
  106.                                 <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" />
  107.                             </div>
  108.                         </div>
  109.                         <div class="field">
  110.                             <label for="shipping_telephone" class="required"><?php echo $this->__('Telephone') ?> <em>*</em></label>
  111.                             <div class="input-box">
  112.                                 <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" />
  113.                             </div>
  114.                         </div>
  115.                     </li>
  116.                     <li class="wide">
  117.                         <label for="shipping_street_1" class="required"><?php echo $this->__('Street Address') ?> <em>*</em></label>
  118.                         <div class="input-box" style="clear: both;">
  119.                             <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" />
  120.                         </div>
  121.                     </li>
  122.                 <?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
  123.                     <li class="wide">
  124.                         <div class="input-box">
  125.                             <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" />
  126.                         </div>
  127.                     </li>
  128.                 <?php endfor ?>
  129.                     <li class="fields">
  130.                         <div class="field">
  131.                             <label for="shipping_city" class="required"><?php echo $this->__('City') ?> <em>*</em></label>
  132.                             <div class="input-box">
  133.                                 <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" />
  134.                             </div>
  135.                         </div>
  136.                         <div class="field">
  137.                             <label for="shipping_region_id" class="required"><?php echo $this->__('State/Province') ?> <em>*</em></label>
  138.                             <div class="input-box">
  139.                                 <select id="shipping_region_id" name="shipping_region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
  140.                                     <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
  141.                                 </select>
  142.                                 <script type="text/javascript">
  143.                                 //<![CDATA[
  144.                                     $('shipping_region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getShippingRegionId() ?>");
  145.                                 //]]>
  146.                                 </script>
  147.                                 <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;" />
  148.                             </div>
  149.                         </div>
  150.                     </li>
  151.                     <li class="fields">
  152.                         <div class="field">
  153.                             <label for="shipping_zip" class="required"><?php echo $this->__('Zip/Postal Code') ?> <em>*</em></label>
  154.                             <div class="input-box">
  155.                                 <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" />
  156.                             </div>
  157.                         </div>
  158.                         <div class="field">
  159.                             <label for="shipping_country" class="required"><?php echo $this->__('Country') ?> <em>*</em></label>
  160.                             <div class="input-box">
  161.                                 <?php echo $this->getCountryHtmlSelect(null, 'shipping_country_id', 'shipping_country_id') ?>
  162.                             </div>
  163.                         </div>
  164.                     </li>
  165.                 </ul>
  166.                 <input type="hidden" name="shipping_default_billing"  value="0" />
  167.                 <input type="hidden" name="shipping_default_shipping" value="1" />
  168.             </div>
  169.         </div>
  170.     <?php endif; ?>
  171.         <div class="fieldset last">
  172.             <h2 class="legend"><?php echo $this->__('Login Information') ?></h2>
  173.             <ul class="form-list">
  174.                 <li class="fields">
  175.                     <div class="field">
  176.                         <label for="password" class="required"><?php echo $this->__('Password') ?> <em>*</em></label>
  177.                         <div class="input-box">
  178.                             <input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
  179.                         </div>
  180.                     </div>
  181.                     <div class="field">
  182.                         <label for="confirmation" class="required"><?php echo $this->__('Confirm Password') ?> <em>*</em></label>
  183.                         <div class="input-box">
  184.                             <input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" />
  185.                         </div>
  186.                     </div>
  187.                 </li>
  188.             </ul>
  189.         </div>
  190.         <input type="hidden" name="amcustomerattr[sample_selection]" value="0" id="sample_selection" />
  191.         <div class="buttons-set">
  192.             <p class="required"><?php echo $this->__('* Required Fields') ?></p>
  193.             <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>" class="back-link"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
  194.             <button type="submit" title="<?php echo $this->__('Submit') ?>"></button>
  195.         </div>
  196.     </form>
  197.     </div>
  198.     <script type="text/javascript">
  199.     //<![CDATA[
  200.        var dataForm = new VarienForm('form-validate', true);
  201.        <?php if($this->getShowAddressFields()): ?>
  202.        new RegionUpdater('country',          'region',          'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
  203.        new RegionUpdater('country', 'shipping_region', 'shipping_region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
  204.        <?php endif; ?>
  205.  
  206.         (function($) {
  207.             $('#shipping_same_as_billing').change(function() {
  208.                 if ( $(this).is(':checked') ) {
  209.                     $('#shipping_address_fields').hide();
  210.  
  211.                     $('input[name=create_shipping_address]').val('0');
  212.                     $('input[name=default_shipping]'       ).val('1');
  213.                 } else {
  214.                     $('#shipping_address_fields').show();
  215.                    
  216.                     $('input[name=create_shipping_address]').val('1');
  217.                     $('input[name=default_shipping]'       ).val('0');
  218.                 }
  219.             });
  220.         }(jQuery));
  221.    //]]>
  222.     </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement