OSDN Git Service

管理画面からユーザ登録でアドレス登録
authorCake <cake_67@users.sourceforge.jp>
Fri, 18 Jun 2010 05:21:09 +0000 (14:21 +0900)
committerCake <cake_67@users.sourceforge.jp>
Fri, 18 Jun 2010 05:21:09 +0000 (14:21 +0900)
app/controllers/users_controller.php
app/plugins/install/views/install/regist.ctp
app/views/users/admin_add.ctp

index cc04f0d..e49e8ca 100644 (file)
@@ -473,7 +473,11 @@ class UsersController extends ModuleController {
 
                        // save
                        $this->User->create();
-                       if ($this->User->save($this->data, array('fieldList' => $this->User->fields['add']))) {
+                       $fieldList =$this->User->fields['add']; 
+                       if ($this->isAdmin) {
+                               $fieldList = array_merge($fieldList, array('pcmail'));
+                       }
+                       if ($this->User->save($this->data, array('fieldList' => $fieldList))) {
                                if (!$this->isAdmin) {
                                        $this->Session->setFlash(__('The User has been saved. Please Login.', true));
                                        $this->redirect($this->AuthPlus->loginAction);
index ae75bdf..e9a3505 100644 (file)
@@ -47,7 +47,7 @@
 <p>
 <?php
        echo $form->input('User.password1', array(
-               'label' => 'Password of the Administrator',
+               'label' => __('Password of the Administrator', true),
                'type' => 'password',
                'value' => '',
                'maxlength' => $passwordLength['max'],
@@ -61,7 +61,7 @@
                )
        ));
        echo $form->input('User.password2', array(
-               'label' => 'Password of the Administrator[Confirm]',
+               'label' => __('Password of the Administrator[Confirm]', true),
                'type' => 'password',
                'value' => '',
                'after' => $html->div('required', 
@@ -73,7 +73,7 @@
 <p>
 <?php
        echo $form->input('User.pcmail', array(
-               'label' => 'Pc Mail Address',
+               'label' => __('Pc Mail Address', true),
                'after' => $html->tag('div',
 'required', 
                        __(' * required', true),
@@ -89,7 +89,7 @@
                $siteName = $this->data['SiteConfig']['siteName'];
        }
        echo $form->input('SiteConfig.siteName', array(
-               'label' => 'Site Name',
+               'label' => __('Site Name', true),
                'value' => $siteName,
        ));
 
index 0244de4..96a3dcc 100644 (file)
@@ -31,6 +31,9 @@
                'label' => __('Password [confirm]', true),
                'maxlength' => $passwordLength['max'],
        ));
+       echo $form->input('pcmail', array(
+               'label' => __('Pc Mail Address', true),
+       ));
        echo $token->create();
 ?>
 </fieldset>