-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from pi-engine/develop
Update 17-03-2015
- Loading branch information
Showing
9 changed files
with
389 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
<?php | ||
/** | ||
* Pi Engine (http://pialog.org) | ||
* | ||
* @link http://code.pialog.org for the Pi Engine source repository | ||
* @copyright Copyright (c) Pi Engine http://pialog.org | ||
* @license http://pialog.org/license.txt BSD 3-Clause License | ||
*/ | ||
|
||
/** | ||
* User profile and resource specs | ||
* | ||
* @see Pi\Application\Installer\Resource\User | ||
* @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> | ||
*/ | ||
$customConfig = array( | ||
// Fields | ||
'field' => array( | ||
// Profile fields | ||
|
||
// Profile: credit | ||
'credit' => array( | ||
'name' => 'credit', | ||
'title' => _a('Credit'), | ||
'is_edit' => false, | ||
'is_display' => false, | ||
'is_search' => false, | ||
), | ||
|
||
// Profile: identification_number | ||
// See : https://en.wikipedia.org/wiki/National_identification_number | ||
'id_number' => array( | ||
'name' => 'id_number', | ||
'title' => _a('Identification number'), | ||
), | ||
|
||
// Profile: first_name | ||
'first_name' => array( | ||
'name' => 'first_name', | ||
'title' => _a('First Name'), | ||
), | ||
|
||
// Profile: last_name | ||
'last_name' => array( | ||
'name' => 'last_name', | ||
'title' => _a('Last Name'), | ||
), | ||
|
||
// Profile: mobile number | ||
'mobile' => array( | ||
'name' => 'mobile', | ||
'title' => _a('Mobile phone'), | ||
// Edit element specs | ||
'edit' => array( | ||
'validators' => array( | ||
array( | ||
'name' => 'Zend\I18n\Validator\PhoneNumber', | ||
'options' => array( | ||
'country' => 'ir', | ||
'allowed_types' => array('mobile'), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
|
||
// Profile: phone number | ||
'phone' => array( | ||
'name' => 'phone', | ||
'title' => _a('Telephone'), | ||
// Edit element specs | ||
'edit' => array( | ||
'validators' => array( | ||
array( | ||
'name' => 'Zend\I18n\Validator\PhoneNumber', | ||
'options' => array( | ||
'country' => 'ir', | ||
'allowed_types' => array('general'), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
|
||
// Profile: address1 | ||
'address1' => array( | ||
'name' => 'address1', | ||
'title' => _a('Address 1'), | ||
), | ||
|
||
// Profile: address2 | ||
'address1' => array( | ||
'name' => 'address2', | ||
'title' => _a('Address 2'), | ||
), | ||
|
||
// Profile: country | ||
'country' => array( | ||
'name' => 'country', | ||
'title' => _a('Country'), | ||
), | ||
|
||
// Profile: state | ||
'state' => array( | ||
'name' => 'state', | ||
'title' => _a('State'), | ||
), | ||
|
||
// Profile: city | ||
'city' => array( | ||
'name' => 'city', | ||
'title' => _a('City'), | ||
), | ||
|
||
// Profile: zip_code | ||
'zip_code' => array( | ||
'name' => 'zip_code', | ||
'title' => _a('Zip code'), | ||
), | ||
|
||
// Profile: company | ||
'company' => array( | ||
'name' => 'company', | ||
'title' => _a('Company'), | ||
), | ||
|
||
// Profile: company_id | ||
'company_id' => array( | ||
'name' => 'company_id', | ||
'title' => _a('Company ID'), | ||
), | ||
|
||
// Profile: company_vat | ||
'company_vat' => array( | ||
'name' => 'company_vat', | ||
'title' => _a('Company VAT'), | ||
), | ||
), | ||
); | ||
|
||
|
||
$config = include Pi::path('module/user/config/user.php'); | ||
foreach ($customConfig as $key => $cfg) { | ||
$config[$key] = array_merge($config[$key], $cfg); | ||
} | ||
|
||
return $config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.