register
This commit is contained in:
124
maxkey-core/src/main/java/org/maxkey/entity/Register.java
Normal file
124
maxkey-core/src/main/java/org/maxkey/entity/Register.java
Normal file
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
* Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
package org.maxkey.entity;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseEntity;
|
||||
|
||||
public class Register extends JpaBaseEntity{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -4021412077583763378L;
|
||||
private String id;
|
||||
private String displayName;
|
||||
private String workEmail;
|
||||
private String workPhone;
|
||||
private Integer employees;
|
||||
|
||||
//机构
|
||||
private String instId;
|
||||
private String instName;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public Register() {
|
||||
super();
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public void setDisplayName(String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public String getWorkEmail() {
|
||||
return workEmail;
|
||||
}
|
||||
|
||||
public void setWorkEmail(String workEmail) {
|
||||
this.workEmail = workEmail;
|
||||
}
|
||||
|
||||
public String getWorkPhone() {
|
||||
return workPhone;
|
||||
}
|
||||
|
||||
public void setWorkPhone(String workPhone) {
|
||||
this.workPhone = workPhone;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Integer getEmployees() {
|
||||
return employees;
|
||||
}
|
||||
|
||||
public void setEmployees(Integer employees) {
|
||||
this.employees = employees;
|
||||
}
|
||||
|
||||
public String getInstId() {
|
||||
return instId;
|
||||
}
|
||||
|
||||
public void setInstId(String instId) {
|
||||
this.instId = instId;
|
||||
}
|
||||
|
||||
public String getInstName() {
|
||||
return instName;
|
||||
}
|
||||
|
||||
public void setInstName(String instName) {
|
||||
this.instName = instName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("Registration [id=");
|
||||
builder.append(id);
|
||||
builder.append(", displayName=");
|
||||
builder.append(displayName);
|
||||
builder.append(", workEmail=");
|
||||
builder.append(workEmail);
|
||||
builder.append(", workPhone=");
|
||||
builder.append(workPhone);
|
||||
builder.append(", employees=");
|
||||
builder.append(employees);
|
||||
builder.append(", instId=");
|
||||
builder.append(instId);
|
||||
builder.append(", instName=");
|
||||
builder.append(instName);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,212 +0,0 @@
|
||||
/*
|
||||
* Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
package org.maxkey.entity;
|
||||
|
||||
import javax.persistence.Column;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseEntity;
|
||||
|
||||
public class Registration extends JpaBaseEntity{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -4021412077583763378L;
|
||||
private String id;
|
||||
private String loginName;
|
||||
private String workEmail;
|
||||
private String company;
|
||||
private String workPhone;
|
||||
private String nickName;
|
||||
private String lastName;//familyName
|
||||
private String firstName;//givenName
|
||||
private Integer users;
|
||||
@Column
|
||||
private String instId;
|
||||
|
||||
private String instName;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public Registration() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the id
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id the id to set
|
||||
*/
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the loginName
|
||||
*/
|
||||
public String getLoginName() {
|
||||
return loginName;
|
||||
}
|
||||
/**
|
||||
* @param loginName the loginName to set
|
||||
*/
|
||||
public void setLoginName(String loginName) {
|
||||
this.loginName = loginName;
|
||||
}
|
||||
/**
|
||||
* @return the workEmail
|
||||
*/
|
||||
public String getWorkEmail() {
|
||||
return workEmail;
|
||||
}
|
||||
/**
|
||||
* @param workEmail the workEmail to set
|
||||
*/
|
||||
public void setWorkEmail(String workEmail) {
|
||||
this.workEmail = workEmail;
|
||||
}
|
||||
/**
|
||||
* @return the company
|
||||
*/
|
||||
public String getCompany() {
|
||||
return company;
|
||||
}
|
||||
/**
|
||||
* @param company the company to set
|
||||
*/
|
||||
public void setCompany(String company) {
|
||||
this.company = company;
|
||||
}
|
||||
/**
|
||||
* @return the workPhone
|
||||
*/
|
||||
public String getWorkPhone() {
|
||||
return workPhone;
|
||||
}
|
||||
/**
|
||||
* @param workPhone the workPhone to set
|
||||
*/
|
||||
public void setWorkPhone(String workPhone) {
|
||||
this.workPhone = workPhone;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the nickName
|
||||
*/
|
||||
public String getNickName() {
|
||||
return nickName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param nickName the nickName to set
|
||||
*/
|
||||
public void setNickName(String nickName) {
|
||||
this.nickName = nickName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the users
|
||||
*/
|
||||
public Integer getUsers() {
|
||||
return users;
|
||||
}
|
||||
/**
|
||||
* @param users the users to set
|
||||
*/
|
||||
public void setUsers(Integer users) {
|
||||
this.users = users;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the lastName
|
||||
*/
|
||||
public String getLastName() {
|
||||
return lastName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lastName the lastName to set
|
||||
*/
|
||||
public void setLastName(String lastName) {
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the firstName
|
||||
*/
|
||||
public String getFirstName() {
|
||||
return firstName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param firstName the firstName to set
|
||||
*/
|
||||
public void setFirstName(String firstName) {
|
||||
this.firstName = firstName;
|
||||
}
|
||||
|
||||
public String getInstId() {
|
||||
return instId;
|
||||
}
|
||||
|
||||
public void setInstId(String instId) {
|
||||
this.instId = instId;
|
||||
}
|
||||
|
||||
public String getInstName() {
|
||||
return instName;
|
||||
}
|
||||
|
||||
public void setInstName(String instName) {
|
||||
this.instName = instName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("Registration [id=");
|
||||
builder.append(id);
|
||||
builder.append(", loginName=");
|
||||
builder.append(loginName);
|
||||
builder.append(", workEmail=");
|
||||
builder.append(workEmail);
|
||||
builder.append(", company=");
|
||||
builder.append(company);
|
||||
builder.append(", workPhone=");
|
||||
builder.append(workPhone);
|
||||
builder.append(", nickName=");
|
||||
builder.append(nickName);
|
||||
builder.append(", lastName=");
|
||||
builder.append(lastName);
|
||||
builder.append(", firstName=");
|
||||
builder.append(firstName);
|
||||
builder.append(", users=");
|
||||
builder.append(users);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -23,7 +23,7 @@ package org.maxkey.persistence.mapper;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
|
||||
import org.maxkey.entity.Registration;
|
||||
import org.maxkey.entity.Register;
|
||||
import org.maxkey.entity.UserInfo;
|
||||
|
||||
/**
|
||||
@@ -31,9 +31,9 @@ import org.maxkey.entity.UserInfo;
|
||||
*
|
||||
*/
|
||||
|
||||
public interface RegistrationMapper extends IJpaBaseMapper<Registration> {
|
||||
public interface RegisterMapper extends IJpaBaseMapper<Register> {
|
||||
|
||||
|
||||
public List<UserInfo> queryUserInfoByEmail(String email);
|
||||
public List<UserInfo> findByEmail(String email);
|
||||
|
||||
}
|
||||
@@ -20,29 +20,29 @@ package org.maxkey.persistence.service;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.entity.Registration;
|
||||
import org.maxkey.entity.Register;
|
||||
import org.maxkey.entity.UserInfo;
|
||||
import org.maxkey.persistence.mapper.RegistrationMapper;
|
||||
import org.maxkey.persistence.mapper.RegisterMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public class RegistrationService extends JpaBaseService<Registration>{
|
||||
public class RegisterService extends JpaBaseService<Register>{
|
||||
|
||||
public RegistrationService() {
|
||||
super(RegistrationMapper.class);
|
||||
public RegisterService() {
|
||||
super(RegisterMapper.class);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.connsec.db.service.BaseService#getMapper()
|
||||
*/
|
||||
@Override
|
||||
public RegistrationMapper getMapper() {
|
||||
return (RegistrationMapper)super.getMapper();
|
||||
public RegisterMapper getMapper() {
|
||||
return (RegisterMapper)super.getMapper();
|
||||
}
|
||||
|
||||
|
||||
public UserInfo queryUserInfoByEmail(String email){
|
||||
List<UserInfo> listUserInfo=getMapper().queryUserInfoByEmail(email);
|
||||
public UserInfo findByEmail(String email){
|
||||
List<UserInfo> listUserInfo=getMapper().findByEmail(email);
|
||||
return listUserInfo.size()>0?listUserInfo.get(0):null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.maxkey.persistence.mapper.RegisterMapper">
|
||||
|
||||
<select id="findByEmail" parameterType="string" resultType="UserInfo">
|
||||
select
|
||||
id,
|
||||
workemail
|
||||
from
|
||||
mxk_register
|
||||
where
|
||||
workemail = #{value}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.maxkey.persistence.mapper.RegistrationMapper">
|
||||
|
||||
<select id="queryUserInfoByEmail" parameterType="string" resultType="UserInfo">
|
||||
select
|
||||
id,
|
||||
email
|
||||
from
|
||||
userinfo
|
||||
where
|
||||
email = #{value}
|
||||
union
|
||||
select
|
||||
id,
|
||||
workemail eamil
|
||||
from
|
||||
mxk_registration
|
||||
where
|
||||
workemail = #{value}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -28,9 +28,9 @@ import org.apache.ibatis.session.SqlSessionFactory;
|
||||
import org.maxkey.configuration.ApplicationConfig;
|
||||
import org.maxkey.constants.ConstantsStatus;
|
||||
import org.maxkey.crypto.password.PasswordReciprocal;
|
||||
import org.maxkey.entity.Registration;
|
||||
import org.maxkey.entity.Register;
|
||||
import org.maxkey.entity.UserInfo;
|
||||
import org.maxkey.persistence.service.RegistrationService;
|
||||
import org.maxkey.persistence.service.RegisterService;
|
||||
import org.maxkey.persistence.service.UserInfoService;
|
||||
import org.maxkey.util.DateUtils;
|
||||
import org.maxkey.util.StringUtils;
|
||||
@@ -43,8 +43,10 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
@@ -52,12 +54,12 @@ import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
|
||||
@Controller
|
||||
@RequestMapping(value={"/registration"})
|
||||
public class RegistrationController {
|
||||
private static Logger _logger = LoggerFactory.getLogger(RegistrationController.class);
|
||||
@RequestMapping(value={"/signup"})
|
||||
public class RegisterController {
|
||||
private static Logger _logger = LoggerFactory.getLogger(RegisterController.class);
|
||||
|
||||
@Autowired
|
||||
RegistrationService registrationService;
|
||||
RegisterService registerService;
|
||||
|
||||
@Autowired
|
||||
@Qualifier("applicationConfig")
|
||||
@@ -73,29 +75,35 @@ public class RegistrationController {
|
||||
|
||||
@RequestMapping(value={"/forward"})
|
||||
public ModelAndView forward() {
|
||||
_logger.debug("Registration /registration/register.");
|
||||
return new ModelAndView("registration/register");
|
||||
_logger.debug("register /register/register.");
|
||||
return new ModelAndView("register/register");
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/forward/email"})
|
||||
public ModelAndView forwardEmail() {
|
||||
_logger.debug("register /register/register.");
|
||||
return new ModelAndView("register/registerInst");
|
||||
}
|
||||
|
||||
//邮件验证注册
|
||||
@RequestMapping(value={"/register"})
|
||||
public ModelAndView reg(@ModelAttribute("registration") Registration registration) {
|
||||
_logger.debug("Registration /registration/register.");
|
||||
_logger.debug(""+registration);
|
||||
ModelAndView modelAndView= new ModelAndView("registration/registered");
|
||||
public ModelAndView reg(@ModelAttribute("register") Register register) {
|
||||
_logger.debug("register /register/register.");
|
||||
_logger.debug(""+register);
|
||||
ModelAndView modelAndView= new ModelAndView("register/registered");
|
||||
|
||||
UserInfo userInfo =registrationService.queryUserInfoByEmail(registration.getWorkEmail());
|
||||
UserInfo userInfo = registerService.findByEmail(register.getWorkEmail());
|
||||
|
||||
if(userInfo!=null){
|
||||
modelAndView.addObject("registered", 1);
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
registration.setId(registration.generateId());
|
||||
registrationService.insert(registration);
|
||||
register.setId(register.generateId());
|
||||
registerService.insert(register);
|
||||
HtmlEmail email = new HtmlEmail();
|
||||
|
||||
try {
|
||||
try {
|
||||
email.setHostName(applicationConfig.getEmailConfig().getSmtpHost());
|
||||
email.setSmtpPort(applicationConfig.getEmailConfig().getPort());
|
||||
email.setAuthenticator(new DefaultAuthenticator(
|
||||
@@ -103,11 +111,11 @@ public class RegistrationController {
|
||||
applicationConfig.getEmailConfig().getPassword()
|
||||
));
|
||||
|
||||
email.addTo(registration.getWorkEmail(), registration.getLastName()+registration.getFirstName());
|
||||
email.addTo(register.getWorkEmail(), register.getDisplayName());
|
||||
email.setFrom(applicationConfig.getEmailConfig().getSender(), "MaxKey");
|
||||
email.setSubject("MaxKey Identity & Access Registration activate Email .");
|
||||
|
||||
String activateUrl=WebContext.getHttpContextPath()+"/registration/forward/activate/"+registration.getId();
|
||||
String activateUrl=WebContext.getHttpContextPath()+"/register/forward/activate/"+register.getId();
|
||||
|
||||
|
||||
// set the html message
|
||||
@@ -125,43 +133,41 @@ public class RegistrationController {
|
||||
} catch (EmailException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
modelAndView.addObject("registered", 0);
|
||||
modelAndView.addObject("registered", 0);
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/forward/activate/{id}"})
|
||||
@GetMapping(value={"/forward/activate/{id}"})
|
||||
public ModelAndView confirm(@PathVariable("id") String id) {
|
||||
_logger.debug("Registration /registration/forward/activate.");
|
||||
Registration registration=registrationService.get(id);
|
||||
ModelAndView mav=new ModelAndView("registration/activate");
|
||||
if(registration!=null){
|
||||
mav.addObject("model", registration);
|
||||
_logger.debug("register /register/forward/activate.");
|
||||
Register register=registerService.get(id);
|
||||
ModelAndView mav=new ModelAndView("register/activate");
|
||||
if(register!=null){
|
||||
mav.addObject("model", register);
|
||||
}
|
||||
|
||||
return mav;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value={"/activate/{id}"})
|
||||
@PostMapping(value={"/activate/{id}"})
|
||||
public ModelAndView setPassWord(@PathVariable("id") String id,
|
||||
@RequestParam String password,
|
||||
@RequestParam String confirmpassword) {
|
||||
_logger.debug("Registration /registration/setpassword.");
|
||||
ModelAndView modelAndView=new ModelAndView("registration/activated");
|
||||
_logger.debug("register /register/setpassword.");
|
||||
ModelAndView modelAndView=new ModelAndView("register/activated");
|
||||
if(password.equals(confirmpassword)){
|
||||
Registration registration=registrationService.get(id);
|
||||
if(registration!=null){
|
||||
Register register=registerService.get(id);
|
||||
if(register!=null){
|
||||
SqlSession sqlSession = SqlSessionUtils.getSqlSession(
|
||||
WebContext.getBean("sqlSessionFactory",SqlSessionFactory.class));
|
||||
sqlSession.commit(false);
|
||||
|
||||
UserInfo userInfo=new UserInfo();
|
||||
userInfo.setUsername(registration.getWorkEmail());
|
||||
userInfo.setFamilyName(registration.getLastName());
|
||||
userInfo.setGivenName(registration.getFirstName());
|
||||
userInfo.setUsername(register.getWorkEmail());
|
||||
userInfo.setDisplayName(register.getDisplayName());
|
||||
|
||||
userInfo.setWorkPhoneNumber(registration.getWorkPhone());
|
||||
userInfo.setEmail(registration.getWorkEmail());
|
||||
userInfo.setWorkPhoneNumber(register.getWorkPhone());
|
||||
userInfo.setEmail(register.getWorkEmail());
|
||||
userInfo.setStatus(ConstantsStatus.ACTIVE);
|
||||
userInfo.setDecipherable(PasswordReciprocal.getInstance().encode(password));
|
||||
|
||||
@@ -173,7 +179,7 @@ public class RegistrationController {
|
||||
userInfo.setPasswordLastSetTime(DateUtils.format(new Date(), DateUtils.FORMAT_DATE_YYYY_MM_DD_HH_MM_SS));
|
||||
userInfoService.insert(userInfo);
|
||||
|
||||
registrationService.remove(id);
|
||||
registerService.remove(id);
|
||||
sqlSession.commit(true);
|
||||
modelAndView.addObject("activate", 1);
|
||||
}else{
|
||||
@@ -189,28 +195,36 @@ public class RegistrationController {
|
||||
@RequestMapping(value={"/registeron"})
|
||||
@ResponseBody
|
||||
public Message registeron(UserInfo userInfo,@RequestParam String emailMobile) throws ServletException, IOException {
|
||||
|
||||
if(StringUtils.isEmpty(emailMobile)) {
|
||||
return new Message(WebContext.getI18nValue("register.emailMobile.error"),"1");
|
||||
}
|
||||
|
||||
if(StringUtils.isValidEmail(emailMobile)) {
|
||||
userInfo.setEmail(emailMobile);
|
||||
}
|
||||
|
||||
if(StringUtils.isValidMobileNo(emailMobile)) {
|
||||
userInfo.setMobile(emailMobile);
|
||||
}
|
||||
|
||||
if(!(StringUtils.isValidEmail(emailMobile)||StringUtils.isValidMobileNo(emailMobile))) {
|
||||
return new Message(WebContext.getI18nValue("register.emailMobile.error"),"1");
|
||||
}
|
||||
UserInfo temp=userInfoService.findByEmailMobile(emailMobile);
|
||||
|
||||
UserInfo temp = userInfoService.findByEmailMobile(emailMobile);
|
||||
|
||||
if(temp!=null) {
|
||||
return new Message(WebContext.getI18nValue("register.emailMobile.exist"),"1");
|
||||
}
|
||||
|
||||
temp=userInfoService.findByUsername(userInfo.getUsername());
|
||||
temp = userInfoService.findByUsername(userInfo.getUsername());
|
||||
if(temp!=null) {
|
||||
return new Message(WebContext.getI18nValue("register.user.error"),"1");
|
||||
}
|
||||
|
||||
userInfo.setStatus(ConstantsStatus.ACTIVE);
|
||||
|
||||
if(userInfoService.insert(userInfo)) {
|
||||
return new Message(WebContext.getI18nValue("login.text.register.success"),"0");
|
||||
}
|
||||
@@ -72,6 +72,16 @@ login.text.register.error=\u6CE8\u518C\u5931\u8D25
|
||||
register.user.error=\u767B\u9646\u8D26\u53F7\u5DF2\u5B58\u5728
|
||||
register.emailMobile.error=\u90AE\u7BB1\u6216\u624B\u673A\u683C\u5F0F\u9519\u8BEF
|
||||
register.emailMobile.exist=\u90AE\u7BB1\u6216\u624B\u673A\u5DF2\u5B58\u5728
|
||||
register.displayName=\u59D3\u540D
|
||||
register.workEmail=\u7535\u5B50\u90AE\u4EF6
|
||||
register.workPhone=\u624B\u673A
|
||||
register.instName=\u516C\u53F8
|
||||
register.employees=\u5458\u5DE5
|
||||
register.employees.20=1-20\u540D\u5458\u5DE5
|
||||
register.employees.100=20-100\u540D\u5458\u5DE5
|
||||
register.employees.500=100-500\u540D\u5458\u5DE5
|
||||
register.employees.1000=500-1000\u540D\u5458\u5DE5
|
||||
register.employees.2000=\u8D85\u8FC71000\u540D\u5458\u5DE5
|
||||
|
||||
login.password.expired=\u5BC6\u7801\u8FC7\u671F
|
||||
login.password.expired.tip=\u5BC6\u7801\u8FC7\u671F\uFF0C\u8BF7\u4FEE\u6539\u5BC6\u7801
|
||||
|
||||
@@ -71,6 +71,16 @@ login.text.register.error=Register error
|
||||
register.user.error=username exist
|
||||
register.emailMobile.error=email or mobile error
|
||||
register.emailMobile.exist=email or mobile exist
|
||||
register.displayName=Name
|
||||
register.workEmail=Email
|
||||
register.workPhone=Phone
|
||||
register.instName=Company
|
||||
register.employees=Employees
|
||||
register.employees.20=1-20 Employees
|
||||
register.employees.100=20-100 Employees
|
||||
register.employees.500=100-500 Employees
|
||||
register.employees.1000=500-1000 Employees
|
||||
register.employees.2000=1000 + Employees
|
||||
|
||||
login.password.expired=Password Expired
|
||||
login.password.expired.tip=Password expired, please change password
|
||||
|
||||
@@ -72,6 +72,16 @@ login.text.register.error=\u6CE8\u518C\u5931\u8D25
|
||||
register.user.error=\u767B\u9646\u8D26\u53F7\u5DF2\u5B58\u5728
|
||||
register.emailMobile.error=\u90AE\u7BB1\u6216\u624B\u673A\u683C\u5F0F\u9519\u8BEF
|
||||
register.emailMobile.exist=\u90AE\u7BB1\u6216\u624B\u673A\u5DF2\u5B58\u5728
|
||||
register.displayName=\u59D3\u540D
|
||||
register.workEmail=\u7535\u5B50\u90AE\u4EF6
|
||||
register.workPhone=\u624B\u673A
|
||||
register.instName=\u516C\u53F8
|
||||
register.employees=\u5458\u5DE5
|
||||
register.employees.20=1-20\u540D\u5458\u5DE5
|
||||
register.employees.100=20-100\u540D\u5458\u5DE5
|
||||
register.employees.500=100-500\u540D\u5458\u5DE5
|
||||
register.employees.1000=500-1000\u540D\u5458\u5DE5
|
||||
register.employees.2000=\u8D85\u8FC71000\u540D\u5458\u5DE5
|
||||
|
||||
login.password.expired=\u5BC6\u7801\u8FC7\u671F
|
||||
login.password.expired.tip=\u5BC6\u7801\u8FC7\u671F\uFF0C\u8BF7\u4FEE\u6539\u5BC6\u7801
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="register"><a href="<@base />/registration/forward"><div><@locale code="login.text.register"/></div></a></td>
|
||||
<td id="register"><a href="<@base />/signup/forward"><div><@locale code="login.text.register"/></div></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<div class="col-md-2"></div>
|
||||
<div class="col-md-8">
|
||||
<form id="actionForm"
|
||||
action="<@base/>/registration/registeron"
|
||||
action="<@base/>/register/registeron"
|
||||
forward="<@base/>/login"
|
||||
method="post" class="needs-validation" novalidate>
|
||||
<table class="table table-bordered">
|
||||
@@ -0,0 +1,66 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
|
||||
<#include "../layout/header.ftl">
|
||||
<#include "../layout/common.cssjs.ftl">
|
||||
</head>
|
||||
<body >
|
||||
<div id="top">
|
||||
<#include "../layout/nologintop.ftl">
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-2"></div>
|
||||
<div class="col-md-8">
|
||||
<form id="actionForm"
|
||||
action="<@base/>/register/register"
|
||||
forward="<@base/>/login"
|
||||
method="post" class="needs-validation" novalidate>
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td><@locale code="register.displayName"/></td>
|
||||
<td><input required="" class="form-control" type='text' id='displayName' name='displayName' tabindex="1"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><@locale code="register.workEmail"/></td>
|
||||
<td><input required="" type="text" id="workEmail" name="workEmail" class="form-control" title="" value="" tabindex="2"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><@locale code="register.workPhone"/></td>
|
||||
<td><input required="" type="text" id="workPhone" name="workPhone" class="form-control" title="" value="" tabindex="3"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><@locale code="register.instName"/></td>
|
||||
<td><input required="" class="form-control" type='text' id='instName' name='instName' tabindex="4"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><@locale code="register.employees"/></td>
|
||||
<td>
|
||||
<select class="form-control" name="employees" >
|
||||
<option value="20" selected ><@locale code="register.employees.20" /></option>
|
||||
<option value="100" ><@locale code="register.employees.100" /></option>
|
||||
<option value="500" ><@locale code="register.employees.500" /></option>
|
||||
<option value="1000" ><@locale code="register.employees.1000" /></option>
|
||||
<option value="2000" ><@locale code="register.employees.2000" /></option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><@locale code="login.text.captcha"/></td>
|
||||
<td><input required="" class="form-control" type='text' id="j_captcha" name="captcha" tabindex="6" value="" style="float: left;"/><img id="j_captchaimg" class="captcha-image" src="<@base/>/captcha"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><input class="button btn btn-lg btn-primary btn-block" type="submit" value="<@locale code="login.text.register" />"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-2"></div>
|
||||
</div >
|
||||
</div>
|
||||
<div id="footer">
|
||||
<#include "../layout/footer.ftl">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user