Advertisement
Guest User

Untitled

a guest
Jan 7th, 2011
2,335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.33 KB | None | 0 0
  1. <?php
  2. /**
  3. * Magento
  4. *
  5. * NOTICE OF LICENSE
  6. *
  7. * This source file is subject to the Academic Free License (AFL 3.0)
  8. * that is bundled with this package in the file LICENSE_AFL.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://opensource.org/licenses/afl-3.0.php
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@magentocommerce.com so we can send you a copy immediately.
  14. *
  15. * DISCLAIMER
  16. *
  17. * Do not edit or add to this file if you wish to upgrade Magento to newer
  18. * versions in the future. If you wish to customize Magento for your
  19. * needs please refer to http://www.magentocommerce.com for more information.
  20. *
  21. * @category design
  22. * @package base_default
  23. * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
  24. * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
  25. */
  26. ?>
  27. <?php
  28. /**
  29. * Create account form template
  30. *
  31. * @see Mage_Customer_Block_Form_Register
  32. */
  33. ?>
  34.  
  35. //div with login form copied this code from login.phtml.
  36.  
  37. <div class="account-login">
  38. <div class="page-title">
  39. <h1><?php echo $this->__('Login or Create an Account') ?></h1>
  40. </div>
  41. <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
  42. <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="login-form">
  43. <div class="col2-set">
  44.  
  45.  
  46. <div class="content">
  47. <h2><?php echo $this->__('Registered Customers') ?></h2>
  48. <p><?php echo $this->__('If you have an account with us, please log in.') ?></p>
  49. <ul class="form-list">
  50. <li>
  51. <label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
  52. <div class="input-box">
  53. <input type="text" name="login[username]" value="<?php echo $this->htmlEscape($this->getUsername()) ?>" id="email" class="input-text required-entry validate-email" title="<?php echo $this->__('Email Address') ?>" />
  54. </div>
  55. </li>
  56. <li>
  57. <label for="pass" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
  58. <div class="input-box">
  59. <input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" />
  60. </div>
  61. </li>
  62. </ul>
  63. <p class="required"><?php echo $this->__('* Required Fields') ?></p>
  64. </div>
  65. </div>
  66.  
  67. <div class="col2-set">
  68.  
  69. <div class="col-2 registered-users">
  70. <div class="buttons-set">
  71. <a href="<?php echo $this->getForgotPasswordUrl() ?>" class="f-left"><?php echo $this->__('Forgot Your Password?') ?></a>
  72. <button type="submit" class="button" title="<?php echo $this->__('Login') ?>" name="send" id="send2"><span><span><?php echo $this->__('Login') ?></span></span></button>
  73. </div>
  74. </div>
  75. </div>
  76. </form>
  77. <script type="text/javascript">
  78. //<![CDATA[
  79. var dataForm = new VarienForm('login-form', true);
  80. //]]>
  81. </script>
  82. </div>
  83.  
  84.  
  85.  
  86. // div for create account this was already here in register.phtml
  87.  
  88. <div class="account-create">
  89. <div class="page-title">
  90. <h1><?php echo $this->__('Create an Account') ?></h1>
  91. </div>
  92. <?php echo $this->getChildHtml('form_fields_before')?>
  93. <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
  94. <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate">
  95. <div class="fieldset">
  96. <input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
  97. <input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
  98. <h2 class="legend"><?php echo $this->__('Personal Information') ?></h2>
  99. <ul class="form-list">
  100. <li class="fields">
  101. <?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->toHtml() ?>
  102. </li>
  103. <li>
  104. <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
  105. <div class="input-box">
  106. <input type="text" name="email" id="email_address" value="<?php echo $this->htmlEscape($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
  107. </div>
  108. </li>
  109. <?php if ($this->isNewsletterEnabled()): ?>
  110. <li class="control">
  111. <div class="input-box">
  112. <input type="checkbox" name="is_subscribed" title="<?php echo $this->__('Sign Up for Newsletter') ?>" value="1" id="is_subscribed"<?php if($this->getFormData()->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox" />
  113. </div>
  114. <label for="is_subscribed"><?php echo $this->__('Sign Up for Newsletter') ?></label>
  115. </li>
  116. <?php endif ?>
  117. <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
  118. <?php if ($_dob->isEnabled()): ?>
  119. <li><?php echo $_dob->setDate($this->getFormData()->getDob())->toHtml() ?></li>
  120. <?php endif ?>
  121. <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
  122. <?php if ($_taxvat->isEnabled()): ?>
  123. <li><?php echo $_taxvat->setTaxvat($this->getFormData()->getTaxvat())->toHtml() ?></li>
  124. <?php endif ?>
  125. <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
  126. <?php if ($_gender->isEnabled()): ?>
  127. <li><?php echo $_gender->setGender($this->getFormData()->getGender())->toHtml() ?></li>
  128. <?php endif ?>
  129. </ul>
  130. </div>
  131. <?php if($this->getShowAddressFields()): ?>
  132. <div class="fieldset">
  133. <input type="hidden" name="create_address" value="1" />
  134. <h2 class="legend"><?php echo $this->__('Address Information') ?></h2>
  135. <ul class="form-list">
  136. <li class="fields">
  137. <div class="field">
  138. <label for="company"><?php echo $this->__('Company') ?></label>
  139. <div class="input-box">
  140. <input type="text" name="company" id="company" value="<?php echo $this->htmlEscape($this->getFormData()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text" />
  141. </div>
  142. </div>
  143. <div class="field">
  144. <label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
  145. <div class="input-box">
  146. <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" />
  147. </div>
  148. </div>
  149. </li>
  150. <li class="wide">
  151. <label for="street_1" class="required"><em>*</em><?php echo $this->__('Street Address') ?></label>
  152. <div class="input-box">
  153. <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" />
  154. </div>
  155. </li>
  156. <?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
  157. <li class="wide">
  158. <div class="input-box">
  159. <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" />
  160. </div>
  161. </li>
  162. <?php endfor ?>
  163. <li class="fields">
  164. <div class="field">
  165. <label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
  166. <div class="input-box">
  167. <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" />
  168. </div>
  169. </div>
  170. <div class="field">
  171. <label for="region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
  172. <div class="input-box">
  173. <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
  174. <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
  175. </select>
  176. <script type="text/javascript">
  177. //<![CDATA[
  178. $('region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>");
  179. //]]>
  180. </script>
  181. <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;" />
  182. </div>
  183. </div>
  184. </li>
  185. <li class="fields">
  186. <div class="field">
  187. <label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
  188. <div class="input-box">
  189. <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" />
  190. </div>
  191. </div>
  192. <div class="field">
  193. <label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
  194. <div class="input-box">
  195. <?php echo $this->getCountryHtmlSelect() ?>
  196. </div>
  197. </div>
  198. </li>
  199. </ul>
  200. <input type="hidden" name="default_billing" value="1" />
  201. <input type="hidden" name="default_shipping" value="1" />
  202. </div>
  203. <?php endif; ?>
  204. <div class="fieldset">
  205. <h2 class="legend"><?php echo $this->__('Login Information') ?></h2>
  206. <ul class="form-list">
  207. <li class="fields">
  208. <div class="field">
  209. <label for="password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
  210. <div class="input-box">
  211. <input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
  212. </div>
  213. </div>
  214. <div class="field">
  215. <label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
  216. <div class="input-box">
  217. <input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" />
  218. </div>
  219. </div>
  220. </li>
  221. </ul>
  222. </div>
  223. <div class="buttons-set">
  224. <p class="required"><?php echo $this->__('* Required Fields') ?></p>
  225. <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>" class="back-link"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
  226. <button type="submit" title="<?php echo $this->__('Submit') ?>" class="button"><span><span><?php echo $this->__('Submit') ?></span></span></button>
  227. </div>
  228. </form>
  229. <script type="text/javascript">
  230. //<![CDATA[
  231. var dataForm = new VarienForm('form-validate', true);
  232. <?php if($this->getShowAddressFields()): ?>
  233. new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
  234. <?php endif; ?>
  235. //]]>
  236. </script>
  237. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement