Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
API Toucan
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Damien Armillon
API Toucan
Commits
6d216eed
Commit
6d216eed
authored
6 years ago
by
Damien
Browse files
Options
Downloads
Patches
Plain Diff
Change calendrier
parent
948a089a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
front/src/FormToucan.js
+15
-9
15 additions, 9 deletions
front/src/FormToucan.js
front/src/ToucanTable.js
+1
-1
1 addition, 1 deletion
front/src/ToucanTable.js
with
16 additions
and
10 deletions
front/src/FormToucan.js
+
15
−
9
View file @
6d216eed
...
...
@@ -51,7 +51,7 @@ class FormToucan extends Component {
}
onDateChange
=
(
event
,{
value
})
=>
{
let
[
day
,
month
,
year
]
=
value
.
split
(
"
-
"
)
let
[
year
,
month
,
day
]
=
value
.
split
(
"
-
"
)
this
.
setState
({
dateShown
:
value
,
date
:
new
Date
(
Date
.
UTC
(
year
,
month
-
1
,
day
,
0
,
0
,
0
))});
}
...
...
@@ -70,7 +70,7 @@ class FormToucan extends Component {
body
:
form
})
.
then
((
response
)
=>
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
// Si la réponse est bonne on reload tout simplement
window
.
location
.
reload
()
}
else
{
try
{
...
...
@@ -101,7 +101,6 @@ class FormToucan extends Component {
<
Form
error
=
{
formError
}
onSubmit
=
{
this
.
onSubmit
}
>
<
Form
.
Group
style
=
{{
margin
:
"
auto
"
}}
>
<
Form
.
Input
style
=
{{
height
:
"
inherit
"
}}
type
=
"
text
"
label
=
"
Thème Toucan
"
placeholder
=
"
Thème
"
...
...
@@ -112,12 +111,20 @@ class FormToucan extends Component {
required
/>
<
DateInput
{
/*
<DateInput
style={{width:"10em",}}
pickerStyle={{active:{backgroundColor:"red"}}}
hideMobileKeyboard
label="Date"
localization="fr"
name="datheu"
onChange={this.onDateChange}
value={this.state.dateShown}
required
/>*/
}
<
Form
.
Input
type
=
"
date
"
label
=
"
Date
"
name
=
"
date
"
onChange
=
{
this
.
onDateChange
}
value
=
{
this
.
state
.
dateShown
}
...
...
@@ -128,12 +135,12 @@ class FormToucan extends Component {
<
Form
.
Input
label
=
"
PDF du Toucan
"
onChange
=
{
this
.
onFileChange
}
style
=
{{
width
:
"
20em
"
}}
name
=
"
toucan
"
accept
=
"
application/pdf
"
type
=
"
file
"
required
/>
<
Form
.
Input
label
=
"
Cover du Toucan
"
onChange
=
{
this
.
onFileChange
}
...
...
@@ -151,7 +158,6 @@ class FormToucan extends Component {
<
/ul
>
}
/
>
<
/Form
>
{
console
.
log
(
this
.
state
.
responseMessage
)}
{
this
.
state
.
responseMessage
?
<
Message
negative
header
=
"
Erreur Serveur
"
content
=
{
this
.
state
.
responseMessage
}
><
/Message>: null
}
<
/div
>
...
...
This diff is collapsed.
Click to expand it.
front/src/ToucanTable.js
+
1
−
1
View file @
6d216eed
...
...
@@ -24,7 +24,7 @@ class ToucanTable extends Component{
render
()
{
return
(
<
Table
celled
padded
collapsing
size
=
"
small
"
textAlign
=
"
center
"
>
<
Table
style
=
{{
margin
:
"
auto
"
}}
celled
padded
collapsing
size
=
"
small
"
textAlign
=
"
center
"
>
<
Table
.
Header
>
<
Table
.
Row
>
<
Table
.
HeaderCell
>
Cover
<
/Table.HeaderCell
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment