Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
hfpp2012
/
react-rails-demo
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 92849e74
authored
Jul 09, 2015
by
suifeng2012
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add react signup form
1 parent
8138aca4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
27 deletions
app/assets/javascripts/components/signup.js.coffee
app/views/devise/registrations/new.html.erb
app/assets/javascripts/components/signup.js.coffee
0 → 100644
View file @
92849e7
{
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'
app/views/devise/registrations/new.html.erb
View file @
92849e7
...
...
@@ -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 -->
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment