Commit 2e642584 by Thanh Hung Pham

Send info to another form

parent 2f8b6e0a
......@@ -13,6 +13,15 @@ class JobsController < ApplicationController
end
def confirm
@fullname = params['fullname']
@email = params['email']
end
def done
end
def show
unless params[:city_id].nil?
@job_count = Job.where(city_id: params[:city_id]).count
......
<%- provide(:title, 'Job Apply') -%>
<div class="well">
<div>
<strong><%= link_to 'Apply New', '#' %></strong>
<strong><%= link_to 'Apply New', jobs_apply_path %></strong>
>
<%= link_to 'Apply Confirmation', '#' %>
<%= link_to 'Apply Confirmation', jobs_confirm_path %>
>
<%= link_to 'Done', '#' %>
<%= link_to 'Done', jobs_done_path %>
</div>
<h2>Apply Form</h2>
<div class="form-group">
<label>Full name</label><br />
<input type="text" value="<%= current_user.fullname %>", class="form-control"/>
</div>
<div class="form-group">
<label>Email</label><br />
<input type="text" value="<%= current_user.email %>", class="form-control"/>
</div>
<div class="form-group">
<label>Cv name</label><br />
<%= link_to current_user.cv_name, registrations_download_file_path %>
</div>
<%= form_tag jobs_confirm_path do %>
<div class="form-group">
<label>Full name</label><br />
<%= text_field_tag 'fullname', current_user.fullname, class: 'form-control' %>
</div>
<div class="form-group">
<label>Email</label><br />
<%= text_field_tag 'email', current_user.email, class: 'form-control' %>
</div>
<div class="form-group">
<label>Cv name</label><br />
<%= link_to current_user.cv_name, registrations_download_file_path %>
</div>
<div class="form-group">
<a class="btn btn-primary" href="<%= jobs_confirm_path %>">Confirm</a>
</div>
<div class="form-group">
<%= submit_tag 'Confirm', class: 'btn btn-primary' %>
</div>
<%- end -%>
</div>
<%- provide(:title, 'Confirmation') -%>
<div class="well">
<div>
<%= link_to 'Apply New', '#' %>
<%= link_to 'Apply New', jobs_apply_path %>
>
<strong><%= link_to 'Apply Confirmation', '#' %></strong>
<strong><%= link_to 'Apply Confirmation', jobs_confirm_path %></strong>
>
<%= link_to 'Done', '#' %>
<%= link_to 'Done', jobs_done_path %>
</div>
<h2>Apply Confirmation</h2>
<div class="form-group">
<label>Full name</label><br />
<input type="text" value="<%= current_user.fullname %>", class="form-control", readonly/>
</div>
<div class="form-group">
<label>Email</label><br />
<input type="text" value="<%= current_user.email %>", class="form-control", readonly/>
</div>
<div class="form-group">
<label>Cv name</label><br />
<%= link_to current_user.cv_name, registrations_download_file_path %>
</div>
<%= form_tag jobs_done_path do %>
<div class="form-group">
<label>Full name</label><br />
<%= text_field_tag 'fullname', @fullname, class: 'form-control', readonly: true %>
</div>
<div class="form-group">
<label>Email</label><br />
<%= text_field_tag 'email', @email, class: 'form-control', readonly: true %>
</div>
<div class="form-group">
<label>Cv name</label><br />
<%= link_to current_user.cv_name, registrations_download_file_path %>
</div>
<div class="form-group">
<a class="btn btn-primary" href="<%= jobs_apply_path %>">Edit</a>
<a class="btn btn-primary" href="<%= jobs_done_path %>">Done</a>
</div>
<div class="form-group">
<a class="btn btn-primary" href="<%= jobs_apply_path %>">Edit</a>
<%= submit_tag 'Done', class: 'btn btn-primary' %>
</div>
<%- end -%>
</div>
......@@ -12,7 +12,7 @@
<tbody>
<%- @history_jobs.each do |history| -%>
<tr>
<td> <%= history.job.name %> </td>
<td> <%= link_to history.job.name, jobs_detail_path(id: history.job.id) %> </td>
<td> <%= truncate(history.job.description, length: 250) %> </td>
<td> <%= history.job.city.name unless history.job.city.nil? %> </td>
<td> <%= history.job.salary %> </td>
......
......@@ -10,7 +10,9 @@ Rails.application.routes.draw do
get 'jobs/detail/', to: 'jobs#detail'
get 'jobs/apply/', to: 'jobs#apply'
get 'jobs/confirm', to: 'jobs#confirm'
post 'jobs/confirm', to: 'jobs#confirm'
get 'jobs/done', to: 'jobs#done'
post 'jobs/done', to: 'jobs#done'
get 'jobs/favorite', to: 'jobs#favorite'
get 'jobs/favorite_remove', to: 'jobs#favorite_remove'
get 'jobs/favorited_jobs', to: 'jobs#favorited_jobs'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment