Diglin_Username - Version 1.5.0

Version Notes

- Version 1.5.0: update for Magento 1.7
- Version 1.4.0: fix a problem to enable and disable a customer account from Customer Management in backend
- Version 1.3.0: new features. Configurable options: display username in Manage Customer Grid, allow customer to edit or not username in frontend My Account, define maximum and minimum length of username for the forms, define what kind of validation desired (letters, digits, both or both " _-)
- Version 1.2.1: fix customer account layout
- Version 1.2.0: fix problem with case sensitive OS, limit the number of characters possible (now it's between 6 and 30 letters), allow only some characters, try to provide compatibility update for users who had the old Jfusion_Username module, generate a username for old customers who don't have it, based on email address and a random id, improve the german translation, tested on 1.6.2 and 1.5.1
- Version 1.1.0: change the module name from Jfusion_Customer to Diglin_Username, fix bugs with checkout frontend and backend and with old customers
- Version 1.0.2 - fix a bug with the installation
- Version 1.0.1 - fix bug in sql query during installation on prefixed tables, add german translation, do package for Magento version prior to 1.5 and version 1.5.x
- Version 1.0.0 - stable version

Download this release

Release Info

Developer Magento Core Team
Extension Diglin_Username
Version 1.5.0
Comparing to
See all releases


Code changes from version 1.4.0 to 1.5.0

app/code/community/Diglin/Username/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Diglin_Username>
5
- <version>1.4.0</version>
6
  </Diglin_Username>
7
  </modules>
8
  <default>
@@ -16,11 +16,11 @@
16
  </general>
17
  </username>
18
  </default>
19
-
20
  <global>
21
  <fieldsets>
22
  <customer_account>
23
- <username><create>1</create><update>1</update><to_order>customer_username</to_order><to_quote>customer_username</to_quote></username>
24
  </customer_account>
25
  <checkout_onepage_billing>
26
  <username><to_customer>*</to_customer></username>
@@ -44,7 +44,7 @@
44
  <class>Diglin_Username_Helper</class>
45
  </username>
46
  </helpers>
47
-
48
  <blocks>
49
  <username>
50
  <class>Diglin_Username_Block</class>
@@ -54,7 +54,7 @@
54
  <customer_grid>Diglin_Username_Block_Overwrite_Adminhtml_Grid</customer_grid>
55
  </rewrite>
56
  </adminhtml>
57
- </blocks>
58
  <models>
59
  <username>
60
  <class>Diglin_Username_Model</class>
@@ -78,7 +78,7 @@
78
  </rewrite>
79
  </customer_resource>
80
  </models>
81
-
82
  <resources>
83
  <username_setup>
84
  <setup>
@@ -90,7 +90,7 @@
90
  </connection>
91
  </username_setup>
92
  </resources>
93
-
94
  <events>
95
  <customer_customer_authenticated>
96
  <observers>
@@ -103,7 +103,7 @@
103
  </customer_customer_authenticated>
104
  </events>
105
  </global>
106
-
107
  <frontend>
108
  <translate>
109
  <modules>
@@ -122,7 +122,7 @@
122
  </updates>
123
  </layout>
124
  </frontend>
125
-
126
  <adminhtml>
127
  <events>
128
  <admin_system_config_changed_section_username>
2
  <config>
3
  <modules>
4
  <Diglin_Username>
5
+ <version>1.5.0</version>
6
  </Diglin_Username>
7
  </modules>
8
  <default>
16
  </general>
17
  </username>
18
  </default>
19
+
20
  <global>
21
  <fieldsets>
22
  <customer_account>
23
+ <username><create>1</create><update>1</update><to_order>customer_username</to_order><to_quote>customer_username</to_quote></username>
24
  </customer_account>
25
  <checkout_onepage_billing>
26
  <username><to_customer>*</to_customer></username>
44
  <class>Diglin_Username_Helper</class>
45
  </username>
46
  </helpers>
47
+
48
  <blocks>
49
  <username>
50
  <class>Diglin_Username_Block</class>
54
  <customer_grid>Diglin_Username_Block_Overwrite_Adminhtml_Grid</customer_grid>
55
  </rewrite>
56
  </adminhtml>
57
+ </blocks>
58
  <models>
59
  <username>
60
  <class>Diglin_Username_Model</class>
78
  </rewrite>
79
  </customer_resource>
80
  </models>
81
+
82
  <resources>
83
  <username_setup>
84
  <setup>
90
  </connection>
91
  </username_setup>
92
  </resources>
93
+
94
  <events>
95
  <customer_customer_authenticated>
96
  <observers>
103
  </customer_customer_authenticated>
104
  </events>
105
  </global>
106
+
107
  <frontend>
108
  <translate>
109
  <modules>
122
  </updates>
123
  </layout>
124
  </frontend>
125
+
126
  <adminhtml>
127
  <events>
128
  <admin_system_config_changed_section_username>
app/design/frontend/default/default/template/username/checkout/.DS_Store ADDED
Binary file
app/design/frontend/default/default/template/username/checkout/onepage/billing.phtml CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
  /**
3
- * Diglin
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
  * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-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.
@@ -20,10 +20,12 @@
20
  *
21
  * @category Diglin
22
  * @package Diglin_Username
23
- * @copyright Copyright (c) 2011 Diglin (http://www.diglin.com)
24
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
- ?>
 
 
27
  <form id="co-billing-form" action="">
28
  <fieldset>
29
  <ul class="form-list">
@@ -44,24 +46,24 @@
44
  <div class="field">
45
  <label for="billing:company"><?php echo $this->__('Company') ?></label>
46
  <div class="input-box">
47
- <input type="text" id="billing:company" name="billing[company]" value="<?php echo $this->htmlEscape($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text" />
48
  </div>
49
  </div>
50
  <?php if(!$this->isCustomerLoggedIn()): ?>
51
  <div class="field">
52
  <label for="billing:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
53
  <div class="input-box">
54
- <input type="text" name="billing[email]" id="billing:email" value="<?php echo $this->htmlEscape($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
55
  </div>
56
  </div>
57
  <?php endif ?>
58
  </li>
59
- <?php if(!$this->isCustomerLoggedIn()): ?>
60
  <li class="fields">
61
  <div class="field">
62
  <label for="billing:username" class="required"><em>*</em><?php echo $this->__('Username') ?></label>
63
  <div class="input-box">
64
- <input type="text" name="billing[username]" id="billing:username" value="<?php echo $this->htmlEscape($this->getAddress()->getUsername()) ?>" title="<?php echo $this->__('Username') ?>" class="input-text required-entry" />
65
  </div>
66
  </div>
67
  <?php endif ?>
@@ -69,13 +71,13 @@
69
  <li class="wide">
70
  <label for="billing:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
71
  <div class="input-box">
72
- <input type="text" title="<?php echo $this->__('Street Address') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet(1)) ?>" class="input-text required-entry" />
73
  </div>
74
  </li>
75
  <?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
76
  <li class="wide">
77
  <div class="input-box">
78
- <input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i?>" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet($_i)) ?>" class="input-text" />
79
  </div>
80
  </li>
81
  <?php endfor ?>
@@ -83,7 +85,7 @@
83
  <div class="field">
84
  <label for="billing:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
85
  <div class="input-box">
86
- <input type="text" title="<?php echo $this->__('City') ?>" name="billing[city]" value="<?php echo $this->htmlEscape($this->getAddress()->getCity()) ?>" class="input-text required-entry" id="billing:city" />
87
  </div>
88
  </div>
89
  <div class="field">
@@ -97,7 +99,7 @@
97
  $('billing:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
98
  //]]>
99
  </script>
100
- <input type="text" id="billing:region" name="billing[region]" value="<?php echo $this->htmlEscape($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
101
  </div>
102
  </div>
103
  </li>
@@ -105,7 +107,7 @@
105
  <div class="field">
106
  <label for="billing:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
107
  <div class="input-box">
108
- <input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->htmlEscape($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international required-entry" />
109
  </div>
110
  </div>
111
  <div class="field">
@@ -119,13 +121,13 @@
119
  <div class="field">
120
  <label for="billing:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
121
  <div class="input-box">
122
- <input type="text" name="billing[telephone]" value="<?php echo $this->htmlEscape($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" id="billing:telephone" />
123
  </div>
124
  </div>
125
  <div class="field">
126
  <label for="billing:fax"><?php echo $this->__('Fax') ?></label>
127
  <div class="input-box">
128
- <input type="text" name="billing[fax]" value="<?php echo $this->htmlEscape($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text" id="billing:fax" />
129
  </div>
130
  </div>
131
  </li>
@@ -177,9 +179,12 @@
177
  <?php else:?>
178
  <li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" /></li>
179
  <?php endif; ?>
 
180
  </ul>
181
  </fieldset>
182
- </li>
 
 
183
  <?php if ($this->canShip()): ?>
184
  <li class="control">
185
  <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1"<?php if ($this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to this address') ?>" onclick="$('shipping:same_as_billing').checked = true;" class="radio" /><label for="billing:use_for_shipping_yes"><?php echo $this->__('Ship to this address') ?></label></li>
@@ -211,3 +216,204 @@
211
  var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', countryRegions, undefined, 'billing:postcode');
212
  //]]>
213
  </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.
20
  *
21
  * @category Diglin
22
  * @package Diglin_Username
23
+ * @copyright Copyright (c) 2012 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
+ if(version_compare(Mage::getVersion(), '1.7.0') < 0 ) { // Magento version < 1.7.0
28
+ ?>
29
  <form id="co-billing-form" action="">
30
  <fieldset>
31
  <ul class="form-list">
46
  <div class="field">
47
  <label for="billing:company"><?php echo $this->__('Company') ?></label>
48
  <div class="input-box">
49
+ <input type="text" id="billing:company" name="billing[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text" />
50
  </div>
51
  </div>
52
  <?php if(!$this->isCustomerLoggedIn()): ?>
53
  <div class="field">
54
  <label for="billing:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
55
  <div class="input-box">
56
+ <input type="text" name="billing[email]" id="billing:email" value="<?php echo $this->escapeHtml($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
57
  </div>
58
  </div>
59
  <?php endif ?>
60
  </li>
61
+ <?php if(!$this->isCustomerLoggedIn()): ?>
62
  <li class="fields">
63
  <div class="field">
64
  <label for="billing:username" class="required"><em>*</em><?php echo $this->__('Username') ?></label>
65
  <div class="input-box">
66
+ <input type="text" name="billing[username]" id="billing:username" value="<?php echo $this->escapeHtml($this->getAddress()->getUsername()) ?>" title="<?php echo $this->__('Username') ?>" class="input-text required-entry" />
67
  </div>
68
  </div>
69
  <?php endif ?>
71
  <li class="wide">
72
  <label for="billing:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
73
  <div class="input-box">
74
+ <input type="text" title="<?php echo $this->__('Street Address') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text required-entry" />
75
  </div>
76
  </li>
77
  <?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
78
  <li class="wide">
79
  <div class="input-box">
80
+ <input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text" />
81
  </div>
82
  </li>
83
  <?php endfor ?>
85
  <div class="field">
86
  <label for="billing:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
87
  <div class="input-box">
88
+ <input type="text" title="<?php echo $this->__('City') ?>" name="billing[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text required-entry" id="billing:city" />
89
  </div>
90
  </div>
91
  <div class="field">
99
  $('billing:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
100
  //]]>
101
  </script>
102
+ <input type="text" id="billing:region" name="billing[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
103
  </div>
104
  </div>
105
  </li>
107
  <div class="field">
108
  <label for="billing:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
109
  <div class="input-box">
110
+ <input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international required-entry" />
111
  </div>
112
  </div>
113
  <div class="field">
121
  <div class="field">
122
  <label for="billing:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
123
  <div class="input-box">
124
+ <input type="text" name="billing[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" id="billing:telephone" />
125
  </div>
126
  </div>
127
  <div class="field">
128
  <label for="billing:fax"><?php echo $this->__('Fax') ?></label>
129
  <div class="input-box">
130
+ <input type="text" name="billing[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text" id="billing:fax" />
131
  </div>
132
  </div>
133
  </li>
179
  <?php else:?>
180
  <li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" /></li>
181
  <?php endif; ?>
182
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
183
  </ul>
184
  </fieldset>
185
+ </li>
186
+ <?php /* Extensions placeholder */ ?>
187
+ <?php echo $this->getChildHtml('checkout.onepage.billing.extra')?>
188
  <?php if ($this->canShip()): ?>
189
  <li class="control">
190
  <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1"<?php if ($this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to this address') ?>" onclick="$('shipping:same_as_billing').checked = true;" class="radio" /><label for="billing:use_for_shipping_yes"><?php echo $this->__('Ship to this address') ?></label></li>
216
  var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', countryRegions, undefined, 'billing:postcode');
217
  //]]>
218
  </script>
219
+ <?php } else { // Version Magento >= 1.7.0 ?>
220
+ <form id="co-billing-form" action="">
221
+ <fieldset>
222
+ <ul class="form-list">
223
+ <?php if ($this->customerHasAddresses()): ?>
224
+ <li class="wide">
225
+ <label for="billing-address-select"><?php echo $this->__('Select a billing address from your address book or enter a new address.') ?></label>
226
+ <div class="input-box">
227
+ <?php echo $this->getAddressesHtmlSelect('billing') ?>
228
+ </div>
229
+ </li>
230
+ <?php endif; ?>
231
+ <li id="billing-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif; ?>>
232
+ <fieldset>
233
+ <input type="hidden" name="billing[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="billing:address_id" />
234
+ <ul>
235
+ <li class="fields"><?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress()->getFirstname() ? $this->getAddress() : $this->getQuote()->getCustomer())->setForceUseCustomerRequiredAttributes(!$this->isCustomerLoggedIn())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?></li>
236
+ <li class="fields">
237
+ <div class="field">
238
+ <label for="billing:company"><?php echo $this->__('Company') ?></label>
239
+ <div class="input-box">
240
+ <input type="text" id="billing:company" name="billing[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" />
241
+ </div>
242
+ </div>
243
+ <?php if(!$this->isCustomerLoggedIn()): ?>
244
+ <div class="field">
245
+ <label for="billing:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
246
+ <div class="input-box">
247
+ <input type="text" name="billing[email]" id="billing:email" value="<?php echo $this->escapeHtml($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
248
+ </div>
249
+ </div>
250
+ <?php endif; ?>
251
+ </li>
252
+ <?php if(!$this->isCustomerLoggedIn()): ?>
253
+ <li class="fields">
254
+ <div class="field">
255
+ <label for="billing:username" class="required"><em>*</em><?php echo $this->__('Username') ?></label>
256
+ <div class="input-box">
257
+ <input type="text" name="billing[username]" id="billing:username" value="<?php echo $this->escapeHtml($this->getAddress()->getUsername()) ?>" title="<?php echo $this->__('Username') ?>" class="input-text required-entry" />
258
+ </div>
259
+ </div>
260
+ <?php endif ?>
261
+ <?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
262
+ <li class="wide">
263
+ <label for="billing:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
264
+ <div class="input-box">
265
+ <input type="text" title="<?php echo $this->__('Street Address') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" />
266
+ </div>
267
+ </li>
268
+ <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
269
+ <?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
270
+ <li class="wide">
271
+ <div class="input-box">
272
+ <input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" />
273
+ </div>
274
+ </li>
275
+ <?php endfor; ?>
276
+ <?php if ($this->helper('customer/address')->isVatAttributeVisible()) : ?>
277
+ <li class="wide">
278
+ <label for="billing:vat_id"><?php echo $this->__('VAT Number') ?></label>
279
+ <div class="input-box">
280
+ <input type="text" id="billing:vat_id" name="billing[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()) ?>" title="<?php echo $this->__('VAT Number') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('vat_id') ?>" />
281
+ </div>
282
+ </li>
283
+ <?php endif; ?>
284
+ <li class="fields">
285
+ <div class="field">
286
+ <label for="billing:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
287
+ <div class="input-box">
288
+ <input type="text" title="<?php echo $this->__('City') ?>" name="billing[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="billing:city" />
289
+ </div>
290
+ </div>
291
+ <div class="field">
292
+ <label for="billing:region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
293
+ <div class="input-box">
294
+ <select id="billing:region_id" name="billing[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
295
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
296
+ </select>
297
+ <script type="text/javascript">
298
+ //<![CDATA[
299
+ $('billing:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
300
+ //]]>
301
+ </script>
302
+ <input type="text" id="billing:region" name="billing[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" />
303
+ </div>
304
+ </div>
305
+ </li>
306
+ <li class="fields">
307
+ <div class="field">
308
+ <label for="billing:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
309
+ <div class="input-box">
310
+ <input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />
311
+ </div>
312
+ </div>
313
+ <div class="field">
314
+ <label for="billing:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
315
+ <div class="input-box">
316
+ <?php echo $this->getCountryHtmlSelect('billing') ?>
317
+ </div>
318
+ </div>
319
+ </li>
320
+ <li class="fields">
321
+ <div class="field">
322
+ <label for="billing:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
323
+ <div class="input-box">
324
+ <input type="text" name="billing[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="billing:telephone" />
325
+ </div>
326
+ </div>
327
+ <div class="field">
328
+ <label for="billing:fax"><?php echo $this->__('Fax') ?></label>
329
+ <div class="input-box">
330
+ <input type="text" name="billing[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('fax') ?>" id="billing:fax" />
331
+ </div>
332
+ </div>
333
+ </li>
334
+ <?php if(!$this->isCustomerLoggedIn()): ?>
335
+
336
+ <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
337
+ <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
338
+ <?php if ($_dob->isEnabled() || $_gender->isEnabled()): ?>
339
+ <li class="fields">
340
+ <?php if ($_dob->isEnabled()): ?>
341
+ <div class="field">
342
+ <?php echo $_dob->setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
343
+ </div>
344
+ <?php endif; ?>
345
+ <?php if ($_gender->isEnabled()): ?>
346
+ <div class="field">
347
+ <?php echo $_gender->setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
348
+ </div>
349
+ <?php endif ?>
350
+ </li>
351
+ <?php endif ?>
352
+
353
+ <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
354
+ <?php if ($_taxvat->isEnabled()): ?>
355
+ <li>
356
+ <?php echo $_taxvat->setTaxvat($this->getQuote()->getCustomerTaxvat())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
357
+ </li>
358
+ <?php endif ?>
359
+
360
+ <li class="fields" id="register-customer-password">
361
+ <div class="field">
362
+ <label for="billing:customer_password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
363
+ <div class="input-box">
364
+ <input type="password" name="billing[customer_password]" id="billing:customer_password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
365
+ </div>
366
+ </div>
367
+ <div class="field">
368
+ <label for="billing:confirm_password" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
369
+ <div class="input-box">
370
+ <input type="password" name="billing[confirm_password]" title="<?php echo $this->__('Confirm Password') ?>" id="billing:confirm_password" class="input-text required-entry validate-cpassword" />
371
+ </div>
372
+ </div>
373
+ </li>
374
+ <?php endif; ?>
375
+ <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
376
+ <li class="control">
377
+ <input type="checkbox" name="billing[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="billing:save_in_address_book" onchange="if(window.shipping) shipping.setSameAsBilling(false);"<?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="billing:save_in_address_book"><?php echo $this->__('Save in address book') ?></label>
378
+ </li>
379
+ <?php else:?>
380
+ <li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" /></li>
381
+ <?php endif; ?>
382
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
383
+ </ul>
384
+ </fieldset>
385
+ </li>
386
+ <?php /* Extensions placeholder */ ?>
387
+ <?php echo $this->getChildHtml('checkout.onepage.billing.extra')?>
388
+ <?php if ($this->canShip()): ?>
389
+ <li class="control">
390
+ <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1"<?php if ($this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to this address') ?>" onclick="$('shipping:same_as_billing').checked = true;" class="radio" /><label for="billing:use_for_shipping_yes"><?php echo $this->__('Ship to this address') ?></label></li>
391
+ <li class="control">
392
+ <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_no" value="0"<?php if (!$this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to different address') ?>" onclick="$('shipping:same_as_billing').checked = false;" class="radio" /><label for="billing:use_for_shipping_no"><?php echo $this->__('Ship to different address') ?></label>
393
+ </li>
394
+ <?php endif; ?>
395
+ </ul>
396
+ <?php if (!$this->canShip()): ?>
397
+ <input type="hidden" name="billing[use_for_shipping]" value="1" />
398
+ <?php endif; ?>
399
+ <div class="buttons-set" id="billing-buttons-container">
400
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
401
+ <button type="button" title="<?php echo $this->__('Continue') ?>" class="button" onclick="billing.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
402
+ <span class="please-wait" id="billing-please-wait" style="display:none;">
403
+ <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
404
+ </span>
405
+ </div>
406
+ </fieldset>
407
+ </form>
408
+ <script type="text/javascript">
409
+ //<![CDATA[
410
+ var billing = new Billing('co-billing-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>');
411
+ var billingForm = new VarienForm('co-billing-form');
412
+
413
+ //billingForm.setElementsRelation('billing:country_id', 'billing:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
414
+ $('billing-address-select') && billing.newAddress(!$('billing-address-select').value);
415
+
416
+ var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'billing:postcode');
417
+ //]]>
418
+ </script>
419
+ <?php } ?>
app/design/frontend/default/default/template/username/checkout/onepage/login.phtml CHANGED
@@ -4,10 +4,10 @@
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
  * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-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.
@@ -20,10 +20,12 @@
20
  *
21
  * @category Diglin
22
  * @package Diglin_Username
23
- * @copyright Copyright (c) 2011 Diglin (http://www.diglin.com)
24
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
- ?>
 
 
27
  <div class="col2-set">
28
  <?php echo $this->getChildHtml('login_before')?>
29
  <div class="col-1">
@@ -79,6 +81,7 @@
79
  <input type="password" class="input-text required-entry" id="login-password" name="login[password]" />
80
  </div>
81
  </li>
 
82
  </ul>
83
  </fieldset>
84
  </form>
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.
20
  *
21
  * @category Diglin
22
  * @package Diglin_Username
23
+ * @copyright Copyright (c) 2012 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 /* Extensions placeholder */ ?>
28
+ <?php echo $this->getChildHtml('checkout.onepage.login.extra')?>
29
  <div class="col2-set">
30
  <?php echo $this->getChildHtml('login_before')?>
31
  <div class="col-1">
81
  <input type="password" class="input-text required-entry" id="login-password" name="login[password]" />
82
  </div>
83
  </li>
84
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
85
  </ul>
86
  </fieldset>
87
  </form>
app/design/frontend/default/default/template/username/customer/account/dashboard/info.phtml CHANGED
@@ -58,6 +58,8 @@
58
  </p>
59
  </div>
60
  </div>
 
 
61
  </div>
62
  <?php endif; ?>
63
  </div>
58
  </p>
59
  </div>
60
  </div>
61
+ <?php /* Extensions placeholder */ ?>
62
+ <?php echo $this->getChildHtml('customer.account.dashboard.info.extra')?>
63
  </div>
64
  <?php endif; ?>
65
  </div>
app/design/frontend/default/default/template/username/customer/form/login.phtml CHANGED
@@ -36,6 +36,8 @@
36
  <h1><?php echo $this->__('Login or Create an Account') ?></h1>
37
  </div>
38
  <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
 
 
39
  <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="login-form">
40
  <div class="col2-set">
41
  <div class="col-1 new-users">
@@ -61,6 +63,7 @@
61
  <input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" />
62
  </div>
63
  </li>
 
64
  </ul>
65
  <p class="required"><?php echo $this->__('* Required Fields') ?></p>
66
  </div>
36
  <h1><?php echo $this->__('Login or Create an Account') ?></h1>
37
  </div>
38
  <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
39
+ <?php /* Extensions placeholder */ ?>
40
+ <?php echo $this->getChildHtml('customer.form.login.extra')?>
41
  <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="login-form">
42
  <div class="col2-set">
43
  <div class="col-1 new-users">
63
  <input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" />
64
  </div>
65
  </li>
66
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
67
  </ul>
68
  <p class="required"><?php echo $this->__('* Required Fields') ?></p>
69
  </div>
app/design/frontend/default/default/template/username/customer/form/register.phtml CHANGED
@@ -23,9 +23,10 @@
23
  * @copyright Copyright (c) 2011 Diglin (http://www.diglin.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
- ?>
27
- <?php
28
- /**
 
29
  * Create account form template
30
  *
31
  * @see Mage_Customer_Block_Form_Register
@@ -57,7 +58,7 @@
57
  <label for="username" class="required"><em>*</em><?php echo Mage::helper('customer')->__('Username') ?></label>
58
  <div class="input-box">
59
  <input type="text" name="username" id="username" value="<?php echo $this->htmlEscape($this->getFormData()->getUsername()) ?>" title="<?php echo Mage::helper('customer')->__('Username') ?>" class="input-text required-entry" />
60
- </div>
61
  </div>
62
  </li>
63
  <?php if ($this->isNewsletterEnabled()): ?>
@@ -189,3 +190,172 @@
189
  //]]>
190
  </script>
191
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  * @copyright Copyright (c) 2011 Diglin (http://www.diglin.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
+
27
+ if (version_compare(Mage::getVersion(), '1.7.0') < 0) { // Magento version < 1.7.0
28
+
29
+ /**
30
  * Create account form template
31
  *
32
  * @see Mage_Customer_Block_Form_Register
58
  <label for="username" class="required"><em>*</em><?php echo Mage::helper('customer')->__('Username') ?></label>
59
  <div class="input-box">
60
  <input type="text" name="username" id="username" value="<?php echo $this->htmlEscape($this->getFormData()->getUsername()) ?>" title="<?php echo Mage::helper('customer')->__('Username') ?>" class="input-text required-entry" />
61
+ </div>
62
  </div>
63
  </li>
64
  <?php if ($this->isNewsletterEnabled()): ?>
190
  //]]>
191
  </script>
192
  </div>
193
+ <?php } else { // Magento version 1.7.0 ?>
194
+ <div class="account-create">
195
+ <div class="page-title">
196
+ <h1><?php echo $this->__('Create an Account') ?></h1>
197
+ </div>
198
+ <?php echo $this->getChildHtml('form_fields_before')?>
199
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
200
+ <?php /* Extensions placeholder */ ?>
201
+ <?php echo $this->getChildHtml('customer.form.register.extra')?>
202
+ <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate">
203
+ <div class="fieldset">
204
+ <input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
205
+ <input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
206
+ <h2 class="legend"><?php echo $this->__('Personal Information') ?></h2>
207
+ <ul class="form-list">
208
+ <li class="fields">
209
+ <?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->setForceUseCustomerAttributes(true)->toHtml() ?>
210
+ </li>
211
+ <li>
212
+ <div class="field">
213
+ <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
214
+ <div class="input-box">
215
+ <input type="text" name="email" id="email_address" value="<?php echo $this->escapeHtml($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
216
+ </div>
217
+ </div>
218
+
219
+ <div class="field">
220
+ <label for="username" class="required"><em>*</em><?php echo Mage::helper('customer')->__('Username') ?></label>
221
+ <div class="input-box">
222
+ <input type="text" name="username" id="username" value="<?php echo $this->htmlEscape($this->getFormData()->getUsername()) ?>" title="<?php echo Mage::helper('customer')->__('Username') ?>" class="input-text required-entry" />
223
+ </div>
224
+ </div>
225
+ </li>
226
+ <?php if ($this->isNewsletterEnabled()): ?>
227
+ <li class="control">
228
+ <div class="input-box">
229
+ <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" />
230
+ </div>
231
+ <label for="is_subscribed"><?php echo $this->__('Sign Up for Newsletter') ?></label>
232
+ <?php /* Extensions placeholder */ ?>
233
+ <?php echo $this->getChildHtml('customer.form.register.newsletter')?>
234
+ </li>
235
+ <?php endif ?>
236
+ <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
237
+ <?php if ($_dob->isEnabled()): ?>
238
+ <li><?php echo $_dob->setDate($this->getFormData()->getDob())->toHtml() ?></li>
239
+ <?php endif ?>
240
+ <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
241
+ <?php if ($_taxvat->isEnabled()): ?>
242
+ <li><?php echo $_taxvat->setTaxvat($this->getFormData()->getTaxvat())->toHtml() ?></li>
243
+ <?php endif ?>
244
+ <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
245
+ <?php if ($_gender->isEnabled()): ?>
246
+ <li><?php echo $_gender->setGender($this->getFormData()->getGender())->toHtml() ?></li>
247
+ <?php endif ?>
248
+ </ul>
249
+ </div>
250
+ <?php if($this->getShowAddressFields()): ?>
251
+ <div class="fieldset">
252
+ <input type="hidden" name="create_address" value="1" />
253
+ <h2 class="legend"><?php echo $this->__('Address Information') ?></h2>
254
+ <ul class="form-list">
255
+ <li class="fields">
256
+ <div class="field">
257
+ <label for="company"><?php echo $this->__('Company') ?></label>
258
+ <div class="input-box">
259
+ <input type="text" name="company" id="company" value="<?php echo $this->escapeHtml($this->getFormData()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" />
260
+ </div>
261
+ </div>
262
+ <div class="field">
263
+ <label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
264
+ <div class="input-box">
265
+ <input type="text" name="telephone" id="telephone" value="<?php echo $this->escapeHtml($this->getFormData()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" />
266
+ </div>
267
+ </div>
268
+ </li>
269
+ <?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
270
+ <li class="wide">
271
+ <label for="street_1" class="required"><em>*</em><?php echo $this->__('Street Address') ?></label>
272
+ <div class="input-box">
273
+ <input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getFormData()->getStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text <?php echo $_streetValidationClass ?>" />
274
+ </div>
275
+ </li>
276
+ <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
277
+ <?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
278
+ <li class="wide">
279
+ <div class="input-box">
280
+ <input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getFormData()->getStreet($_i)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="street_<?php echo $_i ?>" class="input-text <?php echo $_streetValidationClass ?>" />
281
+ </div>
282
+ </li>
283
+ <?php endfor; ?>
284
+ <li class="fields">
285
+ <div class="field">
286
+ <label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
287
+ <div class="input-box">
288
+ <input type="text" name="city" value="<?php echo $this->escapeHtml($this->getFormData()->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="city" />
289
+ </div>
290
+ </div>
291
+ <div class="field">
292
+ <label for="region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
293
+ <div class="input-box">
294
+ <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
295
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
296
+ </select>
297
+ <script type="text/javascript">
298
+ //<![CDATA[
299
+ $('region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>");
300
+ //]]>
301
+ </script>
302
+ <input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" />
303
+ </div>
304
+ </div>
305
+ </li>
306
+ <li class="fields">
307
+ <div class="field">
308
+ <label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
309
+ <div class="input-box">
310
+ <input type="text" name="postcode" value="<?php echo $this->escapeHtml($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />
311
+ </div>
312
+ </div>
313
+ <div class="field">
314
+ <label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
315
+ <div class="input-box">
316
+ <?php echo $this->getCountryHtmlSelect() ?>
317
+ </div>
318
+ </div>
319
+ </li>
320
+ </ul>
321
+ <input type="hidden" name="default_billing" value="1" />
322
+ <input type="hidden" name="default_shipping" value="1" />
323
+ </div>
324
+ <?php endif; ?>
325
+ <div class="fieldset">
326
+ <h2 class="legend"><?php echo $this->__('Login Information') ?></h2>
327
+ <ul class="form-list">
328
+ <li class="fields">
329
+ <div class="field">
330
+ <label for="password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
331
+ <div class="input-box">
332
+ <input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
333
+ </div>
334
+ </div>
335
+ <div class="field">
336
+ <label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
337
+ <div class="input-box">
338
+ <input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" />
339
+ </div>
340
+ </div>
341
+ </li>
342
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
343
+ </ul>
344
+ </div>
345
+ <div class="buttons-set">
346
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
347
+ <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>" class="back-link"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
348
+ <button type="submit" title="<?php echo $this->__('Submit') ?>" class="button"><span><span><?php echo $this->__('Submit') ?></span></span></button>
349
+ </div>
350
+ </form>
351
+ <script type="text/javascript">
352
+ //<![CDATA[
353
+ var dataForm = new VarienForm('form-validate', true);
354
+ <?php if($this->getShowAddressFields()): ?>
355
+ new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
356
+ <?php endif; ?>
357
+ //]]>
358
+ </script>
359
+ </div>
360
+
361
+ <?php } ?>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Diglin_Username</name>
4
- <version>1.4.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
@@ -19,7 +19,8 @@ Allow to disable an account from backend. The user will be blocked if the option
19
  - The default template override some customer and checkout views to adapt display for login pages, checkout process and account edition in frontend. If you have a customized template, please check the layout file username.xml and compare with your template to use or adapt to your situation.&#xD;
20
  &#xD;
21
  Compatible Magento version &gt;= 1.4.2 until 1.6.2</description>
22
- <notes>- Version 1.4.0: fix a problem to enable and disable a customer account from Customer Management in backend&#xD;
 
23
  - Version 1.3.0: new features. Configurable options: display username in Manage Customer Grid, allow customer to edit or not username in frontend My Account, define maximum and minimum length of username for the forms, define what kind of validation desired (letters, digits, both or both " _-)&#xD;
24
  - Version 1.2.1: fix customer account layout &#xD;
25
  - Version 1.2.0: fix problem with case sensitive OS, limit the number of characters possible (now it's between 6 and 30 letters), allow only some characters, try to provide compatibility update for users who had the old Jfusion_Username module, generate a username for old customers who don't have it, based on email address and a random id, improve the german translation, tested on 1.6.2 and 1.5.1&#xD;
@@ -28,9 +29,9 @@ Compatible Magento version &gt;= 1.4.2 until 1.6.2</description>
28
  - Version 1.0.1 - fix bug in sql query during installation on prefixed tables, add german translation, do package for Magento version prior to 1.5 and version 1.5.x&#xD;
29
  - Version 1.0.0 - stable version</notes>
30
  <authors><author><name>diglin</name><user>auto-converted</user><email>sly@diglin.com</email></author></authors>
31
- <date>2012-04-01</date>
32
- <time>23:36:55</time>
33
- <contents><target name="mageetc"><dir name="modules"><file name="Diglin_Username.xml" hash="79603fae3def6dd098d4be51897e1ec6"/></dir></target><target name="magecommunity"><dir name="Diglin"><dir name="Username"><dir name="Block"><dir name="Overwrite"><dir name="Adminhtml"><dir name="Config"><dir name="Source"><file name="Hint.php" hash="6419dadae08bf316492007996b03c9b9"/></dir></dir><file name="Grid.php" hash="8cca181c48ec4121ef06cc7a71c3fc4c"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="f8f4c678fdc809d2376d6b214a3136db"/></dir><dir name="Model"><dir name="Config"><dir name="Source"><file name="Inputvalidation.php" hash="24975e73aaa2d6eaef58e4fecf2864c9"/></dir></dir><dir name="Entity"><file name="Customer.php" hash="c6b4911f86363800bf65c52a68f32f21"/><file name="Setup.php" hash="f656439839e04fc017b2580cf3b56f4d"/></dir><file name="Customer.php" hash="91c0ed4c64415c4becb4d97079035a2f"/><file name="Form.php" hash="c99df4acc8e7e7958ea87697d2b4dd6a"/><file name="Observer.php" hash="de039323ed6ab0347281f074ac3c591a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="8eaa2843438b116e9d0425fcdd2ccabf"/><file name="config.xml" hash="addd957ece0cc9eafae0ba184347a3af"/><file name="system.xml" hash="5a88bf387b290654d0c45665e327b223"/></dir><dir name="sql"><dir name="username_setup"><file name="mysql4-install-1.0.0.php" hash="ac912748eb6e22a8044931c2b6cc53ad"/><file name="mysql4-upgrade-1.0.0-1.1.0.php" hash="4175a420b453763473b02120e80c43ac"/><file name="mysql4-upgrade-1.1.0-1.2.0.php" hash="8290f1a7337654851097223c366aeb06"/><file name="mysql4-upgrade-1.3.0-1.4.0.php" hash="5e2aecdd97a6a051327b7fd63f64c1c6"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="username"><dir name="checkout"><dir name="onepage"><file name="billing.phtml" hash="158561d558368712426b803b2f392a8b"/><file name="login.phtml" hash="057960b4b741b21657aed20a15278872"/></dir></dir><dir name="customer"><dir name="account"><dir name="dashboard"><file name="info.phtml" hash="ba4d68c18857691a034c45400deb6e51"/></dir></dir><dir name="form"><file name="edit.phtml" hash="fd93820e2b5aaed8b81b4ce98d7e6822"/><file name="login.phtml" hash="4b0be135d49e4098e093514bc0ddb88f"/><file name="register.phtml" hash="2808979c10df1b36dc0c74333490a50f"/></dir></dir></dir></dir><dir name="layout"><file name="username.xml" hash="cd4f5b85815c981f068da7408e325ba2"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_GB"><file name="Diglin_Username.csv" hash="2d18fb6bfc2c4c56f19cfe7ee6761f4b"/></dir><dir name="en_US"><file name="Diglin_Username.csv" hash="2d18fb6bfc2c4c56f19cfe7ee6761f4b"/></dir><dir name="fr_FR"><file name="Diglin_Username.csv" hash="d8d025c852649fc8e9edd2aed5ab377a"/></dir><dir name="de_DE"><file name="Diglin_Username.csv" hash="71ec3c2c428c65a3b700b5a1a12fc772"/></dir></target></contents>
34
  <compatible/>
35
  <dependencies/>
36
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Diglin_Username</name>
4
+ <version>1.5.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
19
  - The default template override some customer and checkout views to adapt display for login pages, checkout process and account edition in frontend. If you have a customized template, please check the layout file username.xml and compare with your template to use or adapt to your situation.&#xD;
20
  &#xD;
21
  Compatible Magento version &gt;= 1.4.2 until 1.6.2</description>
22
+ <notes>- Version 1.5.0: update for Magento 1.7&#xD;
23
+ - Version 1.4.0: fix a problem to enable and disable a customer account from Customer Management in backend&#xD;
24
  - Version 1.3.0: new features. Configurable options: display username in Manage Customer Grid, allow customer to edit or not username in frontend My Account, define maximum and minimum length of username for the forms, define what kind of validation desired (letters, digits, both or both " _-)&#xD;
25
  - Version 1.2.1: fix customer account layout &#xD;
26
  - Version 1.2.0: fix problem with case sensitive OS, limit the number of characters possible (now it's between 6 and 30 letters), allow only some characters, try to provide compatibility update for users who had the old Jfusion_Username module, generate a username for old customers who don't have it, based on email address and a random id, improve the german translation, tested on 1.6.2 and 1.5.1&#xD;
29
  - Version 1.0.1 - fix bug in sql query during installation on prefixed tables, add german translation, do package for Magento version prior to 1.5 and version 1.5.x&#xD;
30
  - Version 1.0.0 - stable version</notes>
31
  <authors><author><name>diglin</name><user>auto-converted</user><email>sly@diglin.com</email></author></authors>
32
+ <date>2012-07-19</date>
33
+ <time>21:40:26</time>
34
+ <contents><target name="mageetc"><dir name="modules"><file name="Diglin_Username.xml" hash="79603fae3def6dd098d4be51897e1ec6"/></dir></target><target name="magecommunity"><dir name="Diglin"><dir name="Username"><dir name="Block"><dir name="Overwrite"><dir name="Adminhtml"><dir name="Config"><dir name="Source"><file name="Hint.php" hash="6419dadae08bf316492007996b03c9b9"/></dir></dir><file name="Grid.php" hash="8cca181c48ec4121ef06cc7a71c3fc4c"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="f8f4c678fdc809d2376d6b214a3136db"/></dir><dir name="Model"><dir name="Config"><dir name="Source"><file name="Inputvalidation.php" hash="24975e73aaa2d6eaef58e4fecf2864c9"/></dir></dir><dir name="Entity"><file name="Customer.php" hash="c6b4911f86363800bf65c52a68f32f21"/><file name="Setup.php" hash="f656439839e04fc017b2580cf3b56f4d"/></dir><file name="Customer.php" hash="91c0ed4c64415c4becb4d97079035a2f"/><file name="Form.php" hash="c99df4acc8e7e7958ea87697d2b4dd6a"/><file name="Observer.php" hash="de039323ed6ab0347281f074ac3c591a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="8eaa2843438b116e9d0425fcdd2ccabf"/><file name="config.xml" hash="de4b4674c3ff77d1d2ee8d74ba0d07f8"/><file name="system.xml" hash="5a88bf387b290654d0c45665e327b223"/></dir><dir name="sql"><dir name="username_setup"><file name="mysql4-install-1.0.0.php" hash="ac912748eb6e22a8044931c2b6cc53ad"/><file name="mysql4-upgrade-1.0.0-1.1.0.php" hash="4175a420b453763473b02120e80c43ac"/><file name="mysql4-upgrade-1.1.0-1.2.0.php" hash="8290f1a7337654851097223c366aeb06"/><file name="mysql4-upgrade-1.3.0-1.4.0.php" hash="5e2aecdd97a6a051327b7fd63f64c1c6"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="username"><dir name="checkout"><dir name="onepage"><file name="billing.phtml" hash="010140b07e8c65d430d6cd8348bf89d7"/><file name="login.phtml" hash="96f6767c7a890fb500aa5f4cdb1f5d21"/></dir><file name=".DS_Store" hash="3a0b8c30af181f66c3bee373319ea31f"/></dir><dir name="customer"><dir name="account"><dir name="dashboard"><file name="info.phtml" hash="60412f7c03ea4a83cb08a129e237f909"/></dir></dir><dir name="form"><file name="edit.phtml" hash="fd93820e2b5aaed8b81b4ce98d7e6822"/><file name="login.phtml" hash="de017b3986f6ec82e10b9bdd1e130758"/><file name="register.phtml" hash="d89c98207e74185537c271cfa06b1579"/></dir></dir></dir></dir><dir name="layout"><file name="username.xml" hash="cd4f5b85815c981f068da7408e325ba2"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_GB"><file name="Diglin_Username.csv" hash="2d18fb6bfc2c4c56f19cfe7ee6761f4b"/></dir><dir name="en_US"><file name="Diglin_Username.csv" hash="2d18fb6bfc2c4c56f19cfe7ee6761f4b"/></dir><dir name="fr_FR"><file name="Diglin_Username.csv" hash="d8d025c852649fc8e9edd2aed5ab377a"/></dir><dir name="de_DE"><file name="Diglin_Username.csv" hash="71ec3c2c428c65a3b700b5a1a12fc772"/></dir></target></contents>
35
  <compatible/>
36
  <dependencies/>
37
  </package>