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
Mai Hoang Thai Ha
VenJob
Commits
a59c56fc
Commit
a59c56fc
authored
Sep 01, 2021
by
Mai Hoang Thai Ha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed devise messages style
parent
cd87d7ce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
8 deletions
+51
-8
app/assets/stylesheets/custom.scss
+30
-2
app/helpers/devise_helper.rb
+20
-0
app/views/layouts/application.html.slim
+1
-6
No files found.
app/assets/stylesheets/custom.scss
View file @
a59c56fc
...
...
@@ -65,7 +65,35 @@ footer {
}
}
// Top page
// search
// flash message
/*flash*/
.alert-error
{
background-color
:
#f2dede
;
border-color
:
#eed3d7
;
color
:
#b94a48
;
text-align
:
left
;
}
.alert-alert
{
background-color
:
#f2dede
;
border-color
:
#eed3d7
;
color
:
#b94a48
;
text-align
:
left
;
}
.alert-success
{
background-color
:
#dff0d8
;
border-color
:
#d6e9c6
;
color
:
#468847
;
text-align
:
left
;
}
.alert-notice
{
background-color
:
#dff0d8
;
border-color
:
#d6e9c6
;
color
:
#468847
;
text-align
:
left
;
}
app/helpers/devise_helper.rb
0 → 100644
View file @
a59c56fc
module
DeviseHelper
def
devise_error_messages!
return
''
if
resource
.
errors
.
empty?
messages
=
resource
.
errors
.
full_messages
.
map
{
|
msg
|
content_tag
(
:li
,
msg
)
}.
join
html
=
<<-
HTML
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<button type="button" class="close" data-dismiss="alert">
<span aria-hidden="true">×</span>
</button>
<strong>
#{
pluralize
(
resource
.
errors
.
count
,
'error'
)
}
must be fixed
</strong>
#{
messages
}
</div>
HTML
html
.
html_safe
end
end
app/views/layouts/application.html.slim
View file @
a59c56fc
...
...
@@ -12,12 +12,7 @@ html
=
yield
(
:head
)
body
=
render
'layouts/header'
.container-fluid
style
=
"min-height:80vh;"
/ .container-fluid class=("text-center alert alert-#{notice}")
/ p.notice
/ = notice
/ p.alert
/ = alert
.container-fluid
style
=
"min-height:80vh;"
-
flash
.
each
do
|
message_type
,
message
|
div
class
=
(
"text-center alert alert-#{message_type}"
)
=
message
=
yield
...
...
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