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
2
Merge Requests
2
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
Thanh Hung Pham
veNJOB
Commits
98594865
Commit
98594865
authored
Jul 20, 2017
by
Thanh Hung Pham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Validate form
parent
9efeecec
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
app/controllers/jobs_controller.rb
+2
-0
app/views/jobs/apply.html.erb
+2
-2
app/views/jobs/confirm.html.erb
+1
-1
No files found.
app/controllers/jobs_controller.rb
View file @
98594865
...
@@ -11,6 +11,8 @@ class JobsController < ApplicationController
...
@@ -11,6 +11,8 @@ class JobsController < ApplicationController
def
apply
def
apply
@job_id
=
params
[
:job_id
]
@job_id
=
params
[
:job_id
]
@fullname
=
params
[
:fullname
].
present?
?
params
[:
fullname
]
:
current_user
.
fullname
@email
=
params
[
:email
].
present?
?
params
[:
email
]
:
current_user
.
email
end
end
def
confirm
def
confirm
...
...
app/views/jobs/apply.html.erb
View file @
98594865
...
@@ -12,12 +12,12 @@
...
@@ -12,12 +12,12 @@
<%=
form_tag
jobs_confirm_path
do
%>
<%=
form_tag
jobs_confirm_path
do
%>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Full name
</label><br
/>
<label>
Full name
</label><br
/>
<%=
text_field_tag
'fullname'
,
current_user
.
fullname
,
class:
'form-control'
%>
<%=
text_field_tag
'fullname'
,
@fullname
,
class:
'form-control'
,
required:
true
%>
<%=
hidden_field_tag
'job_id'
,
@job_id
%>
<%=
hidden_field_tag
'job_id'
,
@job_id
%>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Email
</label><br
/>
<label>
Email
</label><br
/>
<%=
text_field_tag
'email'
,
current_user
.
email
,
class:
'form-control
'
%>
<%=
text_field_tag
'email'
,
@email
,
class:
'form-control'
,
required:
true
,
pattern:
'[^@]+@[^@]+\.[a-zA-Z]{2,6}
'
%>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Cv name
</label><br
/>
<label>
Cv name
</label><br
/>
...
...
app/views/jobs/confirm.html.erb
View file @
98594865
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<a
class=
"btn btn-primary"
href=
"
<%=
jobs_apply_path
%>
"
>
Edit
</a>
<a
class=
"btn btn-primary"
href=
"
<%=
jobs_apply_path
(
fullname:
@fullname
,
email:
@email
)
%>
"
>
Edit
</a>
<%=
submit_tag
'Done'
,
class:
'btn btn-primary'
%>
<%=
submit_tag
'Done'
,
class:
'btn btn-primary'
%>
</div>
</div>
<%-
end
-%>
<%-
end
-%>
...
...
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