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
87d06493
Commit
87d06493
authored
Aug 16, 2021
by
Mai Hoang Thai Ha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed review
parent
5ac7cef2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
app/controllers/applies_controller.rb
+5
-1
app/views/applies/new.html.slim
+4
-4
No files found.
app/controllers/applies_controller.rb
View file @
87d06493
...
@@ -2,7 +2,7 @@ class AppliesController < ApplicationController
...
@@ -2,7 +2,7 @@ class AppliesController < ApplicationController
before_action
:load_job
,
only:
%i[new confirm create]
before_action
:load_job
,
only:
%i[new confirm create]
def
new
def
new
@apply
=
if
request
.
referer
&
.
include?
(
'confirm'
)
&&
session
[
:apply_job
].
present
?
@apply
=
if
back
?
ApplyJob
.
new
(
session
[
:apply_job
])
ApplyJob
.
new
(
session
[
:apply_job
])
else
else
current_user
.
apply_jobs
.
build
current_user
.
apply_jobs
.
build
...
@@ -50,4 +50,8 @@ class AppliesController < ApplicationController
...
@@ -50,4 +50,8 @@ class AppliesController < ApplicationController
def
current_user
def
current_user
@current_user
||=
User
.
first
@current_user
||=
User
.
first
end
end
def
back?
request
.
referer
&
.
include?
(
'confirm'
)
&&
session
[
:apply_job
].
present?
end
end
end
app/views/applies/new.html.slim
View file @
87d06493
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
=
render
'ribbon'
=
render
'ribbon'
.container
.container
h1
.my-5.text-center
h1
.my-5.text-center
|
Apply
f
orm
|
Apply
F
orm
p
.fs-5.fw-bold.mb-4.text-center
p
.fs-5.fw-bold.mb-4.text-center
=
@job
.
title
=
@job
.
title
.col
.col
...
@@ -14,13 +14,13 @@
...
@@ -14,13 +14,13 @@
.col-2
.col-2
=
f
.
label
:user_name
,
'Full name'
,
class:
'form-label label'
=
f
.
label
:user_name
,
'Full name'
,
class:
'form-label label'
.col-10
.col-10
=
f
.
text_field
:user_name
,
value:
@apply
.
user_name
||
=
@current_user
.
name
,
class:
'form-control'
=
f
.
text_field
:user_name
,
value:
@apply
.
user_name
||
@current_user
.
name
,
class:
'form-control'
span
.form-msg
span
.form-msg
.row.mb-5.form-group
.row.mb-5.form-group
.col-2
.col-2
=
f
.
label
:email
,
class:
'form-label label'
=
f
.
label
:email
,
class:
'form-label label'
.col-10
.col-10
=
f
.
text_field
:email
,
value:
@apply
.
email
||
=
@current_user
.
email
,
class:
'form-control'
=
f
.
text_field
:email
,
value:
@apply
.
email
||
@current_user
.
email
,
class:
'form-control'
span
.form-msg
span
.form-msg
.row.mb-5.form-group
.row.mb-5.form-group
/ - if @user.cv.attached?
/ - if @user.cv.attached?
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
=
f
.
file_field
:cv
,
accept:
ApplyJob
::
ACCEPT_CONTENT_TYPE
,
class:
'form-control'
=
f
.
file_field
:cv
,
accept:
ApplyJob
::
ACCEPT_CONTENT_TYPE
,
class:
'form-control'
span
.form-msg
span
.form-msg
br
br
=
f
.
submit
'Confirm'
,
class:
'btn btn-primary w-25 my-4 btn-height'
,
data:
{
disable_with:
false
}
=
f
.
submit
'Confirm'
,
class:
'btn btn-primary w-25 my-4 btn-height'
,
data:
{
disable_with:
false
}
=
render
'validate_form'
=
render
'validate_form'
javascript:
javascript:
...
...
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