Commit 871a399c by Ngô Trung Hưng

add i18n

parent 4b9ef5ff
Pipeline #924 canceled with stages
in 0 seconds
......@@ -16,5 +16,7 @@
//= require jquery.min
//= require_tree .
toastr.options = {
'closeButton': true
'closeButton': true,
'progressBar': true,
'timeOut': 10000
}
......@@ -24,8 +24,8 @@ class ApplyJobController < ApplicationController
@apply_job.errors.full_messages.each { |mess| errors << "#{mess}<br>" }
flash[:error] = errors.join('<br>').html_safe
redirect_to apply_path(job_id: session[:job_id])
session.delete(:job_id)
end
session.delete(:job_id)
end
def done
......
......@@ -8,4 +8,5 @@ class AppliedJob < ApplicationRecord
validates :name, :email, :cv, presence: true
validates :name, :email, length: { in: 4..200 }
validates :email, format: Devise.email_regexp
validates_uniqueness_of :user_id, scope: :job_id, message: I18n.t('apply_job.already_taken')
end
......@@ -12,7 +12,7 @@
<p>Thank you for applied with VenJOB. Your applied job's information is as follow:</p>
<span>Job title: <%= @applied_job.job.name %></span><br>
<span>Location: <%= @applied_job.job.cities.map(&:name).join(' ') %></span><br>
<span>Company: <%= @applied_job.job.company.name %></span><br>
<span>Company: <%= @applied_job.job.company.name %></span><br><br>
<span>Name: <%= @applied_job.name %></span><br>
<span>Email: <%= @applied_job.email %></span><br>
CV: <%= link_to @applied_job.cv.identifier, root_url(@applied_job.cv.url) , target: '_blank' %>
......
......@@ -8,4 +8,5 @@
<%= render 'form', data_apply: @data_apply %>
</div>
</div>
</div>
\ No newline at end of file
</div>
<div style="width: 100%; height: 25vh"></div>
\ No newline at end of file
......@@ -123,3 +123,9 @@ en:
confirm: 'Please confirm your information'
applied: 'Applied'
title: 'List Applied Jobs'
already_taken: 'We have received your resume, the employer will contact you as soon as possible.'
activerecord:
attributes:
applied_job:
user_id: ''
......@@ -123,4 +123,9 @@ vi:
confirm: 'Vui lòng xác nhận lại thông tin của bạn'
applied: 'Đã ứng tuyển'
title: 'Danh sách công việc đã ứng tuyển'
already_taken: 'Chúng tôi đã tiếp nhận hồ của bạn, nhà tuyển dụng sẽ liên hệ đến bạn trong thời gian sớm nhất.'
activerecord:
attributes:
applied_job:
user_id: ''
\ No newline at end of file
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