0
頁
我現在的形式看起來是這樣的:引導軌登入
<%= form_tag session_path, method: 'post' do %>
<%= label_tag :email_or_username, "Email or Username:" %>
<%= text_field_tag :email_or_username, nil, autofocus: true %>
<%=label_tag :password, "Password:" %>
<%= password_field_tag :password, nil %>
<%= submit_tag "Sign In", class: "btn btn-default btn-primary" %>
No account yet?
<%= link_to 'Sign Up', signup_path, class: "btn btn-default btn-primary" %>
但我希望它看起來就像這樣:
https://getbootstrap.com/examples/signin/
<div class="container">
<form class="form-signin">
<h2 class="form-signin-heading">Please sign in</h2>
<label for="inputEmail" class="sr-only">Email address</label>
<input type="email" id="inputEmail" class="form-control" placeholder="Email address" required="" autofocus="">
<label for="inputPassword" class="sr-only">Password</label>
<input type="password" id="inputPassword" class="form-control" placeholder="Password" required="">
<div class="checkbox">
<label>
<input type="checkbox" value="remember-me"> Remember me
</label>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
</form>
</div>
如何納入form_tag爵士樂到這個引導模板?
什麼版本的引導您使用的是? –