* Finish task #36018.

This commit is contained in:
holan20180123
2021-02-19 15:23:32 +08:00
parent c289d0092c
commit 1e7beb09af
24 changed files with 233 additions and 26 deletions
+28
View File
@@ -89,6 +89,22 @@ class company extends control
$this->view->param = $param;
$this->view->type = $type;
$this->view->browseType = $browseType;
$this->view->companies = $this->company->getOutsideCompanies();
$this->display();
}
public function create()
{
if(!empty($_POST))
{
$this->company->create();
if(dao::isError()) die(js::error(dao::getError()));
die(js::reload('parent.parent'));
}
$this->view->title = $this->lang->company->common . $this->lang->colon . $this->lang->company->create;
$this->view->position = $this->lang->company->create;
$this->display();
}
@@ -259,4 +275,16 @@ class company extends control
$this->view->direction = $direction;
$this->display();
}
/**
* Ajax get outside company.
*
* @access public
* @return void
*/
public function ajaxGetOutsideCompany()
{
$companies = $this->company->getOutsideCompanies();
die(html::select('company', $companies, '', "class='form-control chosen'"));
}
}
+1
View File
@@ -11,6 +11,7 @@
*/
$lang->company->common = 'Unternehmen';
$lang->company->index = "Start";
$lang->company->create = "Add Company";
$lang->company->edit = "Bearbeiten";
$lang->company->view = "Unternehmensinfo";
$lang->company->browse = "Benutzerliste";
+1
View File
@@ -11,6 +11,7 @@
*/
$lang->company->common = 'Company';
$lang->company->index = "Company Home";
$lang->company->create = "Add Company";
$lang->company->edit = "Edit Company";
$lang->company->view = "Company Information";
$lang->company->browse = "User List";
+1
View File
@@ -11,6 +11,7 @@
*/
$lang->company->common = 'Entreprise';
$lang->company->index = "Accueil Entreprise";
$lang->company->create = "Add Company";
$lang->company->edit = "Edit Entreprise";
$lang->company->view = "Informations Entreprise";
$lang->company->browse = "Liste Utilisateurs";
+1
View File
@@ -11,6 +11,7 @@
*/
$lang->company->common = 'Doanh nghiệp';
$lang->company->index = "Trang doanh nghiệp";
$lang->company->create = "Add Company";
$lang->company->edit = "Sửa doanh nghiệp";
$lang->company->view = "Thông tin doanh nghiệp";
$lang->company->browse = "Danh sách người dùng";
+1
View File
@@ -11,6 +11,7 @@
*/
$lang->company->common = '组织视图';
$lang->company->index = "组织视图首页";
$lang->company->create = "添加公司";
$lang->company->edit = "编辑公司";
$lang->company->view = "公司信息";
$lang->company->browse = "用户列表";
+1
View File
@@ -11,6 +11,7 @@
*/
$lang->company->common = '組織視圖';
$lang->company->index = "組織視圖首頁";
$lang->company->create = "添加公司";
$lang->company->edit = "編輯公司";
$lang->company->view = "公司信息";
$lang->company->browse = "用戶列表";
+8
View File
@@ -72,7 +72,11 @@ js::set('confirmDelete', $lang->user->confirmDelete);
</th>
<th><?php common::printOrderlink('realname', $orderBy, $vars, $lang->user->realname);?></th>
<th><?php common::printOrderLink('account', $orderBy, $vars, $lang->user->account);?></th>
<?php if($browseType == 'inside'):?>
<th class="w-90px"><?php common::printOrderLink('role', $orderBy, $vars, $lang->user->role);?></th>
<?php else:?>
<th class="w-90px"><?php common::printOrderLink('company', $orderBy, $vars, $lang->user->company);?></th>
<?php endif;?>
<th class="c-url"><?php common::printOrderLink('email', $orderBy, $vars, $lang->user->email);?></th>
<th class="c-type"><?php common::printOrderLink('gender', $orderBy, $vars, $lang->user->gender);?></th>
<th><?php common::printOrderLink('phone', $orderBy, $vars, $lang->user->phone);?></th>
@@ -94,7 +98,11 @@ js::set('confirmDelete', $lang->user->confirmDelete);
</td>
<td title="<?php echo $user->realname;?>"><?php echo $user->realname;?></td>
<td><?php echo $user->account;?></td>
<?php if($browseType == 'inside'):?>
<td class="w-90px" title='<?php echo zget($lang->user->roleList, $user->role, '');?>'><?php echo zget($lang->user->roleList, $user->role, '');?></td>
<?php else:?>
<td class="w-90px" title='<?php echo zget($companies, $user->company, '');?>'><?php echo zget($companies, $user->company, '');?></td>
<?php endif;?>
<td class="c-url" title="<?php echo $user->email;?>"><?php echo html::mailto($user->email);?></td>
<td class="c-type"><?php echo zget($lang->user->genderList, $user->gender, $user->gender);?></td>
<td><?php echo $user->phone;?></td>
+1 -2
View File
@@ -132,8 +132,7 @@ class program extends control
$this->view->title = $this->lang->program->PGMProduct;
$this->view->position[] = $this->lang->program->PGMProduct;
$this->view->program = $this->program->getPGMByID($programID);
$this->view->program = $program;
$this->view->browseType = $browseType;
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
-12
View File
@@ -214,18 +214,6 @@ class stakeholder extends control
die(html::select('user', $users, '', "class='form-control chosen' onchange=changeUser(this.value);"));
}
/**
* Ajax get outside company.
*
* @access public
* @return void
*/
public function ajaxGetOutsideCompany()
{
$companys = $this->loadModel('company')->getOutsideCompanies();
die(html::select('company', $companys, '', "class='form-control chosen'"));
}
/**
* Ajax get control.
*
+1 -1
View File
@@ -51,7 +51,7 @@ $(function()
}
else
{
var link = createLink('stakeholder', 'ajaxGetOutsideCompany');
var link = createLink('company', 'ajaxGetOutsideCompany');
$.post(link, function(data)
{
$('#company').replaceWith(data);
+2
View File
@@ -575,6 +575,7 @@ class user extends control
$this->view->roleGroup = $roleGroup;
$this->view->deptID = $deptID;
$this->view->rand = $this->user->updateSessionRandom();
$this->view->companies = $this->loadModel('company')->getOutsideCompanies();
$this->display();
}
@@ -663,6 +664,7 @@ class user extends control
$this->view->user = $user;
$this->view->depts = $this->dept->getOptionMenu();
$this->view->userGroups = implode(',', array_keys($userGroups));
$this->view->companies = $this->loadModel('company')->getOutsideCompanies();
$this->view->groups = $this->dao->select('id, name')->from(TABLE_GROUP)->fetchPairs('id', 'name');
$this->view->rand = $this->user->updateSessionRandom();
+49
View File
@@ -1,3 +1,31 @@
$(function()
{
$("input[name='new[]']").change(function()
{
if($(this).prop('checked'))
{
$('#company').replaceWith("<input name='company' id='company' class='form-control'/>");
$('#company_chosen').remove();
}
else
{
var link = createLink('company', 'ajaxGetOutsideCompany');
$.post(link, function(data)
{
$('#company').replaceWith(data);
$('#company').chosen();
})
}
})
})
/**
* Change group when change role.
*
* @param role $role
* @access public
* @return void
*/
function changeGroup(role)
{
if(role && roleGroup[role])
@@ -11,6 +39,27 @@ function changeGroup(role)
$('#group').trigger("chosen:updated");
}
/**
* Show or hide companies based on user type.
*
* @param type $type
* @access public
* @return void
*/
function changeType(type)
{
if(type == 'inside')
{
$('#companyBox').addClass('hide');
$('#dept, #join, #commiter').closest('tr').removeClass('hide');
}
else
{
$('#companyBox').removeClass('hide');
$('#dept, #join, #commiter').closest('tr').addClass('hide');
}
}
$(function()
{
var password1Encrypted = false
+43
View File
@@ -19,4 +19,47 @@ $(function()
password1Encrypted = true;
password2Encrypted = true;
})
$("input[name='new[]']").change(function()
{
if($(this).prop('checked'))
{
$('#company').replaceWith("<input name='company' id='company' class='form-control'/>");
$('#company_chosen').remove();
}
else
{
var link = createLink('company', 'ajaxGetOutsideCompany');
$.post(link, function(data)
{
$('#company').replaceWith(data);
$('#company').chosen();
})
}
})
changeType(type);
});
/**
* Show or hide companies based on user type.
*
* @param type $type
* @access public
* @return void
*/
function changeType(type)
{
if(type == 'inside')
{
$('#company').closest('td').addClass('hide');
$('#groups').closest('td').next('th').addClass('hide');
$('#dept, #commiter').closest('tr').removeClass('hide');
}
else
{
$('#company').closest('td').removeClass('hide');
$('#groups').closest('td').next('th').removeClass('hide');
$('#dept, #commiter').closest('tr').addClass('hide');
}
}
+4
View File
@@ -52,6 +52,7 @@ $lang->user->verifyPassword = 'Ihr Login Passwort';
$lang->user->resetPassword = 'Passwort vergessen?';
$lang->user->score = 'Score';
$lang->user->name = 'Name';
$lang->user->type = 'User Type';
$lang->user->cropAvatar = 'Crop Avatar';
$lang->user->cropAvatarTip = 'Drag and drop the box to select the image clipping range.';
$lang->user->cropImageTip = 'The image used is too small, the recommended image size is at least 48x48, the current image size is %s';
@@ -145,6 +146,9 @@ $lang->user->genderList['f'] = 'Weiblich';
$lang->user->thirdPerson['m'] = 'Him';
$lang->user->thirdPerson['f'] = 'Her';
$lang->user->typeList['inside'] = $lang->user->inside;
$lang->user->typeList['outside'] = $lang->user->outside;
$lang->user->passwordStrengthList[0] = "<span style='color:red'>Schwach</span>";
$lang->user->passwordStrengthList[1] = "<span style='color:#000'>Gut</span>";
$lang->user->passwordStrengthList[2] = "<span style='color:green'>Stark</span>";
+5
View File
@@ -52,6 +52,7 @@ $lang->user->verifyPassword = 'Password';
$lang->user->resetPassword = 'Forgot Password?';
$lang->user->score = 'Score';
$lang->user->name = 'Name';
$lang->user->type = 'User Type';
$lang->user->cropAvatar = 'Crop Avatar';
$lang->user->cropAvatarTip = 'Drag and drop the box to select the image clipping range.';
$lang->user->cropImageTip = 'The image used is too small, the recommended image size is at least 48x48, the current image size is %s';
@@ -145,6 +146,9 @@ $lang->user->genderList['f'] = 'Female';
$lang->user->thirdPerson['m'] = 'Him';
$lang->user->thirdPerson['f'] = 'Her';
$lang->user->typeList['inside'] = $lang->user->inside;
$lang->user->typeList['outside'] = $lang->user->outside;
$lang->user->passwordStrengthList[0] = "<span style='color:red'>Weak</span>";
$lang->user->passwordStrengthList[1] = "<span style='color:#000'>Good</span>";
$lang->user->passwordStrengthList[2] = "<span style='color:green'>Strong</span>";
@@ -200,6 +204,7 @@ $lang->user->error->dangerPassword = "ID %s,Passwords cannot be used with [%s]
$lang->user->error->verifyPassword = "Verification failed. Please enter your Login Password.";
$lang->user->error->originalPassword = "Old password is incorrect.";
$lang->user->error->companyEmpty = "Company name must be not empty.";
$lang->user->contactFieldList['phone'] = $lang->user->phone;
$lang->user->contactFieldList['mobile'] = $lang->user->mobile;
+4
View File
@@ -52,6 +52,7 @@ $lang->user->verifyPassword = 'Mot de Passe';
$lang->user->resetPassword = 'Password oublié ?';
$lang->user->score = 'Score';
$lang->user->name = 'Name';
$lang->user->type = 'User Type';
$lang->user->cropAvatar = 'Crop Avatar';
$lang->user->cropAvatarTip = 'Drag and drop the box to select the image clipping range.';
$lang->user->cropImageTip = 'The image used is too small, the recommended image size is at least 48x48, the current image size is %s';
@@ -145,6 +146,9 @@ $lang->user->genderList['f'] = 'Femme';
$lang->user->thirdPerson['m'] = 'lui';
$lang->user->thirdPerson['f'] = 'lui';
$lang->user->typeList['inside'] = $lang->user->inside;
$lang->user->typeList['outside'] = $lang->user->outside;
$lang->user->passwordStrengthList[0] = "<span style='color:red'>Faible</span>";
$lang->user->passwordStrengthList[1] = "<span style='color:#000'>Bon</span>";
$lang->user->passwordStrengthList[2] = "<span style='color:green'>Fort</span>";
+4
View File
@@ -52,6 +52,7 @@ $lang->user->verifyPassword = 'Mật khẩu';
$lang->user->resetPassword = 'Quên mật khẩu?';
$lang->user->score = 'Điểm';
$lang->user->name = 'Name';
$lang->user->type = 'User Type';
$lang->user->cropAvatar = 'Crop Avatar';
$lang->user->cropAvatarTip = 'Drag and drop the box to select the image clipping range.';
$lang->user->cropImageTip = 'The image used is too small, the recommended image size is at least 48x48, the current image size is %s';
@@ -145,6 +146,9 @@ $lang->user->genderList['f'] = 'Nữ';
$lang->user->thirdPerson['m'] = 'anh ấy';
$lang->user->thirdPerson['f'] = 'cô ấy';
$lang->user->typeList['inside'] = $lang->user->inside;
$lang->user->typeList['outside'] = $lang->user->outside;
$lang->user->passwordStrengthList[0] = "<span style='color:red'>Yếu</span>";
$lang->user->passwordStrengthList[1] = "<span style='color:#000'>Tốt</span>";
$lang->user->passwordStrengthList[2] = "<span style='color:green'>Mạnh</span>";
+5
View File
@@ -52,6 +52,7 @@ $lang->user->verifyPassword = '您的密码';
$lang->user->resetPassword = '忘记密码';
$lang->user->score = '积分';
$lang->user->name = '名称';
$lang->user->type = '用户类型';
$lang->user->cropAvatar = '剪切头像';
$lang->user->cropAvatarTip = '拖拽选框来选择头像剪切范围';
$lang->user->cropImageTip = '所使用的头像图片过小,建议图片大小至少为 48x48,当前图片大小为 %s';
@@ -145,6 +146,9 @@ $lang->user->genderList['f'] = '女';
$lang->user->thirdPerson['m'] = '他';
$lang->user->thirdPerson['f'] = '她';
$lang->user->typeList['inside'] = $lang->user->inside;
$lang->user->typeList['outside'] = $lang->user->outside;
$lang->user->passwordStrengthList[0] = "<span style='color:red'>弱</span>";
$lang->user->passwordStrengthList[1] = "<span style='color:#000'>中</span>";
$lang->user->passwordStrengthList[2] = "<span style='color:green'>强</span>";
@@ -200,6 +204,7 @@ $lang->user->error->dangerPassword = "【ID %s】的密码不能使用【%s】
$lang->user->error->verifyPassword = "验证失败,请检查您的系统登录密码是否正确";
$lang->user->error->originalPassword = "原密码不正确";
$lang->user->error->companyEmpty = "公司名称不能为空!";
$lang->user->contactFieldList['phone'] = $lang->user->phone;
$lang->user->contactFieldList['mobile'] = $lang->user->mobile;
+4
View File
@@ -52,6 +52,7 @@ $lang->user->verifyPassword = '您的密碼';
$lang->user->resetPassword = '忘記密碼';
$lang->user->score = '積分';
$lang->user->name = '名稱';
$lang->user->type = '用戶類型';
$lang->user->cropAvatar = '剪切頭像';
$lang->user->cropAvatarTip = '拖拽選框來選擇頭像剪切範圍';
$lang->user->cropImageTip = '所使用的頭像圖片過小,建議圖片大小至少為 48x48,當前圖片大小為 %s';
@@ -145,6 +146,9 @@ $lang->user->genderList['f'] = '女';
$lang->user->thirdPerson['m'] = '他';
$lang->user->thirdPerson['f'] = '她';
$lang->user->typeList['inside'] = $lang->user->inside;
$lang->user->typeList['outside'] = $lang->user->outside;
$lang->user->passwordStrengthList[0] = "<span style='color:red'>弱</span>";
$lang->user->passwordStrengthList[1] = "<span style='color:#000'>中</span>";
$lang->user->passwordStrengthList[2] = "<span style='color:green'>強</span>";
+37 -4
View File
@@ -241,12 +241,13 @@ class userModel extends model
if(strtolower($_POST['account']) == 'guest') return false;
$user = fixer::input('post')
->setDefault('join', '0000-00-00' )
->setDefault('type', 'inside' )
->setDefault('join', '0000-00-00')
->setDefault('type', 'inside')
->setDefault('company', 0)
->setIF($this->post->password1 != false, 'password', substr($this->post->password1, 0, 32))
->setIF($this->post->password1 == false, 'password', '')
->setIF($this->post->email != false, 'email', trim($this->post->email))
->remove('group, password1, password2, verifyPassword, passwordStrength')
->remove('new, group, password1, password2, verifyPassword, passwordStrength')
->get();
if(empty($_POST['verifyPassword']) or $this->post->verifyPassword != md5($this->app->user->password . $this->session->rand))
@@ -255,6 +256,21 @@ class userModel extends model
return false;
}
if(isset($_POST['new']))
{
if(empty($user->company))
{
dao::$errors['company'][] = $this->lang->user->error->companyEmpty;
return false;
}
$company = new stdClass();
$company->name = $user->company;
$this->dao->insert(TABLE_COMPANY)->data($company)->exec();
$user->company = $this->dao->lastInsertID();
}
$this->dao->insert(TABLE_USER)->data($user)
->autoCheck()
->batchCheck($this->config->user->create->requiredFields, 'notempty')
@@ -423,7 +439,7 @@ class userModel extends model
->setDefault('join', '0000-00-00')
->setIF($this->post->password1 != false, 'password', substr($this->post->password1, 0, 32))
->setIF($this->post->email != false, 'email', trim($this->post->email))
->remove('password1, password2, groups,verifyPassword, passwordStrength')
->remove('new, password1, password2, groups,verifyPassword, passwordStrength')
->get();
if(empty($_POST['verifyPassword']) or $this->post->verifyPassword != md5($this->app->user->password . $this->session->rand))
@@ -431,6 +447,22 @@ class userModel extends model
dao::$errors['verifyPassword'][] = $this->lang->user->error->verifyPassword;
return false;
}
if(isset($_POST['new']))
{
if(empty($user->company))
{
dao::$errors['company'][] = $this->lang->user->error->companyEmpty;
return false;
}
$company = new stdClass();
$company->name = $user->company;
$this->dao->insert(TABLE_COMPANY)->data($company)->exec();
$user->company = $this->dao->lastInsertID();
}
$requiredFields = array();
foreach(explode(',', $this->config->user->edit->requiredFields) as $field)
{
@@ -536,6 +568,7 @@ class userModel extends model
$users[$id]['realname'] = $data->realname[$id];
$users[$id]['commiter'] = $data->commiter[$id];
$users[$id]['email'] = $data->email[$id];
$users[$id]['type'] = $data->type[$id];
$users[$id]['join'] = $data->join[$id];
$users[$id]['skype'] = $data->skype[$id];
$users[$id]['qq'] = $data->qq[$id];
+3
View File
@@ -49,6 +49,7 @@
<th class='<?php echo $minWidth?> required'><?php echo $lang->user->account;?></th>
<th class='<?php echo $minWidth?> required'><?php echo $lang->user->realname;?></th>
<th class='w-120px'><?php echo $lang->user->role;?></th>
<th class='w-120px'><?php echo $lang->user->type;?></th>
<th class='<?php echo $minWidth . zget($visibleFields, 'commiter', ' hidden')?>'><?php echo $lang->user->commiter;?></th>
<th class='<?php echo $minWidth . zget($visibleFields, 'email', ' hidden')?>'> <?php echo $lang->user->email;?></th>
<th class='w-120px<?php echo zget($visibleFields, 'join', ' hidden')?>'> <?php echo $lang->user->join;?></th>
@@ -72,6 +73,7 @@
<?php
$dept = ($first and empty($user->dept)) ? 0 : (empty($user->dept) ? 'ditto' : $user->dept);
$role = ($first and empty($user->role)) ? 0 : (empty($user->role) ? 'ditto' : $user->role);
$type = empty($user->type) ? 'inside' : $user->type;
$first = false;
?>
<tr class='text-center'>
@@ -80,6 +82,7 @@
<td><?php echo html::input("account[$user->id]", $user->account, "class='form-control'");?></td>
<td><?php echo html::input("realname[$user->id]", $user->realname, "class='form-control'");?></td>
<td><?php echo html::select("role[$user->id]", $lang->user->roleList, $role, "class='form-control'");?></td>
<td><?php echo html::select("type[$user->id]", $lang->user->typeList, $type, "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'commiter', 'hidden')?>'><?php echo html::input("commiter[$user->id]", $user->commiter, "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'email', 'hidden')?>'> <?php echo html::input("email[$user->id]", $user->email, "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'join', 'hidden')?>'> <?php echo html::input("join[$user->id]", $user->join, "class='form-control form-date'");?></td>
+13
View File
@@ -24,6 +24,19 @@
<form class="load-indicator main-form form-ajax" id="createForm" method="post" target='hiddenwin'>
<table align='center' class="table table-form">
<?php $thClass = common::checkNotCN() ? 'w-enVerifyPassword' : 'w-verifyPassword';?>
<tr>
<th class='<?php echo $thClass?>'><?php echo $lang->user->type;?></th>
<td colspan='2'><?php echo html::radio('type', $lang->user->typeList , 'inside', "onclick='changeType(this.value)'");?></td>
</tr>
<tr id='companyBox' class='hide'>
<th><?php echo $lang->user->company;?></th>
<td>
<div class='input-group'>
<?php echo html::select('company', $companies, '', "class='form-control chosen'");?>
<span class='input-group-addon'><?php echo html::checkBox('new', $lang->company->create);?></span>
</div>
</td>
</tr>
<tr>
<th class='<?php echo $thClass?>'><?php echo $lang->user->dept;?></th>
<td class='w-p40'><?php echo html::select('dept', $depts, $deptID, "class='form-control chosen'");?></td>
+16 -7
View File
@@ -13,6 +13,7 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php js::import($jsRoot . 'md5.js');?>
<?php js::set('type', $user->type);?>
<div id="mainContent" class="main-content">
<div class="center-block">
<div class="main-header">
@@ -28,22 +29,30 @@
<tr>
<th class='w-140px'><?php echo $lang->user->realname;?></th>
<td class='w-p40'><?php echo html::input('realname', $user->realname, "class='form-control'");?></td>
<th class='w-130px'><?php echo $lang->user->join;?></th>
<td><?php echo html::input('join', formatTime($user->join), "class='form-control form-date'");?></td>
<th class='w-130px'><?php echo $lang->user->role;?></th>
<td><?php echo html::select('role', $lang->user->roleList, $user->role, "class='form-control'");?></td>
</tr>
<tr>
<th class='w-140px'><?php echo $lang->user->dept;?></th>
<td class='w-p40'><?php echo html::select('dept', $depts, $user->dept, "class='form-control chosen'");?></td>
<th><?php echo $lang->user->role;?></th>
<td><?php echo html::select('role', $lang->user->roleList, $user->role, "class='form-control'");?></td>
<th><?php echo $lang->user->join;?></th>
<td><?php echo html::input('join', formatTime($user->join), "class='form-control form-date'");?></td>
</tr>
<tr>
<th><?php echo $lang->group->priv;?></th>
<td colspan='3'><?php echo html::select('groups[]', $groups, $userGroups, 'size=3 multiple=multiple class="form-control chosen"');?></td>
<td><?php echo html::select('groups[]', $groups, $userGroups, 'size=3 multiple=multiple class="form-control chosen"');?></td>
<th><?php echo $lang->user->company;?></th>
<td>
<div class='input-group'>
<?php echo html::select('company', $companies, $user->company, "class='form-control chosen'");?>
<span class='input-group-addon'><?php echo html::checkBox('new', $lang->company->create);?></span>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->user->type;?></th>
<td><?php echo html::radio('type', $lang->user->typeList , $user->type, "onclick='changeType(this.value)'");?></td>
<th><?php echo $lang->user->gender;?></th>
<td colspan="3"><?php echo html::radio('gender', (array)$lang->user->genderList, $user->gender);?></td>
<td><?php echo html::radio('gender', (array)$lang->user->genderList, $user->gender);?></td>
</tr>
</table>
<table align='center' class='table table-form'>