Hi~
My english is no good. sorry...
It makes logging in easier.
ID and password storage.
Activate the save password checkbox when you click save id.
Have a nace day~~~
1. File open
styles\templates\login\page.index.default.tpl
2.
Find this code....
<div style="text-align: right;">
<button type="submit" class="btn btn-primary">{$LNG.loginButton}</button>
</div>
Add code below
<div class="form-group">
<input type="checkbox" id="idSaveCheck"/>ID
<input type="checkbox" disabled id="pwdSaveCheck" class="no_act"/>Password
</div>
Add JavaScript code at the end.
Display All
My english is no good. sorry...
It makes logging in easier.
ID and password storage.
Activate the save password checkbox when you click save id.
Have a nace day~~~
1. File open
styles\templates\login\page.index.default.tpl
2.
Find this code....
<div style="text-align: right;">
<button type="submit" class="btn btn-primary">{$LNG.loginButton}</button>
</div>
Add code below
<div class="form-group">
<input type="checkbox" id="idSaveCheck"/>ID
<input type="checkbox" disabled id="pwdSaveCheck" class="no_act"/>Password
</div>
Add JavaScript code at the end.
JavaScript Source Code
- <script type="text/javascript">
- function setCookie(cookieName, value, exdays){
- var exdate = new Date();
- exdate.setDate(exdate.getDate() + exdays);
- var cookieValue = escape(value) + ((exdays==null) ? "" : "; expires=" + exdate.toGMTString());
- document.cookie = cookieName + "=" + cookieValue;
- }
- function deleteCookie(cookieName){
- var expireDate = new Date();
- expireDate.setDate(expireDate.getDate() - 1); //Set yesterday's date as cookie expiration date
- document.cookie = cookieName + "= " + "; expires=" + expireDate.toGMTString();
- }
- function getCookie(cookieName) {
- cookieName = cookieName + '=';
- var cookieData = document.cookie;
- var start = cookieData.indexOf(cookieName);
- var cookieValue = '';
- if(start != -1){
- start += cookieName.length;
- var end = cookieData.indexOf(';', start);
- if(end == -1)end = cookieData.length;
- cookieValue = cookieData.substring(start, end);
- }
- return unescape(cookieValue);
- }
- $(document).ready(function() {
- //Storing Id Cookies
- var userInputId = getCookie("userInputId");
- $("input[name='username']").val(userInputId);
- if($("input[name='username']").val() != ""){
- $("#idSaveCheck").attr("checked", true);
- $("#pwdSaveCheck").removeAttr("disabled");
- }
- $("#idSaveCheck").change(function(){
- if($("#idSaveCheck").is(":checked")){
- //Activate the save pwd checkbox when you click save id
- $("#pwdSaveCheck").removeAttr("disabled");
- $("#pwdSaveCheck").removeClass('no_act');
- var userInputId = $("input[name='username']").val();
- setCookie("userInputId", userInputId, 365);
- }else{
- deleteCookie("userInputId");
- $("#pwdSaveCheck").attr("checked", false);
- deleteCookie("userInputPwd");
- $("#pwdSaveCheck").attr("disabled", true);
- $("#pwdSaveCheck").addClass('no_act');
- }
- });
- $("input[name='username']").keyup(function(){
- if($("#idSaveCheck").is(":checked")){
- var userInputId = $("input[name='username']").val();
- setCookie("userInputId", userInputId, 365);
- }
- });
- //Storing password Cookies
- var userInputPwd = getCookie("userInputPwd");
- $("input[name='password']").val(userInputPwd);
- if($("input[name='password']").val() != ""){
- $("#pwdSaveCheck").attr("checked", true);
- $("#pwdSaveCheck").removeClass('no_act');
- }
- $("#pwdSaveCheck").change(function(){
- if($("#pwdSaveCheck").is(":checked")){
- var userInputPwd = $("input[name='password']").val();
- setCookie("userInputPwd", userInputPwd, 365);
- }else{
- deleteCookie("userInputPwd");
- }
- });
- $("input[name='password']").keyup(function(){
- if($("#pwdSaveCheck").is(":checked")){
- var userInputPwd = $("input[name='password']").val();
- setCookie("userInputPwd", userInputPwd, 365);
- }
- });
- });
- </script>
--------------------------------------------------------------------------------------