new design with bootstrap for login and register pages

This commit is contained in:
Harry Bomrah 2017-12-29 21:07:20 +08:00
parent 999e568a01
commit 207d15daba
2 changed files with 40 additions and 24 deletions

View File

@ -9,8 +9,24 @@
<% elsif OrbitHelper.params[:error] == "dsbld" %> <% elsif OrbitHelper.params[:error] == "dsbld" %>
<div class="alert alert-danger" role="alert">Sorry your username is disabled.</div> <div class="alert alert-danger" role="alert">Sorry your username is disabled.</div>
<% end %> <% end %>
<form action="/pseudo_users/loginpseudouser" method="post"> <form action="/pseudo_users/loginpseudouser" method="post" class="form-horizontal">
<input type="hidden" name="authenticity_token" value="<%= form_authenticity_token %>"> <input type="hidden" name="authenticity_token" value="<%= form_authenticity_token %>">
<%= render_view %> <div class="form-group">
<label for="username" class="col-sm-2 control-label muted"><%= t("pseudo_member.user_name") %></label>
<div class="col-sm-8">
<input type="text" name="username" id="username" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label muted"><%= t("pseudo_member.password") %></label>
<div class="col-sm-8">
<input type="password" name="password" id="password" />
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-8">
<input type="submit" value="Login" class="btn btn-primary">
<a href="<%= "/" + I18n.locale.to_s + OrbitHelper.params[:url] + "?method=register" %>" class="register-btn btn btn-info">Register</a>
</div>
</div>
</form> </form>
<a href="<%= "/" + I18n.locale.to_s + OrbitHelper.params[:url] + "?method=register" %>" class="register-btn">Register</a>

View File

@ -7,48 +7,48 @@
</div> </div>
<% end %> <% end %>
<%= form_for data["puser"], :url => register_pseudo_user_path, html: {class: "form-horizontal"} do |f|%> <%= form_for data["puser"], :url => register_pseudo_user_path, html: {class: "form-horizontal"} do |f|%>
<div class="control-group"> <div class="form-group">
<label class="control-label muted"><%= t("pseudo_member.user_name") %></label> <label class="col-sm-2 control-label muted"><%= t("pseudo_member.user_name") %></label>
<div class="controls"> <div class="col-sm-8">
<%= f.text_field :user_name %> <%= f.text_field :user_name %>
</div> </div>
</div> </div>
<div class="control-group"> <div class="form-group">
<label class="control-label muted"><%= t("pseudo_member.email") %></label> <label class="col-sm-2 control-label muted"><%= t("pseudo_member.email") %></label>
<div class="controls"> <div class="col-sm-8">
<%= f.text_field :email %> <%= f.text_field :email %>
</div> </div>
</div> </div>
<div class="control-group"> <div class="form-group">
<label class="control-label muted"><%= t("pseudo_member.first_name") %></label> <label class="col-sm-2 control-label muted"><%= t("pseudo_member.first_name") %></label>
<div class="controls"> <div class="col-sm-8">
<%= f.text_field :first_name %> <%= f.text_field :first_name %>
</div> </div>
</div> </div>
<div class="control-group"> <div class="form-group">
<label class="control-label muted"><%= t("pseudo_member.last_name") %></label> <label class="col-sm-2 control-label muted"><%= t("pseudo_member.last_name") %></label>
<div class="controls"> <div class="col-sm-8">
<%= f.text_field :last_name %> <%= f.text_field :last_name %>
</div> </div>
</div> </div>
<div class="control-group"> <div class="form-group">
<label class="control-label muted"><%= t("pseudo_member.password") %></label> <label class="col-sm-2 control-label muted"><%= t("pseudo_member.password") %></label>
<div class="controls"> <div class="col-sm-8">
<%= f.password_field :password %> <%= f.password_field :password %>
</div> </div>
</div> </div>
<div class="control-group"> <div class="form-group">
<label class="control-label muted"><%= t("pseudo_member.password_confirmation") %></label> <label class="col-sm-2 control-label muted"><%= t("pseudo_member.password_confirmation") %></label>
<div class="controls"> <div class="col-sm-8">
<%= f.password_field :password_confirmation %> <%= f.password_field :password_confirmation %>
</div> </div>
</div> </div>
<div class="control-group"> <div class="form-group">
<div class="controls"> <div class="col-sm-offset-2 col-sm-8">
<input type="submit" class="btn btn-primary"> <input type="submit" value="Register" class="btn btn-primary">
</div> </div>
</div> </div>
<% end %> <% end %>