diff --git a/module/user/config.php b/module/user/config.php index 8cc60e7efb..6918e3b7a5 100644 --- a/module/user/config.php +++ b/module/user/config.php @@ -6,10 +6,12 @@ $config->user->edit = new stdclass(); $config->user->create->requiredFields = 'account,realname,password,password1,password2'; $config->user->edit->requiredFields = 'account,realname'; -$config->user->customBatchEditFields = 'dept,role,join,email,commiter,skype,qq,yahoo,gtalk,wangwang,mobile,phone,address,zipcode'; +$config->user->customBatchCreateFields = 'dept,email,gender,commiter,join,skype,qq,yahoo,gtalk,wangwang,mobile,phone,address,zipcode'; +$config->user->customBatchEditFields = 'dept,email,commiter,join,skype,qq,yahoo,gtalk,wangwang,mobile,phone,address,zipcode'; $config->user->custom = new stdclass(); -$config->user->custom->batchedit = 'dept,role,join,email,commiter'; +$config->user->custom->batchcreate = 'dept,email,gender'; +$config->user->custom->batchedit = 'dept,join,email,commiter'; $config->user->failTimes = 6; $config->user->lockMinutes = 10; diff --git a/module/user/control.php b/module/user/control.php index 6d78480b8b..f6b4a247b6 100644 --- a/module/user/control.php +++ b/module/user/control.php @@ -442,6 +442,11 @@ class user extends control die(js::locate($this->createLink('company', 'browse'), 'parent')); } + /* Set custom. */ + foreach(explode(',', $this->config->user->customBatchCreateFields) as $field) $customFields[$field] = $this->lang->user->$field; + $this->view->customFields = $customFields; + $this->view->showFields = $this->config->user->custom->batchcreate; + $title = $this->lang->company->common . $this->lang->colon . $this->lang->user->batchCreate; $position[] = $this->lang->user->batchCreate; $this->view->title = $title; diff --git a/module/user/model.php b/module/user/model.php index a089e829da..4327539442 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -284,6 +284,17 @@ class userModel extends model $data[$i]->email = $users->email[$i]; $data[$i]->gender = $users->gender[$i]; $data[$i]->password = md5($users->password[$i]); + $data[$i]->commiter = $users->commiter[$i]; + $data[$i]->join = $users->join[$i]; + $data[$i]->skype = $users->skype[$i]; + $data[$i]->qq = $users->qq[$i]; + $data[$i]->yahoo = $users->yahoo[$i]; + $data[$i]->gtalk = $users->gtalk[$i]; + $data[$i]->wangwang = $users->wangwang[$i]; + $data[$i]->mobile = $users->mobile[$i]; + $data[$i]->phone = $users->phone[$i]; + $data[$i]->address = $users->address[$i]; + $data[$i]->zipcode = $users->zipcode[$i]; $accounts[$i] = $data[$i]->account; $prev['dept'] = $data[$i]->dept; diff --git a/module/user/view/batchcreate.html.php b/module/user/view/batchcreate.html.php index 61f88ba83d..98123c678d 100644 --- a/module/user/view/batchcreate.html.php +++ b/module/user/view/batchcreate.html.php @@ -11,27 +11,49 @@ */ ?> +
icons['user']);?> icons['batchCreate']);?> user->batchCreate;?> +
+ +
- + 5) ? 'w-150px' : ''; +?>
- - - - + + + + - - - + + + + + + + + + + + + + + $lang->user->ditto)?> @@ -40,13 +62,13 @@ user->batchCreate; $i++):?> - + - - + + + + + + + + + + + + + + - - +
idAB;?>user->dept;?>user->account;?>user->realname;?>user->role;?>'>user->dept;?>user->account;?> user->realname;?> user->role;?> user->group;?>user->email;?>user->gender;?>user->password;?>'>user->email;?>'>user->gender;?>user->password;?> '>user->commiter;?>'> user->join;?>'> user->skype;?>'> user->qq;?>'> user->yahoo;?>'> user->gtalk;?>'>user->wangwang;?>'> user->mobile;?>'> user->phone;?>'> user->address;?>'> user->zipcode;?>
0 ? 'ditto' : $deptID, "class='form-control chosen'");?>' style='overflow:visible'> 0 ? 'ditto' : $deptID, "class='form-control chosen'");?> user->roleList, $i > 0 ? 'ditto' : '', "class='form-control' onchange='changeGroup(this.value, $i)'");?> 0 ? 'ditto' : '', "class='form-control chosen'");?>user->genderList, 'm');?>>>user->genderList, 'm');?>
0 ? "checked" : '') . " /> {$lang->user->ditto}"; ?>
-
'>'> '> '> '> '> '>'> '> '> '>
user->verifyPassword?> +
user->placeholder->verify}'");?>
+createLink('custom', 'ajaxSaveCustom', 'module=user§ion=custom&key=batchcreate')?> + diff --git a/module/user/view/batchedit.html.php b/module/user/view/batchedit.html.php index 04bda825a1..0c1104ade0 100644 --- a/module/user/view/batchedit.html.php +++ b/module/user/view/batchedit.html.php @@ -37,7 +37,7 @@ $minWidth = (count($hasFields) > 7) ? 'w-120px' : ''; '> user->dept;?> user->account;?> user->realname;?> - '> user->role;?> + user->role;?> '>user->commiter;?> '> user->email;?> '> user->join;?> @@ -66,7 +66,7 @@ $minWidth = (count($hasFields) > 7) ? 'w-120px' : ''; ' style='overflow:visible'>id]", $depts, $dept, "class='form-control chosen'");?> id]", $user->account, "class='form-control' autocomplete='off'");?> id]", $user->realname, "class='form-control'");?> - '> id]", $lang->user->roleList, $role, "class='form-control'");?> + id]", $lang->user->roleList, $role, "class='form-control'");?> '>id]", $user->commiter, "class='form-control'");?> '> id]", $user->email, "class='form-control'");?> '> id]", $user->join, "class='form-control form-date'");?> @@ -83,13 +83,13 @@ $minWidth = (count($hasFields) > 7) ? 'w-120px' : ''; user->verifyPassword?> - +
user->placeholder->verify}'");?> - + createLink('custom', 'ajaxSaveCustom', 'module=user§ion=custom&key=batchedit')?>