doortts doortts 2016-02-06
site-setting: Add restriction message at sign-up page
If site setting 'signup.require.confirm = true' is used,
show restricted condition message and site admin email for contact

And also, admin email is obfuscated
@e9a2dd6d626197098ec5ddf0e0a3f489408b852e
app/assets/stylesheets/less/_page.less
--- app/assets/stylesheets/less/_page.less
+++ app/assets/stylesheets/less/_page.less
@@ -1448,7 +1448,7 @@
 //---- sign up
 .signup-form-wrap {
     width: 400px;
-    margin-top: 54px;
+    margin-top: 14px;
     .center-block;
 
     .text {
@@ -6397,3 +6397,7 @@
     }
 }
 
+.obfuscate {
+    unicode-bidi: bidi-override;
+    direction: rtl;
+}
app/controllers/UserApp.java
--- app/controllers/UserApp.java
+++ app/controllers/UserApp.java
@@ -818,7 +818,7 @@
         return User.anonymous;
     }
 
-    private static boolean isUseSignUpConfirm(){
+    public static boolean isUseSignUpConfirm(){
         Configuration config = play.Play.application().configuration();
         String useSignUpConfirm = config.getString("signup.require.confirm");
         return useSignUpConfirm != null && useSignUpConfirm.equals("true");
app/views/user/signup.scala.html
--- app/views/user/signup.scala.html
+++ app/views/user/signup.scala.html
@@ -31,6 +31,12 @@
     <p class="tag-line">@Messages("app.description")</p>
   </div>
 
+  @if(UserApp.isUseSignUpConfirm){
+    <div class="center-txt">
+      <p>@Messages("title.signupConfirmDesc")</p>
+      <p>@Html(Messages("title.signupConfirmDesc2", new StringBuilder(User.findByLoginId(SiteAdmin.SITEADMIN_DEFAULT_LOGINID).email).reverse().toString()))</p>
+    </div>
+  }
   <div class="signup-form-wrap frm-wrap">
     <form action="@routes.UserApp.newUser()" method="post" name="signup">
       <dl>
conf/messages
--- conf/messages
+++ conf/messages
@@ -887,6 +887,8 @@
 title.sendMail = Send email
 title.signup = Sign up
 title.signupFor = Sign up for <span class="highlight">{0}</span>
+title.signupConfirmDesc = It is required admission of admin for activation.
+title.signupConfirmDesc2 = If you needed, contact to <span class="obfuscate">{0}</span>
 title.siteSetting = Site settings
 title.text = Title
 title.unlimitedProjects = Project/Organization based work
conf/messages.ko-KR
--- conf/messages.ko-KR
+++ conf/messages.ko-KR
@@ -880,6 +880,8 @@
 title.sendMail = 메일 발송
 title.signup = 멤버 가입
 title.signupFor = <span class="highlight">{0}</span> 멤버 가입
+title.signupConfirmDesc = 가입 후 사용을 위해서는 관리자의 승인이 필요합니다
+title.signupConfirmDesc2 = <span class="obfuscate">{0}</span>으로 문의하세요
 title.siteSetting = 사이트 설정
 title.text = 제목
 title.unlimitedProjects = 프로젝트/그룹 기반으로 작업
Add a comment
List