Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
1c7dc73e
Commit
1c7dc73e
authored
Jul 26, 2016
by
Matthew Taylor
Committed by
GitHub
Jul 26, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #753 from mewtaylor/issue/gh-749
Fix GH-749: Fix formatting for a few form elements
parents
cd3eafe9
e87a2bce
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
72 additions
and
66 deletions
+72
-66
src/components/card/card.scss
src/components/card/card.scss
+25
-19
src/components/forms/checkbox.jsx
src/components/forms/checkbox.jsx
+1
-3
src/components/forms/input.jsx
src/components/forms/input.jsx
+5
-5
src/components/forms/input.scss
src/components/forms/input.scss
+1
-1
src/components/forms/phone-input.jsx
src/components/forms/phone-input.jsx
+3
-3
src/components/forms/phone-input.scss
src/components/forms/phone-input.scss
+1
-1
src/components/forms/row.scss
src/components/forms/row.scss
+12
-1
src/components/forms/select.scss
src/components/forms/select.scss
+1
-1
src/components/forms/textarea.jsx
src/components/forms/textarea.jsx
+4
-2
src/components/forms/textarea.scss
src/components/forms/textarea.scss
+1
-1
src/components/navigation/www/navigation.jsx
src/components/navigation/www/navigation.jsx
+7
-4
src/components/navigation/www/navigation.scss
src/components/navigation/www/navigation.scss
+9
-3
src/components/registration/steps.scss
src/components/registration/steps.scss
+2
-22
No files found.
src/components/card/card.scss
View file @
1c7dc73e
...
@@ -21,25 +21,6 @@
...
@@ -21,25 +21,6 @@
}
}
}
}
.form
{
position
:
relative
;
padding
:
3rem
4rem
;
.card-button
{
margin
:
0
0
-3rem
-4rem
;
}
.form-group
{
margin-bottom
:
1
.2rem
;
&
.has-error
{
.input
{
border
:
1px
solid
$ui-orange
;
}
}
}
}
.validation-message
{
.validation-message
{
$arrow-border-width
:
1rem
;
$arrow-border-width
:
1rem
;
display
:
block
;
display
:
block
;
...
@@ -77,6 +58,31 @@
...
@@ -77,6 +58,31 @@
}
}
}
}
.checkbox-row
,
.textarea-row
{
.validation-message
{
transform
:
translate
(
20rem
,
0
);
}
}
.form
{
position
:
relative
;
padding
:
3rem
4rem
;
.card-button
{
margin
:
0
0
-3rem
-4rem
;
}
.row
{
margin-bottom
:
1
.2rem
;
&
.has-error
{
.input
{
border
:
1px
solid
$ui-orange
;
}
}
}
}
}
}
@media
only
screen
and
(
max-width
:
$mobile
-
1
)
{
@media
only
screen
and
(
max-width
:
$mobile
-
1
)
{
...
...
src/components/forms/checkbox.jsx
View file @
1c7dc73e
...
@@ -15,9 +15,7 @@ var Checkbox = React.createClass({
...
@@ -15,9 +15,7 @@ var Checkbox = React.createClass({
this
.
props
.
className
this
.
props
.
className
);
);
return
(
return
(
<
div
className=
{
classes
}
>
<
FRCCheckbox
rowClassName=
{
classes
}
{
...
this
.
props
}
/>
<
FRCCheckbox
{
...
this
.
props
}
/>
</
div
>
);
);
}
}
});
});
...
...
src/components/forms/input.jsx
View file @
1c7dc73e
...
@@ -29,14 +29,14 @@ var Input = React.createClass({
...
@@ -29,14 +29,14 @@ var Input = React.createClass({
},
},
render
:
function
()
{
render
:
function
()
{
var
classes
=
classNames
(
var
classes
=
classNames
(
'
input
'
,
this
.
state
.
status
,
this
.
state
.
status
,
this
.
props
.
className
this
.
props
.
className
,
{
'
no-label
'
:
(
typeof
this
.
props
.
label
===
'
undefined
'
)}
);
);
return
(
this
.
props
.
type
===
'
submit
'
||
this
.
props
.
noformsy
?
return
(
<
input
{
...
this
.
props
}
className=
{
classes
}
/>
:
<
FRCInput
{
...
this
.
props
}
<
FRCInput
{
...
this
.
props
}
className=
{
classes
}
className=
"input"
rowClassName=
{
classes
}
onValid=
{
this
.
onValid
}
onValid=
{
this
.
onValid
}
onInvalid=
{
this
.
onInvalid
}
/>
onInvalid=
{
this
.
onInvalid
}
/>
);
);
...
...
src/components/forms/input.scss
View file @
1c7dc73e
...
@@ -12,7 +12,7 @@ $pass-bg: lighten($ui-aqua, 35%);
...
@@ -12,7 +12,7 @@ $pass-bg: lighten($ui-aqua, 35%);
.input
{
.input
{
transition
:
all
.5s
ease
;
transition
:
all
.5s
ease
;
margin
:
.75rem
0
;
margin
-bottom
:
.75rem
;
border
:
1px
solid
$active-gray
;
border
:
1px
solid
$active-gray
;
border-radius
:
5px
;
border-radius
:
5px
;
background-color
:
$base-bg
;
background-color
:
$base-bg
;
...
...
src/components/forms/phone-input.jsx
View file @
1c7dc73e
...
@@ -42,7 +42,7 @@ var PhoneInput = React.createClass({
...
@@ -42,7 +42,7 @@ var PhoneInput = React.createClass({
return
(
return
(
<
Row
{
...
this
.
getRowProperties
()}
<
Row
{
...
this
.
getRowProperties
()}
htmlFor=
{
this
.
getId
()
}
htmlFor=
{
this
.
getId
()
}
c
lassName=
{
classNames
(
'
phone-input
'
,
this
.
props
.
className
)
}
rowC
lassName=
{
classNames
(
'
phone-input
'
,
this
.
props
.
className
)
}
>
>
<
div
className=
"input-group"
>
<
div
className=
"input-group"
>
<
ReactPhoneInput
className=
"form-control"
<
ReactPhoneInput
className=
"form-control"
...
@@ -53,9 +53,9 @@ var PhoneInput = React.createClass({
...
@@ -53,9 +53,9 @@ var PhoneInput = React.createClass({
label=
{
null
}
label=
{
null
}
disabled=
{
this
.
isFormDisabled
()
||
this
.
props
.
disabled
}
disabled=
{
this
.
isFormDisabled
()
||
this
.
props
.
disabled
}
/>
/>
</
div
>
{
this
.
renderHelp
()
}
{
this
.
renderHelp
()
}
{
this
.
renderErrorMessage
()
}
{
this
.
renderErrorMessage
()
}
</
div
>
</
Row
>
</
Row
>
);
);
}
}
...
...
src/components/forms/phone-input.scss
View file @
1c7dc73e
@import
"../../colors"
;
@import
"../../colors"
;
.input-group
{
.input-group
{
margin
:
.75rem
0
;
width
:
100%
;
width
:
100%
;
}
}
.react-tel-input
{
.react-tel-input
{
margin-bottom
:
.75rem
;
width
:
100%
;
width
:
100%
;
input
{
input
{
...
...
src/components/forms/row.scss
View file @
1c7dc73e
...
@@ -4,8 +4,19 @@
...
@@ -4,8 +4,19 @@
* the formsy-react-components
* the formsy-react-components
*/
*/
.
form-group
{
.
row
{
.required-symbol
{
.required-symbol
{
display
:
none
;
display
:
none
;
}
}
label
{
display
:
inline-block
;
margin-bottom
:
.75rem
;
}
&
.no-label
{
label
{
display
:
none
;
}
}
}
}
src/components/forms/select.scss
View file @
1c7dc73e
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
select
{
select
{
transition
:
all
.5s
ease
;
transition
:
all
.5s
ease
;
margin
:
.75rem
0
;
margin
-bottom
:
.75rem
;
border
:
1px
solid
$active-gray
;
border
:
1px
solid
$active-gray
;
border-radius
:
5px
;
border-radius
:
5px
;
background
:
$ui-light-gray
url("../../../static/svgs/forms/carot.svg")
no-repeat
right
center
;
background
:
$ui-light-gray
url("../../../static/svgs/forms/carot.svg")
no-repeat
right
center
;
...
...
src/components/forms/textarea.jsx
View file @
1c7dc73e
...
@@ -11,11 +11,13 @@ var TextArea = React.createClass({
...
@@ -11,11 +11,13 @@ var TextArea = React.createClass({
type
:
'
TextArea
'
,
type
:
'
TextArea
'
,
render
:
function
()
{
render
:
function
()
{
var
classes
=
classNames
(
var
classes
=
classNames
(
'
textarea
'
,
'
textarea
-row
'
,
this
.
props
.
className
this
.
props
.
className
);
);
return
(
return
(
<
FRCTextarea
{
...
this
.
props
}
className=
{
classes
}
/>
<
FRCTextarea
{
...
this
.
props
}
className=
"textarea"
rowClassName=
{
classes
}
/>
);
);
}
}
});
});
...
...
src/components/forms/textarea.scss
View file @
1c7dc73e
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
.textarea
{
.textarea
{
transition
:
all
1s
ease
;
transition
:
all
1s
ease
;
margin
:
.75rem
0
;
margin
-bottom
:
.75rem
;
border
:
1px
solid
$active-gray
;
border
:
1px
solid
$active-gray
;
border-radius
:
5px
;
border-radius
:
5px
;
background-color
:
$ui-light-gray
;
background-color
:
$ui-light-gray
;
...
...
src/components/navigation/www/navigation.jsx
View file @
1c7dc73e
...
@@ -11,6 +11,7 @@ var api = require('../../../lib/api');
...
@@ -11,6 +11,7 @@ var api = require('../../../lib/api');
var
Avatar
=
require
(
'
../../avatar/avatar.jsx
'
);
var
Avatar
=
require
(
'
../../avatar/avatar.jsx
'
);
var
Button
=
require
(
'
../../forms/button.jsx
'
);
var
Button
=
require
(
'
../../forms/button.jsx
'
);
var
Dropdown
=
require
(
'
../../dropdown/dropdown.jsx
'
);
var
Dropdown
=
require
(
'
../../dropdown/dropdown.jsx
'
);
var
Form
=
require
(
'
../../forms/form.jsx
'
);
var
Input
=
require
(
'
../../forms/input.jsx
'
);
var
Input
=
require
(
'
../../forms/input.jsx
'
);
var
log
=
require
(
'
../../../lib/log.js
'
);
var
log
=
require
(
'
../../../lib/log.js
'
);
var
Login
=
require
(
'
../../login/login.jsx
'
);
var
Login
=
require
(
'
../../login/login.jsx
'
);
...
@@ -170,6 +171,9 @@ var Navigation = React.createClass({
...
@@ -170,6 +171,9 @@ var Navigation = React.createClass({
this
.
props
.
dispatch
(
sessionActions
.
refreshSession
());
this
.
props
.
dispatch
(
sessionActions
.
refreshSession
());
this
.
closeRegistration
();
this
.
closeRegistration
();
},
},
onSearchSubmit
:
function
(
formData
)
{
window
.
location
.
href
=
'
/search/projects?q=
'
+
formData
.
q
;
},
render
:
function
()
{
render
:
function
()
{
var
classes
=
classNames
({
var
classes
=
classNames
({
'
logged-in
'
:
this
.
props
.
session
.
session
.
user
'
logged-in
'
:
this
.
props
.
session
.
session
.
user
...
@@ -216,14 +220,13 @@ var Navigation = React.createClass({
...
@@ -216,14 +220,13 @@ var Navigation = React.createClass({
</
li
>
</
li
>
<
li
className=
"search"
>
<
li
className=
"search"
>
<
form
action=
"/search/projects"
method=
"get"
>
<
Form
onSubmit=
{
this
.
onSearchSubmit
}
>
<
Button
type=
"submit"
className=
"btn-search"
/>
<
Button
type=
"submit"
className=
"btn-search"
/>
<
Input
type=
"text"
<
Input
type=
"text"
aria
-
label=
{
formatMessage
({
id
:
'
general.search
'
})
}
aria
-
label=
{
formatMessage
({
id
:
'
general.search
'
})
}
placeholder=
{
formatMessage
({
id
:
'
general.search
'
})
}
placeholder=
{
formatMessage
({
id
:
'
general.search
'
})
}
name=
"q"
name=
"q"
/>
noformsy
/>
</
Form
>
</
form
>
</
li
>
</
li
>
{
this
.
props
.
session
.
status
===
sessionActions
.
Status
.
FETCHED
?
(
{
this
.
props
.
session
.
status
===
sessionActions
.
Status
.
FETCHED
?
(
this
.
props
.
session
.
session
.
user
?
[
this
.
props
.
session
.
session
.
user
?
[
...
...
src/components/navigation/www/navigation.scss
View file @
1c7dc73e
...
@@ -47,12 +47,18 @@
...
@@ -47,12 +47,18 @@
width
:
100%
;
width
:
100%
;
}
}
form
{
.
form
{
margin
:
0
;
margin
:
0
;
}
}
input
,
.row
{
button
{
.help-block
{
display
:
none
;
}
}
.input
,
.button
{
display
:
inline-block
;
display
:
inline-block
;
margin-top
:
5px
;
margin-top
:
5px
;
outline
:
none
;
outline
:
none
;
...
...
src/components/registration/steps.scss
View file @
1c7dc73e
...
@@ -66,26 +66,12 @@
...
@@ -66,26 +66,12 @@
margin-bottom
:
1
.25rem
;
margin-bottom
:
1
.25rem
;
}
}
}
}
.validation-message
{
margin-top
:
.5rem
;
}
.checkbox-row
{
.validation-message
{
margin-top
:
0
;
}
}
}
}
&
.organization-step
{
&
.organization-step
{
.validation-message
{
transform
:
translate
(
16rem
,
-4rem
);
}
.checkbox-group
{
.checkbox-group
{
.validation-message
{
.validation-message
{
transform
:
translate
(
16
rem
,
-16rem
);
transform
:
translate
(
20
rem
,
-16rem
);
}
}
}
}
...
@@ -103,7 +89,7 @@
...
@@ -103,7 +89,7 @@
&
.address-step
{
&
.address-step
{
.select
{
.select
{
.validation-message
{
.validation-message
{
transform
:
translate
(
0
,
.5rem
);
transform
:
translate
(
20rem
,
.5rem
);
}
}
}
}
}
}
...
@@ -119,12 +105,6 @@
...
@@ -119,12 +105,6 @@
}
}
}
}
}
}
}
.validation-message
{
margin-top
:
.75rem
;
}
}
p
{
p
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment