Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Update register template #144

Merged
merged 35 commits into from
Feb 16, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0315365
update login page design
Bilelkihal Jan 4, 2023
fb49ac3
update the design of lost password page
Bilelkihal Jan 4, 2023
3f2edef
update sucess message for password reset
Bilelkihal Jan 4, 2023
9d55553
update register page design
Bilelkihal Jan 5, 2023
3d0ca7d
Merge branch 'development' into update/register
syphax-bouazzouni Jan 23, 2023
15f088e
Delete login.scss
Bilelkihal Jan 25, 2023
e574dc0
Delete lostpassword.scss
Bilelkihal Jan 25, 2023
c5c3330
Update index.html.erb
Bilelkihal Jan 25, 2023
97b2d03
Delete lost_password_success.html.erb
Bilelkihal Jan 25, 2023
23da56e
Update index.html.erb
Bilelkihal Jan 25, 2023
84fa775
Update lost_password.html.erb
Bilelkihal Jan 25, 2023
c682e93
Update routes.rb
Bilelkihal Jan 25, 2023
3ff2084
Update index.html.erb
Bilelkihal Jan 25, 2023
701b6f3
Update register.scss
Bilelkihal Jan 30, 2023
ed0e95e
Delete _form.html.erb
Bilelkihal Jan 30, 2023
001f53c
Update _form.html.haml
Bilelkihal Jan 30, 2023
da7db76
Update login_controller.rb
Bilelkihal Jan 30, 2023
d092eb1
Add code to remove auto added arrows from number_text_field
Bilelkihal Feb 4, 2023
00bdb85
Add the two fields (OrcidID & github)
Bilelkihal Feb 4, 2023
166fc2a
Add subscription to mailing list
Bilelkihal Feb 4, 2023
640aef8
Update index.html.erb
Bilelkihal Feb 4, 2023
5633259
Update _form.html.haml
Bilelkihal Feb 4, 2023
97a2f2b
Add captacha tag
Bilelkihal Feb 4, 2023
d9ba13e
Update _form.html.haml
Bilelkihal Feb 7, 2023
0c87360
Add github icon
Bilelkihal Feb 7, 2023
0c07efd
Add orcide icon
Bilelkihal Feb 7, 2023
7fafb70
Fix recaptacha tags (add "=")
Bilelkihal Feb 15, 2023
5ce2550
replace "ORCIDE" by "ORCID"
Bilelkihal Feb 15, 2023
825b30c
Change ORCID ID input type from 'number' to ‘text’
Bilelkihal Feb 15, 2023
1f87f08
Extract orcidId & githubId from URLs
Bilelkihal Feb 15, 2023
c51fac5
Extract arrow-back.svg file
Bilelkihal Feb 16, 2023
1f2c0b5
Fix extract id from link
Bilelkihal Feb 16, 2023
d1493e0
Resolve conflicts with developement branch
Bilelkihal Feb 16, 2023
1442665
Merge branch 'development' into update/register
Bilelkihal Feb 16, 2023
63f6886
remove import browse
Bilelkihal Feb 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/assets/stylesheets/application.css.scss.erb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
@import "instances_table";
@import "file_uploader";
@import "browse";
Bilelkihal marked this conversation as resolved.
Show resolved Hide resolved
@import "login";
Bilelkihal marked this conversation as resolved.
Show resolved Hide resolved
@import "lostpassword";
@import "register";

/* Bootstrap and Font Awesome */
@import "bootstrap";
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/bioportal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#bd {
background: #fff;
}
#bd hr {
#bd > hr {
Bilelkihal marked this conversation as resolved.
Show resolved Hide resolved
border:0;
height:1px;
color:#e9eaeb;
Expand Down
83 changes: 83 additions & 0 deletions app/assets/stylesheets/login.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
*{
Bilelkihal marked this conversation as resolved.
Show resolved Hide resolved
font-family: poppins;
margin: 0;
padding: 0;
}
.login-page-container{
display: flex;
justify-content: center;
}

.login-form{
margin-top: 30px;
padding-top: 37px;
padding-bottom: 37px;
padding-left: 41px;
padding-right: 41px;
box-shadow: rgba(0, 0, 0, 0.08) 0px 20px 50px;
border-radius: 14px;
}

.login-input{
box-sizing: border-box;
outline: none;
padding: 21px;
font-size: 16px;
border: 1px solid #BDBDBD;
border-radius: 9px;
width: 357px;

}

.login-input:focus{
border: 1px solid #76A7CC;
}
.login-input::placeholder{
font-weight: 300;
color: #C1C1C1;
}

.login-input-title{
font-size: 13px;
margin-bottom: 5px;
font-weight: 600;
color: #666666;
}
.email-input{
margin-bottom: 20px;
}
.password-input{
margin-bottom: 8px;
}
.login-forgot-password{
font-weight: 500 ;
text-align: end;
text-decoration:none;
font-size: 13px;

}
.login-button{
margin-top: 10px;
width: 357px;
font-size: 16px;
color: white;
padding: 17px;
background-color: #76A7CC;
border: none;
border-radius: 9px;
margin-bottom: 20px;
}
.login-button:hover{
background-color: #6B96B7;
cursor: pointer;
}

.dont-have-account{
font-size: 15px;
font-weight: 600;
text-align: center;
}
.login-register-button{
text-decoration: none;

}
128 changes: 128 additions & 0 deletions app/assets/stylesheets/lostpassword.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
*{
Bilelkihal marked this conversation as resolved.
Show resolved Hide resolved
font-family: poppins;
margin: 0;
padding: 0;
}
.lost-password-page-container{
margin: 40px;
display: flex;
justify-content: center;
}
.lost-password-sucess{
margin: 70px;
display: flex;
justify-content: center;
}

.lost-password-form{
margin-top: 30px;
padding-top: 37px;
padding-bottom: 37px;
padding-left: 41px;
padding-right: 41px;
box-shadow: rgba(0, 0, 0, 0.05) 0px 20px 50px;
border-radius: 14px;
}
.lost-password-title-bar{
display: flex;
justify-content: space-between;
}
.lost-password-arrowback{
all: none;
}
.lost-password-title{
font-size: 18px;
text-align: center;
font-weight: 700;
}
#lost-password-title-line{
width: 128px ;
margin: auto !important ;
margin-bottom: 14px !important ;
margin-top: 3px !important ;
border: 1px solid #76A7CC !important ;
border-radius: 5px ;
}

.lost-password-description{
color: #666666;
font-size: 12.5px;
margin-bottom: 14px;
width: 357px;
}



.lost-password-input{
box-sizing: border-box;
outline: none;
padding: 21px;
font-size: 16px;
border: 1px solid #BDBDBD;
border-radius: 9px;
width: 357px;

}

.lost-password-input:focus{
border: 1px solid #76A7CC;
}
.lost-password-input::placeholder{
font-weight: 300;
color: #C1C1C1;
}

.lost-password-input-title{
font-size: 13px;
margin-bottom: 5px;
font-weight: 600;
color: #666666;
}
.lost-password-button{
margin-top: 20px;
width: 357px;
font-size: 16px;
color: white;
padding: 21px;
background-color: #76A7CC;
border: none;
border-radius: 9px;
margin-bottom: 20px;
display: block;
}
.lost-password-button:hover{
background-color: #6B96B7;
cursor: pointer;
}

.lost-password-icon{
display: flex;
justify-content: center;
margin-bottom: 21px;
}
.lost-password-feedback{
text-align: center;
width: 310px;
font-size: 14px;
font-weight: 500;
margin-bottom: 21px;
}

.lost-password-back-home{
color: #76A7CC;
padding: 16px;
border: 1px solid #76A7CC;
border-radius: 9px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
text-decoration: none;

}
.lost-password-back-home:hover{
text-decoration: none;

}


123 changes: 123 additions & 0 deletions app/assets/stylesheets/register.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
.register-page-container{
syphax-bouazzouni marked this conversation as resolved.
Show resolved Hide resolved
display: flex;
justify-content: center;
}

.register-form{
margin-top: 30px;
padding-top: 37px;
padding-bottom: 37px;
padding-left: 41px;
padding-right: 41px;
box-shadow: rgba(0, 0, 0, 0.05) 0px 20px 50px;
border-radius: 14px;
}

.register-title-bar{
display: flex;
justify-content: space-between;
}
.register-arrowback{
all: none;
}
.register-title{
font-size: 18px;
text-align: center;
font-weight: 700;
}
#register-title-line{
width: 128px;
margin: auto;
margin-bottom: 20px;
margin-top: 3px;
border: 0.5px solid #76A7CC;
border-radius: 5px;
}

.register-double-input{
display: flex;
margin-bottom: 14px;
}
.register-first-input{
margin-right: 19px;
}

.register-input-title{
font-size: 12px;
color: #666666;
margin-bottom: 5px;
font-weight: 600;
}
.register-optional{
font-weight: 300;

}
.register-input-long{
width: 363px;
outline: none;
padding: 14px;
font-size: 15px;
font-weight: 500;
border: 1px solid #BDBDBD;
border-radius: 9px;
margin-bottom: 14px;
}
.register-input-long:focus{
border: 1px solid #76A7CC;
}

.register-input-short{
width: 172px;
outline: none;
padding: 14px;
font-size: 15px;
font-weight: 500;
border: 1px solid #BDBDBD;
border-radius: 9px;
}
.register-input-short:focus{
border: 1px solid #76A7CC;
}


.register-input-icon{
position: absolute;
padding: 18px;
box-sizing: unset;
}
.register-input-with-icon{

padding-left: 45px;

}
.register-input-icon-container{
display: flex;
}
.register-email-list-container{
display: flex;
}

#register-check-text{
margin-left: 10px;
color: #666666;
font-size: 12px;
font-weight: 400;
margin-bottom: 0;
}

.register-button{
margin-top: 20px;
width: 363px;
font-size: 16px;
color: white;
padding: 17px;
background-color: #76A7CC;
border: none;
border-radius: 9px;

}

.register-button:hover{
background-color: #6B96B7;
cursor: pointer;
}
6 changes: 5 additions & 1 deletion app/controllers/login_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,18 @@ def destroy
def lost_password
end

def lost_password_success
Bilelkihal marked this conversation as resolved.
Show resolved Hide resolved
end


# Sends a new password to the user
def send_pass
username = params[:user][:account_name]
email = params[:user][:email]
resp = LinkedData::Client::HTTP.post("/users/create_reset_password_token", {username: username, email: email})

if resp.nil?
redirect_to login_index_path, notice: "Please check your email for a message with reset instructions"
redirect_to "/lost_pass_success"
else
flash[:notice] = resp.errors.first + ". Please try again."
redirect_to "/lost_pass"
Expand Down
3 changes: 0 additions & 3 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,6 @@ def validate(params)
if params[:email].nil? || params[:email].length < 1 || !params[:email].match(/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i)
errors << "Please enter an email address"
end
if !params[:email].eql?(params[:email_confirmation])
Bilelkihal marked this conversation as resolved.
Show resolved Hide resolved
errors << "Your Email and Email Confirmation do not match"
end
if params[:password].nil? || params[:password].length < 1
errors << "Please enter a password"
end
Expand Down
Loading