Commit 92849e74 by suifeng2012

add react signup form

1 parent 8138aca4
{div, label, input} = React.DOM
@Signup = React.createClass
render: ->
div
className: 'signup'
div
className: 'form-group has-error'
label
className: "control-label col-sm-3"
'Email'
div
className: 'col-sm-7'
input
className: 'form-control input-lg'
type: 'email'
name: 'user[email]'
div
className: 'form-group'
label
className: "control-label col-sm-3"
'Password'
div
className: 'col-sm-7'
input
className: 'form-control input-lg'
type: 'password'
name: 'user[password]'
div
className: 'form-group'
label
className: "control-label col-sm-3"
'Password confirmation'
div
className: 'col-sm-7'
input
className: 'form-control input-lg'
type: 'password'
name: 'user[password_confirmation]'
div
className: 'form-group'
div
className: 'col-sm-offset-3 col-sm-7'
input
className: 'btn btn-primary btn-lg btn-block'
type: 'submit'
value: 'Sign up'
......@@ -4,33 +4,7 @@
<div class="modal-body clearfix">
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: {class: "form-horizontal"}) do |f| %>
<%= devise_error_messages! %>
<div class="form-group">
<%= f.label :email, class: "control-label col-sm-3" %>
<div class="col-sm-7">
<%= f.email_field :email, autofocus: true, class: "form-control input-lg" %>
</div>
</div>
<div class="form-group">
<%= f.label :password, class: "control-label col-sm-3" %>
<div class="col-sm-7">
<%= f.password_field :password, autocomplete: "off", class: "form-control input-lg" %>
</div>
</div>
<div class="form-group">
<%= f.label :password_confirmation, class: "control-label col-sm-3" %>
<div class="col-sm-7">
<%= f.password_field :password_confirmation, autocomplete: "off", class: "form-control input-lg" %>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-7">
<%= f.submit "Sign up", class: "btn btn-primary btn-lg btn-block" %>
</div>
</div>
<%= react_component 'Signup', {} %>
<% end %>
</div> <!-- end body -->
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!