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