Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VeNJOB
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nguyen Hoang Mai Phuong
VeNJOB
Commits
f0256ebb
Commit
f0256ebb
authored
Aug 27, 2021
by
Nguyen Hoang Mai Phuong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add validate email and fix style code
parent
178c8547
Pipeline
#1407
failed with stages
in 0 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
16 deletions
+12
-16
app/assets/stylesheets/colors.scss
+0
-0
app/assets/stylesheets/custom.scss
+5
-11
app/models/user.rb
+3
-1
app/views/users/registrations/new.html.slim
+2
-2
app/views/users/show.html.slim
+2
-2
No files found.
app/assets/stylesheets/
flash
.scss
→
app/assets/stylesheets/
colors
.scss
View file @
f0256ebb
File moved
app/assets/stylesheets/custom.scss
View file @
f0256ebb
@import
"bootstrap"
;
@import
"
flash
"
;
@import
"
colors
"
;
@import
url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700&display=swap')
;
#logo
{
...
...
@@ -161,23 +161,16 @@ footer {
}
}
.alert-error
,
.alert-alert
{
.alert-error
,
.alert-alert
{
background-color
:
$background-error-alert-color
;
border-color
:
$border-error-alert-color
;
color
:
$error-alert-color
;
text-align
:
left
;
}
.alert-success
{
.alert-success
,
.alert-notice
{
background-color
:
$background-success-notice-color
;
border-color
:
$border-success-notice-color
;
color
:
$success-notice-color
;
text-align
:
left
;
}
.alert-notice
{
background-color
:
$background-success-notice-color
;
border-color
:
$border-success-notice-color
;
color
:
$success-notice-color
;
text-align
:
left
;
}
}
\ No newline at end of file
app/models/user.rb
View file @
f0256ebb
...
...
@@ -6,8 +6,9 @@ class User < ApplicationRecord
devise
:database_authenticatable
,
:registerable
,
:recoverable
,
:rememberable
,
:validatable
,
:confirmable
VALID_EMAIL_REGEX
=
/\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
validates
:name
,
length:
{
maximum:
200
}
validates
:email
,
length:
{
maximum:
200
},
uniqueness:
true
validates
:email
,
length:
{
maximum:
200
},
uniqueness:
true
,
format:
{
with:
VALID_EMAIL_REGEX
}
validates
:cv
,
content_type:
{
in:
'application/pdf'
,
message:
'must be a valid pdf format'
},
size:
{
less_than:
5
.
megabytes
,
message:
'should be less than 5MB'
}
end
\ No newline at end of file
app/views/users/registrations/new.html.slim
View file @
f0256ebb
...
...
@@ -9,11 +9,11 @@ h2.p-3.text-center
.field
=
f
.
label
:name
,
"Full Name"
br
=
f
.
text_field
:name
,
required:
true
,
length:
{
maximum:
200
},
class:
'form-control'
=
f
.
text_field
:name
,
required:
true
,
autofocus:
true
,
length:
{
maximum:
200
},
class:
'form-control'
.field
=
f
.
label
:email
br
=
f
.
email_field
:email
,
required:
true
,
length:
{
maximum:
200
},
auto
focus:
true
,
auto
complete:
"email"
,
class:
'form-control'
=
f
.
email_field
:email
,
required:
true
,
length:
{
maximum:
200
},
autocomplete:
"email"
,
class:
'form-control'
.field
=
f
.
label
:password
-
if
@minimum_password_length
...
...
app/views/users/show.html.slim
View file @
f0256ebb
...
...
@@ -8,11 +8,11 @@ h2.p-3.text-center
.field
=
f
.
label
:email
br
=
f
.
email_field
:email
,
required:
true
,
autofocus:
true
,
autocomplete:
"email"
,
class:
'form-control'
=
f
.
email_field
:email
,
disabled:
true
,
class:
'form-control'
.field
=
f
.
label
:name
,
"Full Name"
br
=
f
.
text_field
:name
,
required:
true
,
length:
{
maximum:
200
}
,
class:
'form-control'
=
f
.
text_field
:name
,
disabled:
true
,
class:
'form-control'
.field
-
if
@user
.
cv
.
attached?
=
f
.
label
:cv
,
"CV"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment