Example #1
0
 public function attributeLabels()
 {
     $return = array('id' => 'Id', 'username' => tt('Your name', 'usercpanel'), 'password' => tt('Password', 'usercpanel'), 'password_repeat' => tt('Repeat password', 'usercpanel'), 'old_password' => tt('Current administrator password', 'adminpass'), 'email' => tt('E-mail', 'users'), 'phone' => Yii::t('common', 'Your phone number'), 'Login (email)' => Yii::t('common', 'Login (email)'), 'verifyCode' => Yii::t('common', 'Verify Code'), 'additional_info' => tt('Additional info', 'usercpanel'), 'balance' => tc('balance'), 'type' => tc('Type'), 'role' => tt('Role', 'users'), 'agency_name' => tc('Agency name'), 'agency_user_id' => tc('Agency name'), 'date_created' => tc('Registration date'), 'last_login_date' => tc('The last date the user logged in to the system'), 'last_ip_addr' => tc('Last IP address'), 'agree' => tc('I agree with') . ' ' . CHtml::link(tc('with User agreement'), InfoPages::getUrlById(4), array('target' => '_blank')));
     if ($this->scenario == 'changePass' || $this->scenario == 'changeAdminPass') {
         $return['password'] = tt('Enter new password', 'usercpanel');
     }
     if ($this->scenario == 'usercpanel') {
         $return['email'] = tt('Your e-mail', 'usercpanel');
     }
     if ($this->scenario == 'backend' || $this->scenario == 'update') {
         $return['email'] = tt('E-mail', 'users');
         $return['username'] = tt('User name', 'users');
         $return['password'] = tt('Password', 'users');
         $return['phone'] = Yii::t('common', 'Phone number');
     }
     return $return;
 }