added password reset pattern
This commit is contained in:
parent
e6d4227b71
commit
9d4e1e0945
|
@ -835,6 +835,10 @@ class SeminarsController < ApplicationController
|
|||
params = OrbitHelper.params
|
||||
seminar = SeminarMain.find_by(uid: params[:uid])
|
||||
seminar_signup = seminar.seminar_signups.where(:status=>'C', :id=> params[:cid], :token => params[:token]).first
|
||||
password_pattern = ""
|
||||
if(seminar.seminar_signup_field_sets.count != 0)
|
||||
password_pattern = seminar.seminar_signup_field_sets.where(:field_name => "password").first.validator rescue ""
|
||||
end
|
||||
status = false
|
||||
if(!seminar_signup.nil?)
|
||||
status = true
|
||||
|
@ -842,6 +846,7 @@ class SeminarsController < ApplicationController
|
|||
{
|
||||
"status" => status,
|
||||
"seminar" => seminar,
|
||||
"pattern" => password_pattern,
|
||||
"cid" => params[:cid],
|
||||
"token" => params[:token]
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<label for="user_password">
|
||||
<i class="icon-user"></i><%=t('seminar_signup.password')%>
|
||||
</label>
|
||||
<%= password_field_tag :password, nil, :placeholder => t(:dots), :id=>"user_password", :required=> true %>
|
||||
<%= password_field_tag :password, nil, :placeholder => t(:dots), :id=>"user_password", :required=> true, :pattern => data["pattern"], :title => t("seminar_signup.password_check") %>
|
||||
|
||||
</div>
|
||||
<div class="control-group clear">
|
||||
|
|
Loading…
Reference in New Issue