OSDN Git Service

サイト設定でユーザ設定の項目分離
authorCake <cake_67@users.sourceforge.jp>
Wed, 15 Dec 2010 10:38:17 +0000 (19:38 +0900)
committerCake <cake_67@users.sourceforge.jp>
Wed, 15 Dec 2010 10:38:17 +0000 (19:38 +0900)
app/controllers/regist_mails_controller.php
app/controllers/site_configs_controller.php
app/controllers/users_controller.php
app/locale/jpn/LC_MESSAGES/default.po
app/models/site_config.php
app/views/site_configs/admin_edit.ctp
app/views/users/admin_add.ctp
app/views/users/login.ctp

index 0310dbf..c3885ba 100644 (file)
@@ -62,7 +62,7 @@ class RegistMailsController extends AppController {
 
        function add() {
                // メンバー登録にメールアドレス登録必須設定
-               if ($this->user_id = null && !$this->site_configs['Site.registMail']['value']) {
+               if ($this->user_id = null && !$this->site_configs['User.registMail']['value']) {
                        $this->redirect(array('controller' => 'users', 'action'=>'add'));
                }
 
index 9d37b5c..b7c59d7 100644 (file)
@@ -72,6 +72,8 @@ class SiteConfigsController extends AppController {
 
                                if (isset($this->data['basic_submit'])) {
                                        $sharp = 'basic';
+                               } elseif (isset($this->data['user_submit'])) {
+                                       $sharp = 'user';
                                } elseif (isset($this->data['info_submit'])) {
                                        $sharp = 'info';
                                } elseif (isset($this->data['upload_submit'])) {
index 17a10c7..9de7392 100644 (file)
@@ -134,13 +134,13 @@ class UsersController extends AppController {
 
        function add($code = null) {
                // 新規登録停止
-               if (!$this->site_configs['Site.newUserRegist']['value']) {
+               if (!$this->site_configs['User.newUserRegist']['value']) {
                        $this->Session->setFlash(__('Unavailable Now.', true));
                        $this->redirect(array('action'=>'index'));
                }
 
                // メールアドレス登録必須
-               if ($this->site_configs['Site.registMail']['value']) {
+               if ($this->site_configs['User.registMail']['value']) {
                        if (empty($code)) {
                                $this->redirect(array('controller' => 'regist_mails', 'action'=>'add'));
                        }
@@ -527,7 +527,7 @@ class UsersController extends AppController {
                }
 
                // アドレス登録必須設定
-               if ($this->site_configs['Site.registMail']['value'] && !$this->isAdmin) {
+               if ($this->site_configs['User.registMail']['value'] && !$this->isAdmin) {
                        if (empty($registData)) {
                                $this->redirect(array('controller' => 'regist_mails', 'action'=>'add'));
                        }
@@ -564,7 +564,7 @@ class UsersController extends AppController {
                        $this->User->create();
                        if ($this->User->save($this->data, array('fieldList' => $fieldList, 'validate' => false))) {
                                if (!$this->isAdmin) {
-                                       if ($this->site_configs['Site.registMail']['value']) {
+                                       if ($this->site_configs['User.registMail']['value']) {
                                                if (!empty($registData)) {
                                                        $this->{$this->modelClass}->deleteRegistData4mail($registData['RegistMail']['mail']);
                                                }
index 41cb9a6..db36bb7 100644 (file)
@@ -1960,6 +1960,9 @@ msgstr "外部ホームのURL"
 msgid "Link name of Outer Home"
 msgstr "外部ホームへのリンク名"
 
+msgid "User Setting"
+msgstr "ユーザ設定"
+
 #: /views/site_configs/admin_edit.ctp:
 msgid "Allow New User Regist"
 msgstr "新規ユーザ登録"
index 9272b5f..ce0a7a9 100644 (file)
@@ -35,11 +35,11 @@ class SiteConfig extends AppModel {
                        'value' => 'Back'
                ),
 
-               'Site.newUserRegist' => array(
+               'User.newUserRegist' => array(
                        'id' => null,
                        'value' => 1
                ),
-               'Site.registMail' => array(
+               'User.registMail' => array(
                        'id' => null,
                        'value' => 1
                ),
index f9ad205..393ca8a 100644 (file)
@@ -10,6 +10,7 @@ $(function() {
 
 <ul class="tabs">
 <li><?php echo $html->link(__('Basic', true), "#basic", array('onclick' => 'return false;')) ?></li>
+<li><?php echo $html->link(__('User Setting', true), "#user", array('onclick' => 'return false;')) ?></li>
 <li><?php echo $html->link(__('Character', true), "#character", array('onclick' => 'return false;')) ?></li>
 <li><?php echo $html->link(__('Upload', true), "#upload", array('onclick' => 'return false;')) ?></li>
 <li><?php echo $html->link(__('Information', true), "#info", array('onclick' => 'return false;')) ?></li>
@@ -82,6 +83,19 @@ echo $token->create();
 </table>
 </fieldset>
 
+<?php
+echo $html->div('submit', 
+       '<input type="submit" value="Submit" name="data[basic_submit]">', 
+       array('escape' => false)
+);
+?>
+
+</p>
+</div>
+
+<div id="user">
+<p>
+
 <fieldset>
 <legend><?php __('Registration');?></legend>
 
@@ -90,20 +104,20 @@ echo $token->create();
 <th><?php echo __('Allow New User Regist') ?></th>
 <td id="Site_newUserRegist">
 <div class="input radio inline">
-<input name="data[SiteConfig][Site.newUserRegist][value]" type="radio" value="1"<?php if (!empty($this->data['SiteConfig']['Site.newUserRegist']['value'])): ?> checked="checked"<?php endif; ?>><?php __('Allow') ?>
-<input name="data[SiteConfig][Site.newUserRegist][value]" type="radio" value="0"<?php if (empty($this->data['SiteConfig']['Site.newUserRegist']['value'])): ?> checked="checked"<?php endif; ?>><?php __('No Allow') ?>
+<input name="data[SiteConfig][User.newUserRegist][value]" type="radio" value="1"<?php if (!empty($this->data['SiteConfig']['User.newUserRegist']['value'])): ?> checked="checked"<?php endif; ?>><?php __('Allow') ?>
+<input name="data[SiteConfig][User.newUserRegist][value]" type="radio" value="0"<?php if (empty($this->data['SiteConfig']['User.newUserRegist']['value'])): ?> checked="checked"<?php endif; ?>><?php __('No Allow') ?>
 </div>
-<input name="data[SiteConfig][Site.newUserRegist][id]" type="hidden" value="<?php echo $this->data['SiteConfig']['Site.newUserRegist']['id'];?>">
+<input name="data[SiteConfig][User.newUserRegist][id]" type="hidden" value="<?php echo $this->data['SiteConfig']['User.newUserRegist']['id'];?>">
 </td>
 </tr>
 <tr>
 <th><?php echo __('Regist Mail') ?></th>
 <td id="Site_registMail">
 <div class="input radio inline">
-<input name="data[SiteConfig][Site.registMail][value]" type="radio" value="1"<?php if (!empty($this->data['SiteConfig']['Site.registMail']['value'])): ?> checked="checked"<?php endif; ?>><?php __('Required') ?>
-<input name="data[SiteConfig][Site.registMail][value]" type="radio" value="0"<?php if (empty($this->data['SiteConfig']['Site.registMail']['value'])): ?> checked="checked"<?php endif; ?>><?php __('Not Required') ?>
+<input name="data[SiteConfig][User.registMail][value]" type="radio" value="1"<?php if (!empty($this->data['SiteConfig']['User.registMail']['value'])): ?> checked="checked"<?php endif; ?>><?php __('Required') ?>
+<input name="data[SiteConfig][User.registMail][value]" type="radio" value="0"<?php if (empty($this->data['SiteConfig']['User.registMail']['value'])): ?> checked="checked"<?php endif; ?>><?php __('Not Required') ?>
 </div>
-<input name="data[SiteConfig][Site.registMail][id]" type="hidden" value="<?php echo $this->data['SiteConfig']['Site.registMail']['id'];?>">
+<input name="data[SiteConfig][User.registMail][id]" type="hidden" value="<?php echo $this->data['SiteConfig']['User.registMail']['id'];?>">
 </td>
 </tr>
 
@@ -112,7 +126,7 @@ echo $token->create();
 
 <?php
 echo $html->div('submit', 
-       '<input type="submit" value="Submit" name="data[basic_submit]">', 
+       '<input type="submit" value="Submit" name="data[user_submit]">', 
        array('escape' => false)
 );
 ?>
index 2db31df..4f1fd3f 100644 (file)
@@ -18,7 +18,7 @@
        ));
        echo $group->create_group_select();
 
-if ($site_configs['Site.registMail']['value']) {
+if ($site_configs['User.registMail']['value']) {
        echo $form->input('pcmail', array(
                'label' => __('Pc Mail', true),
                'style' => 'ime-mode:inactive;',
index 144a061..15e1fbc 100644 (file)
@@ -7,7 +7,7 @@
        echo $form->input('password');
        echo $form->end(__('Login', true));
 
-if ($site_configs['Site.newUserRegist']['value']) {
+if ($site_configs['User.newUserRegist']['value']) {
        echo $form->create('User', array('action' => 'add'));
        echo $form->end(__('Registration', true));
 }