Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
ThaliApp
Commits
00ced1e1
Commit
00ced1e1
authored
Jan 30, 2019
by
Gijs Hendriksen
Browse files
Add separate description to event registration fields
parent
404be9cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/ui/screens/events/RegistrationScreen.js
View file @
00ced1e1
...
...
@@ -2,6 +2,7 @@ import React, { Component } from 'react';
import
{
ActivityIndicator
,
KeyboardAvoidingView
,
Linking
,
Modal
,
ScrollView
,
Switch
,
...
...
@@ -11,6 +12,7 @@ import {
}
from
'
react-native
'
;
import
{
translate
}
from
'
react-i18next
'
;
import
PropTypes
from
'
prop-types
'
;
import
HTML
from
'
react-native-render-html
'
;
import
styles
from
'
./style/RegistrationScreen
'
;
import
Colors
from
'
../../style/Colors
'
;
...
...
@@ -94,6 +96,10 @@ class RegistrationScreen extends Component {
const
keys
=
Object
.
keys
(
this
.
props
.
fields
);
const
linkStyles
=
{
color
:
Colors
.
magenta
,
};
return
(
<
KeyboardAvoidingView
style
=
{
styles
.
rootWrapper
}
...
...
@@ -134,6 +140,14 @@ class RegistrationScreen extends Component {
onTintColor
=
{
Colors
.
magenta
}
/
>
<
/View
>
<
HTML
html
=
{
field
.
description
}
onLinkPress
=
{(
event
,
href
)
=>
Linking
.
openURL
(
href
)}
baseFontStyle
=
{
styles
.
description
}
tagsStyles
=
{{
a
:
linkStyles
,
}}
/
>
{
validity
.
isValid
||
(
<
Text
style
=
{
styles
.
invalid
}
>
{
validity
.
reason
}
...
...
@@ -147,6 +161,14 @@ class RegistrationScreen extends Component {
<
Text
style
=
{
styles
.
field
}
>
{
field
.
label
}
<
/Text
>
<
HTML
html
=
{
field
.
description
}
onLinkPress
=
{(
event
,
href
)
=>
Linking
.
openURL
(
href
)}
baseFontStyle
=
{
styles
.
description
}
tagsStyles
=
{{
a
:
linkStyles
,
}}
/
>
<
TextInput
value
=
{
this
.
state
[
key
]}
onChangeText
=
{
value
=>
this
.
updateField
(
key
,
value
)}
...
...
@@ -154,7 +176,6 @@ class RegistrationScreen extends Component {
style
=
{
styles
.
field
}
underlineColorAndroid
=
{
validity
.
isValid
?
Colors
.
lightGray
:
Colors
.
lightRed
}
placeholder
=
{
field
.
description
}
/
>
{
validity
.
isValid
||
(
<
Text
style
=
{
styles
.
invalid
}
>
...
...
app/ui/screens/events/style/RegistrationScreen.js
View file @
00ced1e1
...
...
@@ -39,6 +39,18 @@ const styles = StyleSheet.create({
},
fontSize
:
14
,
color
:
Colors
.
textColour
,
marginBottom
:
8
,
},
description
:
{
android
:
{
fontFamily
:
'
sans-serif-medium
'
,
},
ios
:
{
fontFamily
:
'
System
'
,
fontWeight
:
'
600
'
,
},
fontSize
:
12
,
color
:
Colors
.
gray
,
},
invalid
:
{
android
:
{
...
...
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