2014-02-10 10:49:25 +00:00
|
|
|
|
|
|
|
|
2014-01-16 10:15:00 +00:00
|
|
|
<div class="sign-in have-other-sign-in">
|
2014-02-10 10:49:25 +00:00
|
|
|
|
|
|
|
<% flash.each do |key, msg| %>
|
|
|
|
<%= content_tag :p, msg, :class => [key, "alert alert-error"] %>
|
2014-01-16 10:15:00 +00:00
|
|
|
<% end %>
|
|
|
|
|
2014-02-10 10:49:25 +00:00
|
|
|
|
|
|
|
<div class="form">
|
|
|
|
<h3 class="login-logo"><%= t(:login) %></h3>
|
|
|
|
<div class="other-sign-in">
|
|
|
|
<% @request_hosts = request.host_with_port.split(".") %>
|
|
|
|
<a class="btn btn-primary" type="submit" href="https://adfs.ntu.edu.tw/adfs/ls/?wa=wsignin1.0&wtrealm=https://management.ntu.edu.tw/saml_login&wctx=<%= @request_hosts[0] %>">使用計中帳號登入</a>
|
2014-01-16 10:15:00 +00:00
|
|
|
<p>or</p>
|
2014-02-10 10:49:25 +00:00
|
|
|
</div>
|
2014-01-16 10:15:00 +00:00
|
|
|
<div class="form-block">
|
|
|
|
<div class="form-list clearfix">
|
2014-02-10 10:49:25 +00:00
|
|
|
<%= form_for resource, :as => resource_name, :url => session_path(resource_name), :html => {:class => 'content'} do |f| %>
|
2014-01-16 10:15:00 +00:00
|
|
|
<div class="control-group clear">
|
|
|
|
<label for="user_email">
|
|
|
|
<i class="icon-user"></i>
|
|
|
|
</label>
|
2014-02-10 10:49:25 +00:00
|
|
|
<%= f.text_field :user_id, :placeholder => t("users.user_id") %>
|
2014-01-16 10:15:00 +00:00
|
|
|
</div>
|
|
|
|
<div class="control-group clear">
|
|
|
|
<label for="user_password">
|
|
|
|
<i class="icon-lock"></i>
|
|
|
|
</label>
|
2014-02-10 10:49:25 +00:00
|
|
|
<%= f.password_field :password, :placeholder => t(:dots) %>
|
2014-01-16 10:15:00 +00:00
|
|
|
</div>
|
2014-02-10 10:49:25 +00:00
|
|
|
<!-- <label class="checkbox">
|
|
|
|
<input type="checkbox" value="">
|
|
|
|
<small>Remember me</small>
|
|
|
|
</label> -->
|
2014-01-16 10:15:00 +00:00
|
|
|
<%= content_tag :button, t(:login), :type => :submit, :class => 'btn btn-primary' %>
|
2014-02-10 10:49:25 +00:00
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<!-- <form class="content" accept-charset="UTF-8" action="/users/sign_in" method="post">
|
|
|
|
<div class="control-group clear">
|
|
|
|
<label for="user_email">
|
|
|
|
<i class="icon-user"></i>
|
|
|
|
</label>
|
|
|
|
<input type="text" id="user_id" name="user[id]" placeholder="帳號" />
|
|
|
|
</div>
|
|
|
|
<div class="control-group clear">
|
|
|
|
<label for="user_password">
|
|
|
|
<i class="icons-mail"></i>
|
|
|
|
</label>
|
|
|
|
<input type="text" id="user_email" name="user[email]" placeholder="電子郵件" />
|
|
|
|
</div>
|
|
|
|
<button class="btn btn-primary" type="submit">Submit</button>
|
|
|
|
</form> -->
|
2014-01-16 10:15:00 +00:00
|
|
|
</div>
|
2014-02-10 10:49:25 +00:00
|
|
|
<!-- <div class="switchboard"><span>Forgot Password ?</span> <i class="icons-arrow-left-2"></i></div> -->
|
2014-01-16 10:15:00 +00:00
|
|
|
</div>
|
2014-02-10 10:49:25 +00:00
|
|
|
<!-- <div class="register">
|
2014-01-16 10:15:00 +00:00
|
|
|
<button class="btn btn-inverse" type="submit">Register</button>
|
|
|
|
</div> -->
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|