- Make address2 never required, and setup the system so we can easily add more

fields that shoudl never be required.  I do it this way so I don't have to duplicate
  the field select array in user.inc.php for the requried fields too.
- Swap the City and Address2 locations so that Address1 and Address2 are on top
  of each other, instead of beside each other.
This commit is contained in:
dave 2007-12-12 22:50:54 +00:00
parent 5207a0d6e2
commit 89675213bf
2 changed files with 7 additions and 2 deletions

View File

@ -493,6 +493,11 @@ function user_personal_required_fields($type)
$ret = array_merge($ret, $user_personal_fields_map[$f]);
}
}
/* Filter some elements that are never required.
* - address2
*/
$ret = array_diff($ret, array('address2'));
return $ret;
}

View File

@ -194,10 +194,10 @@ item($u, "Password", 'password');
echo "</tr>\n";
echo "<tr>\n";
item($u, "Address 1", 'address');
item($u, "Address 2", 'address2');
item($u, "City", 'city');
echo "</tr>\n";
echo "<tr>\n";
item($u, "City", 'city');
item($u, "Address 2", 'address2');
if(in_array('province', $fields)) {
echo '<td>'.i18n('Province').': </td>';
echo '<td>';