-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.js
77 lines (58 loc) · 1.7 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
function ShowLoginForm(){
SetTitle("Login");
ShowHideForm("LoginFrom","Show");
ShowHideForm("RegistrationFrom","Hide");
ShowHideForm("ForgotPasswordForm","Hide");
ActiveInactiveBtn("ShowLoginBtn","Active");
ActiveInactiveBtn("ShowRegistrationBtn","Inactive");
ShowHideFromSwitchBtn("Show");
};
function ShowRegistrationForm(){
debugger;
SetTitle("Registration");
ShowHideForm("RegistrationFrom","Show");
ShowHideForm("LoginFrom","Hide");
ShowHideForm("ForgotPasswordForm","Hide");
ActiveInactiveBtn("ShowLoginBtn","Inactive");
ActiveInactiveBtn("ShowRegistrationBtn","Active");
ShowHideFromSwitchBtn("Show");
};
function ShowForgotPasswordForm() {
SetTitle("Forgot Password");
ShowHideForm("RegistrationFrom","Hide");
ShowHideForm("LoginFrom","Hide");
ShowHideForm("ForgotPasswordForm","Show");
ActiveInactiveBtn("ShowLoginBtn","Inactive");
ActiveInactiveBtn("ShowRegistrationBtn","Inactive");
ShowHideFromSwitchBtn("Hide");
}
function SetTitle(Title){
var formTitle = document.getElementById('formTitle');
formTitle.innerHTML = Title;
}
function ShowHideForm(FormID,ShowOrHide){
var Form = document.getElementById(FormID);
if(ShowOrHide == "Show"){
Form.style.display = 'block';
}else{
Form.style.display = 'none';
}
}
function ActiveInactiveBtn(ButtonID,ActiveORInactive) {
debugger;
var Button = document.getElementById(ButtonID);
if(ActiveORInactive == "Active"){
Button.classList.add('active');
}else{
Button.classList.remove('active');
}
}
function ShowHideFromSwitchBtn(ShowOrHide) {
var formSwitchBtn = document.getElementById('formSwitchBtn');
if(ShowOrHide == 'Show'){
formSwitchBtn.style.display = '';
}else{
formSwitchBtn.style.display = 'none';
}
}
// end