Jump to: navigation, search
MithiWiki Home > ConnectXf Home > ConnectXf Administration > Configuration > Customizing Landing or Home page of Baya(ConnectXf Version 3.12+)


Overview

  • On adding any domain to Connect Xf 3.12+, a default landing or home page is provided from where users can login to their accounts.
  • By default, these landing pages will show the login form where the user enters her user id and password. In addition custom links and support information is also shown to the users.
  • As an admin you can configure the home page as per your requirements.
  • You can either add / remove elements from the default home page or build a completely new home page and put in the different elements which allow user to login etc.
  • The following sections explain how you can
  • Add Baya login capabilities to any page, such that the page becomes the landing page for the web client Baya
  • Enable OTP for the login
  • Allow user sign in from the landing page
  • Show/hide the custom links
  • Show/hide the support information
  • You can also customize the login and sign-up forms as per your needs.

Working of the sign-in form

Sign-up form on different setups

  • Using the sign-up form on the home page, users can register themselves to create an account.
  • While home pages can be installed on any server in any setup, the following things have to be kept in mind:
  • For a multiple server setup with a single Master server, all the custom pages of all the domains on any server must use the web services on the Master server. This ensures that the directory data gets updated on the Master server and gets replicated to all the Slave servers.
  • For a setup where a single domain has users distributed across more than one mailbox location, the sign-up form will create users only for a single mailbox location (as it takes only a single COS).

Actions taken by system when a user signs up

  • The following actions are taken when a user sign up is successful:
  • A welcome mail is sent to newly added user
  • The welcome mail is also sent to the user's alternate email id.
  • A mail giving the details of the user creation is sent to the id as specified in the domain.
  • The following user properties are set:
  • company
  • homemobile
  • alternateemailaddess
  • addressbookvisibility

Installation

  • On installing Connect Xf 3.12, a default domain is created.
  • This domain will have the dedault landing or home page which can be customized as given below.

Upgrade

Upgrade from a LOWER version to Connect Xf 3.12

  • On upgrading to Connect Xf 3.12, the custom home pages of the domains which were configured for a prior version will stop working.
  • The custom home pages have to be recreated using the new framework before doing the actual upgrade. Steps to create a custom home page according to new framework are given below.
  • After upgrade just copy the custom home page to correct location and restart tomcat service.

Upgrade from Connect Xf 3.12 to a higher version

  • The custom home page will not be disturbed during the upgrade and will continue to work.

Configuration

Customizing the home page for a domain

  • 1. Design and create a html page which will be the landing page for Baya. This page can be created using any page building application such as Dreamweaver. Alternatively, you can also modify the default login page as per your needs.
  • 2. If you are creating a new page, then copy the html page to the following location (<domain_name> has to be replaced by the name of the domain):
/mithi/mcs/modules/mithi-mailclient/user/pl/webapp/webroot/Templates/<domain name>/<domain name>.html
  • 3. If you want to customize the default home page, then copy the page from
/mithi/mcs/modules/mithi-mailclient/user/pl/webapp/webroot/Templates/Login/Login.html 
to (<domain_name> has to be replaced by the name of the domain)
/mithi/mcs/modules/mithi-mailclient/user/pl/webapp/webroot/Templates/<domain name>/<domain name>.html
  • 4. Add or update login/sign and other home page functions to the page by following the instructions given in the sections below.

Adding the login form (without OTP) to the custom home page

  • 1. Place the following div element in the page.
  • 2. Add the following css to the head section of the page (if they are not already present)
<link rel="stylesheet" href="/dev/css/empty.css" id="domainthemeid" type="text/css"/>
<link rel="stylesheet" href="/dev/css/loginForm.css" type="text/css"/>
<link rel="stylesheet" href="/dev/css/validationEngine.jquery.css" type="text/css"/>
  • 3. Add the following js to the bottom of the page, just before the </html> tag (if not already present).
<script src="/dev/js/Placeholders.min.js" type="text/javascript" charset="utf-8"></script>	
  • 4. Copy the login form template from
/mithi/mcs/modules/mithi-mailclient/binconf/LoginFormTemplates/Template_DefaultLoginForm.html
to (replacing <domain> with the domain name)
/mithi/mcs/modules/mithi-mailclient/user/pl/webapp/webroot/Templates/<domain>/Template_DefaultLoginForm.html


  • 5. To initialize the login form add the following code to the bottom of the page just before the </html> tag.
Note: Replace <domain> with the domain name.
<script>
// The login form is now kept in template file, we will attach the form html code from that file.
// Following line will read the mentioned template file.

fillDomainInfoBean();

renderPageElements();

jQuery.get('/Templates/<domain>/Template_DefaultLoginForm.html',function(loginformdata)
{
   // Attach domain name to the name attribute of 'loginform' id.
   var dom = gup("domain");
   domain = dom;

   $("#loginform").attr("name",dom);
   // Attach read login form to the div loginform.  
   $("#loginform").html( loginformdata );
   initLoginPage();
});
</script>	

<script> 
$(window).load(function(){
   // Set domain data to the page.	
   initEnvironment();
});
</script>

Adding the login form with OTP to the custom login page

  • 1. Place the following div element on the page
  • 2. Add the following css to the head section of the page (if not already present)
<link rel="stylesheet" href="/dev/css/empty.css" id="domainthemeid" type="text/css"/>
<link rel="stylesheet" href="/dev/css/loginForm.css" type="text/css"/>
<link rel="stylesheet" href="/dev/css/validationEngine.jquery.css" type="text/css"/>	
  • 3. Add the following js to the bottom of the page just before the </html> tag (if not already present).
<script src="/dev/js/Placeholders.min.js" type="text/javascript" charset="utf-8"></script>	
  • 4. Copy the login form template from
/mithi/mcs/modules/mithi-mailclient/binconf/LoginFormTemplates/Template_DefaultOTPLoginForm.html
to (replacing <domain> with the domain name)
/mithi/mcs/modules/mithi-mailclient/user/pl/webapp/webroot/Templates/<domain>/Template_DefaultOTPLoginForm.html


  • 5. To initialize the login form add the following code to the bottom of the page just before the </html> tag (if not already present).
Note: Replace <domain> with the domain name.
<script>
// The login form is now kept in template file, we will attach the form html code from that file.
// Following line will read the mentioned template file.

fillDomainInfoBean();

renderPageElements();
jQuery.get('/Templates/<domain>/Template_DefaultOTPLoginForm.html',function(otploginformdata)
{
   // Attach domain name to the name attribute of 'loginform' id.
   var dom = gup("domain");
   domain = dom;

   $("#otploginform").attr("name",dom);
			
   // Attach read login form to the div loginform.
   $("#otploginform").html( loginformdata );
   initLoginPage();
});
</script>	

<script> 
$(window).load(function(){
   // Set domain data to the page.	
   initEnvironment();
});
</script>

Adding the sign-up form to the custom login page

  • 1. Enable the self sign-in feature for the domain by setting the following domain properties. The properties related to the sign-in form can be set from the Application View->Mailclient->Login->Domain stage of the Application Manager.


Domain Property Description
allowselfusersignin
  • If the value is set to allow, the home page will have a sign-in form from where users can create their own accounts.
  • The default value is disallow.
welcomemailsenderid
  • The welcome mail to the users who sign up from the home page will get a welcome mail from this id.
  • If this id is not given a valid email id, then no mail will be sent.
  • By default no value is set.
supportmailsenderid
  • A system report will be sent as soon as a user registers to the email id specified in supportmailrecipientid from the email id set in this property.
  • By default no value is set.
  • If you do not give a valid email id as the value of this property, the no mail will be sent.
supportmailrecipientid
  • A system report will be sent as soon as a user registers to the email id specified in this property.
  • By default no value is set.
  • If you do not give a valid email id as the value of this property, the no mail will be sent.
usercosforsigninuser
  • A newly registered user will be assigned this usercos.
  • By default no value is set.
  • If a valid usercos is not set, then user registration will fail.
autoexpirydays
  • The account of a newly registered user will expiry after the specified number of days.
  • Valid values are 0 or a positive number.
  • A value of 0 means that the account will not expire automatically.
  • The default value is 0.


  • 2. Configure selfsignin.properties.conf for server level properties.
  • The location of the configuration file is: /mithi/mcs/modules/mithi-uei/conf/server/selfsignin.properties.conf
  • Give appropriate values to the following keys
# Web server ip of master server where web service going to be called.
wsip=<master server ip>
# Web Service port on which web service get called.
webserviceport=8443
# Time out to get response from web service.
webservicereadtimeout=1000
# Time out to get connected to the web service server.
webserviceconnectiontimeout=500
  • Restart the tomcat service
  • 3. Add the following css to the head section of the page (if not present on the page)
<link rel="stylesheet" href="/dev/css/empty.css" id="domainthemeid" type="text/css"/>
<link rel="stylesheet" href="/dev/css/loginForm.css" type="text/css"/>
<link rel="stylesheet" href="/dev/css/validationEngine.jquery.css" type="text/css"/>
<script src="/dev/js/balloontip.js"></script>	
  • 4. Place following div element in the page where you want the signup form to be placed. Replace <domainname> with the domain name to which the users will be added.
<div id="signupform" name="<domainname>"></div>
  • 5. Add the following js to the bottom of the page (before the </html> tag)(if not present on the page)
<script src="/dev/js/Placeholders.min.js" type="text/javascript" charset="utf-8"></script>	
  • 6. Change Tip for user addition.
Find comment for 'domainname' and replace that comment completely with the domain name for which the page is configured.
. 
Change user addition tip by replacing following comment.


  • 7. Copy the signup form template
/mithi/mcs/modules/mithi-mailclient/binconf/LoginFormTemplates/Template_SignupForm.html
to (replacing <domain> with the domain name)
/mithi/mcs/modules/mithi-mailclient/user/pl/webapp/webroot/Templates/<domain>/Template_SignupForm.html


  • 8. To initialise the login form add the following code to the bottom of the page (before the </html> tag)
Note: Replace <domain> with the domain name

<script>
// The login form is now kept in template file, we will attach the form html code from that file.
// Following line will read the mentioned template file.

jQuery.get('/Templates/<domain>/Template_SignupForm.html',function(signupformdata)
{
   // Attach read login form to the div loginform.  
   $("#signupform").html( signupformdata );
				
   initSignInPage();
});

</script>	

<script> 
$(window).load(function(){
   // Set domain data to the page.	
   initEnvironment();
});
</script> 
<script> 
$(window).load(function(){
   // It validates environment. 
   initSignInEnvironment();
});
</script>
  • 9. Restart the tomcat service
/etc/init.d/tomcat restart

Customizing the welcome mail

For Connect Xf 3.12 WITHOUT the patch at Administration:Support Advisory 10722012014

  • Without the patch, only a single custom mail can be sent to the newly created user.
  • The steps to configure are as follows:
  • Copy the template from
/mithi/mcs/modules/mithi-bl/binconf/defconf/server/Template_WelComeMail.html
  • to
/mithi/mcs/modules/mithi-bl/conf/<domain>/Template_WelcomeMail.html
  • Update the template for the domain as per your needs

For Connect Xf 3.12 WITH the patch at Administration:Support Advisory 10722012014

  • With the patch, a domain administrator can configure the system to send more than one welcome mail to the newly resgistered user.
  • The configuration is as follows:
  • For every domain, the following folder will contain all the templates of the welcome mails to be sent:
/mithi/mcs/modules/mithi-bl/conf/domains/<domain>/WelcomeMailTemplate/
  • Make a copy of the file at /mithi/mcs/modules/mithi-bl/binconf/defconf/server/Template_WelComeMail.html and make the welcome mails. Copy all the welcome mail in this folder.
  • The system will send all the mails from this folder to the newly created id.
  • If the folder is empty, then the default welcome mail in the following location will be sent:
/mithi/mcs/modules/mithi-bl/binconf/defconf/domain/WelcomeMailTemplate/
  • To send a mail to the alternate id specified, the following configuration has to be done in the /mithi/mcs/modules/mithi-uei/conf/server/selfsignin.properties.conf file.
  1. Alternate email id file name
welcomemail_altemailid=<name of the template from the WelcomeMailTemplate folder>
  • Restart tomcat after making any change to the above file.
  • Note: If the file is present in the folder used for the domain, then a mail will be sent to the alternate email id, else no mail will be sent.

Adding Custom Links to the home page

  • 1. Place the following div element in the page.
  • 2. Add the following block of code to the end of the page, before </html> tag.
<script>
$(document).ready(function(){
   // CUSTOM LINKS
   setCustomLinks();
});
</script>

Adding support information to the home page

  • 1. Place the following div element in the page where you want the support information to be displayed.
  • 2. Add following block of code to the end of the page, before </html> tag.
<script>
$(document).ready(function(){
   // SUPPORT INFORMATION		
   setSupportInformation();
} );
</script>

Troubleshooting

  • The logs for the sign-up and login forms will be available in the tomcat log at
/var/log/tomcat/catalina.out
  • Logs are generated for the following operations from the home page:
  • user addition
  • sending the welcome mail to the user or her alternate emailid
  • sending an informative mail to the domain admin
  • checking the password complexity
  • setting the user properties.