Application_Form/app/views/seminars/con_login.html.erb

59 lines
2.2 KiB
Plaintext

<% # encoding: utf-8 %>
<%
data = action_data
@seminar = data["seminar"]
@time_now = data["time_now"]
%>
<% if @seminar.contribute_start_date <= @time_now and (@seminar.contribute_end_date.nil? or @seminar.contribute_end_date+1 >= @time_now ) %>
<section id="main-wrap">
<div class="sign-in have-other-sign-in">
<% flash.each do |key, msg| %>
<%= content_tag :p, msg, :class => [key, "alert alert-error in fade"] %>
<% end %>
<div class="form">
<h2><%= @seminar.title %></h2>
<h3 class="login-logo"><%= t('seminar_signup.con_login') %></h3>
<div>
<input name="utf8" type="hidden" value="" />
<input name="authenticity_token" type="hidden" value="" />
</div>
<div class="form-block">
<div class="form-list clearfix">
<%= form_tag con_login_proc_seminars_path, :class => 'content' do %>
<div class="control-group clear">
<label for="user_email">
<i class="icon-user"></i><%=t('seminar_signup.email_address')%>
</label>
<%= text_field_tag :user_name, params[:user_name], :placeholder => t('seminar_signup.email_address'), :id=>"user_email" %>
</div>
<div class="control-group clear">
<label for="user_password">
<i class="icon-lock"></i><%=t("seminar_signup._password")%>
</label>
<%= password_field_tag :password, nil, :placeholder => t(:dots), :id=>"user_password" %>
</div>
<br/>
<input type="hidden" name="referer_url" value="<%= request.original_url.split(request.env["HTTP_HOST"]).last.split('?').first %>">
<input type="hidden" name="seminar_signup[seminar_main_id]" value="<%= @seminar.id %>">
<button class="btn btn-primary" name="button" type="submit"><%= t('seminar_signup.login') %></button>
<% end %>
</div>
</div>
<br/>
</div>
</div>
</section>
<% else %>
已截止
<% end %>
<script type="text/javascript">
$(document).ready(function(){
var max_width = Math.max.apply(null, $(".form .control-group label").map(function(i,el){return $(el).width()}));
$(".form .control-group label").width(max_width);
})
</script>