* Code for task #5271.
This commit is contained in:
@@ -79,6 +79,11 @@ class custom extends control
|
||||
$this->app->loadConfig('user');
|
||||
$this->view->showDeleted = isset($this->config->user->showDeleted) ? $this->config->user->showDeleted : '0';
|
||||
}
|
||||
if($module == 'user' and $field == 'showField')
|
||||
{
|
||||
$this->app->loadConfig('user');
|
||||
$this->view->showFields = isset($this->config->user->showFields) ? $this->config->user->showFields : '';
|
||||
}
|
||||
|
||||
if(strtolower($this->server->request_method) == "post")
|
||||
{
|
||||
@@ -112,6 +117,11 @@ class custom extends control
|
||||
$data = fixer::input('post')->get();
|
||||
$this->loadModel('setting')->setItem('system.user.showDeleted', $data->showDeleted);
|
||||
}
|
||||
elseif($module == 'user' and $field == 'showField')
|
||||
{
|
||||
$data = fixer::input('post')->join('showFields', ',')->get();
|
||||
$this->loadModel('setting')->setItem('system.user.showFields', $data->showFields);
|
||||
}
|
||||
else
|
||||
{
|
||||
$lang = $_POST['lang'];
|
||||
|
||||
@@ -75,6 +75,7 @@ $lang->custom->user = new stdClass();
|
||||
$lang->custom->user->fields['roleList'] = 'Role';
|
||||
$lang->custom->user->fields['statusList'] = 'Status';
|
||||
$lang->custom->user->fields['deleted'] = 'Deleted User';
|
||||
$lang->custom->user->fields['showField'] = 'Show Field';
|
||||
|
||||
$lang->custom->block->fields['closed'] = 'Closed Block';
|
||||
|
||||
@@ -84,6 +85,7 @@ $lang->custom->allLang = 'All Language';
|
||||
$lang->custom->confirmRestore = 'Do you want to reset to Default?';
|
||||
|
||||
$lang->custom->notice = new stdclass();
|
||||
$lang->custom->notice->userFieldNotice = 'Control whether the above fields are displayed on the user-related page, and leave blank to display all';
|
||||
$lang->custom->notice->canNotAdd = 'It will be calculated, so customization is not enabled.';
|
||||
$lang->custom->notice->forceReview = '%s Review is required for certain submitters.';
|
||||
$lang->custom->notice->forceNotReview = "%s Review is NOT required for certain submitters.";
|
||||
@@ -109,6 +111,11 @@ $lang->custom->reviewList[0] = 'Off';
|
||||
$lang->custom->deletedList[1] = 'Show';
|
||||
$lang->custom->deletedList[0] = 'Hide';
|
||||
|
||||
$lang->custom->userFieldList['wechat'] = 'Wechat';
|
||||
$lang->custom->userFieldList['dingding'] = 'Dingding';
|
||||
$lang->custom->userFieldList['slact'] = 'Slact';
|
||||
$lang->custom->userFieldList['whatsapp'] = 'WhatsApp';
|
||||
|
||||
$lang->custom->workingHours = 'hours/day';
|
||||
$lang->custom->weekend = 'Weekend';
|
||||
$lang->custom->weekendList[2] = '2-Day Off';
|
||||
|
||||
@@ -75,6 +75,7 @@ $lang->custom->user = new stdClass();
|
||||
$lang->custom->user->fields['roleList'] = '职位';
|
||||
$lang->custom->user->fields['statusList'] = '状态';
|
||||
$lang->custom->user->fields['deleted'] = '列出已删除用户';
|
||||
$lang->custom->user->fields['showField'] = '显示字段';
|
||||
|
||||
$lang->custom->block->fields['closed'] = '关闭的区块';
|
||||
|
||||
@@ -84,6 +85,7 @@ $lang->custom->allLang = '适用所有语言';
|
||||
$lang->custom->confirmRestore = '是否要恢复默认配置?';
|
||||
|
||||
$lang->custom->notice = new stdclass();
|
||||
$lang->custom->notice->userFieldNotice = '控制以上字段在用户相关页面是否显示,留空则全显示';
|
||||
$lang->custom->notice->canNotAdd = '该项参与运算,不提供自定义添加功能';
|
||||
$lang->custom->notice->forceReview = "指定人提交的%s必须评审。";
|
||||
$lang->custom->notice->forceNotReview = "指定人提交的%s不需要评审。";
|
||||
@@ -109,6 +111,11 @@ $lang->custom->reviewList[0] = '关闭';
|
||||
$lang->custom->deletedList[1] = '列出';
|
||||
$lang->custom->deletedList[0] = '不列出';
|
||||
|
||||
$lang->custom->userFieldList['wechat'] = '微信';
|
||||
$lang->custom->userFieldList['dingding'] = '钉钉';
|
||||
$lang->custom->userFieldList['slact'] = 'Slact';
|
||||
$lang->custom->userFieldList['whatsapp'] = 'WhatsApp';
|
||||
|
||||
$lang->custom->workingHours = '每天可用工时';
|
||||
$lang->custom->weekend = '休息日';
|
||||
$lang->custom->weekendList[2] = '双休';
|
||||
|
||||
@@ -124,6 +124,21 @@ EOT;
|
||||
<td><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php elseif($module == 'user' and $field == 'showField'):?>
|
||||
<table class='table table-form mw-600px'>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->custom->user->fields['showField'];?></th>
|
||||
<td><?php echo html::select('showFields[]', $lang->custom->userFieldList, $showFields, "class='form-control chosen' multiple");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td><span class='text-warning'><?php echo $lang->custom->notice->userFieldNotice;?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php else:?>
|
||||
<table class='table table-form active-disabled table-condensed mw-600px'>
|
||||
<tr class='text-center'>
|
||||
|
||||
@@ -30,6 +30,10 @@ $lang->user->verify = 'Verification';
|
||||
$lang->user->contactInfo = 'Contact';
|
||||
$lang->user->skype = 'Skype';
|
||||
$lang->user->qq = 'QQ';
|
||||
$lang->user->wechat = 'Wechat';
|
||||
$lang->user->dingding = 'Dingding';
|
||||
$lang->user->slack = 'Slack';
|
||||
$lang->user->whatsapp = 'WhatsApp';
|
||||
$lang->user->gtalk = 'GTalk';
|
||||
$lang->user->mobile = 'Mobile';
|
||||
$lang->user->phone = 'Phone';
|
||||
|
||||
@@ -30,6 +30,10 @@ $lang->user->verify = '安全验证';
|
||||
$lang->user->contactInfo = '联系信息';
|
||||
$lang->user->skype = 'Skype';
|
||||
$lang->user->qq = 'QQ';
|
||||
$lang->user->wechat = '微信';
|
||||
$lang->user->dingding = '钉钉';
|
||||
$lang->user->slack = 'Slack';
|
||||
$lang->user->whatsapp = 'WhatsApp';
|
||||
$lang->user->gtalk = 'GTalk';
|
||||
$lang->user->mobile = '手机';
|
||||
$lang->user->phone = '电话';
|
||||
|
||||
@@ -94,6 +94,26 @@
|
||||
<th><?php echo $lang->user->address;?></th>
|
||||
<td><?php echo html::input('address', $user->address, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php if(!isset($config->user->showFields) or (strpos($config->user->showFields, 'wechat') !== false)):?>
|
||||
<th><?php echo $lang->user->wechat;?></th>
|
||||
<td><?php echo html::input('wechat', $user->wechat, "class='form-control'");?></td>
|
||||
<?php endif;?>
|
||||
<?php if(!isset($config->user->showFields) or (strpos($config->user->showFields, 'dingding') !== false)):?>
|
||||
<th><?php echo $lang->user->dingding;?></th>
|
||||
<td><?php echo html::input('dingding', $user->dingding, "class='form-control'");?></td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php if(!isset($config->user->showFields) or (strpos($config->user->showFields, 'slack') !== false)):?>
|
||||
<th><?php echo $lang->user->slack;?></th>
|
||||
<td><?php echo html::input('slack', $user->slack, "class='form-control'");?></td>
|
||||
<?php endif;?>
|
||||
<?php if(!isset($config->user->showFields) or (strpos($config->user->showFields, 'whatsapp') !== false)):?>
|
||||
<th><?php echo $lang->user->whatsapp;?></th>
|
||||
<td><?php echo html::input('whatsapp', $user->whatsapp, "class='form-control'");?></td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->zipcode;?></th>
|
||||
<td><?php echo html::input('zipcode', $user->zipcode, "class='form-control'");?></td>
|
||||
|
||||
Reference in New Issue
Block a user