diff --git a/front/package.json b/front/package.json index 2a096de73307afc1f04588330a89f0fe60992cdf..0dfd7e3dff24d74b4310dbc36687aeaee4635650 100644 --- a/front/package.json +++ b/front/package.json @@ -7,7 +7,6 @@ "react": "^16.8.6", "react-dom": "^16.8.6", "react-scripts": "3.0.0", - "semantic-ui-calendar-react": "^0.15.0", "semantic-ui-react": "^0.86.0" }, "scripts": { diff --git a/front/src/App.js b/front/src/App.js index aa740d9c230200dee72de938afd8980b9978ea1f..be56d6657b71b36ef1e8a3cb850d0b0cff505102 100644 --- a/front/src/App.js +++ b/front/src/App.js @@ -1,5 +1,5 @@ import React from 'react'; -import {Segment, SegmentGroup} from 'semantic-ui-react'; +import {Segment} from 'semantic-ui-react'; import ToucanTable from './ToucanTable'; import FormToucan from './FormToucan' import './App.css'; diff --git a/front/src/FormToucan.js b/front/src/FormToucan.js index 232a08620fe6f2f8eb0c9dc9a670de4a72bdfca8..49777087901c1614156e28a163c706a4dea83008 100644 --- a/front/src/FormToucan.js +++ b/front/src/FormToucan.js @@ -1,10 +1,6 @@ import React, {Component} from 'react' import {Form, Message} from 'semantic-ui-react' -import {DateInput} from 'semantic-ui-calendar-react' -import 'moment/locale/fr' import env from './.env' - - class FormToucan extends Component { constructor(props) { @@ -98,8 +94,8 @@ class FormToucan extends Component { return ( <div> - <Form error={formError} onSubmit={this.onSubmit} > - <Form.Group style={{margin:"auto"}}> + <Form error={formError} style={{margin:"auto"}} onSubmit={this.onSubmit} > + <Form.Group > <Form.Input type="text" label="Thème Toucan" @@ -108,50 +104,42 @@ class FormToucan extends Component { onChange={this.onTitleChange} value={this.state.title} error={this.state.titleError} + icon="paper plane" + iconPosition="left" required /> - - {/*<DateInput - style={{width:"10em",}} - pickerStyle={{active:{backgroundColor:"red"}}} - hideMobileKeyboard + <Form.Input + type="date" label="Date" - localization="fr" - name="datheu" + name="date" + icon="calendar" + iconPosition="left" onChange={this.onDateChange} value={this.state.dateShown} required - />*/} - <Form.Input - type="date" - label="Date" - name="date" - onChange={this.onDateChange} - value={this.state.dateShown} - required /> </Form.Group> <Form.Group> <Form.Input + type="file" label="PDF du Toucan" onChange={this.onFileChange} - style={{width:"20em"}} + style={{maxWidth:"25em"}} name="toucan" accept="application/pdf" - type="file" required /> <Form.Input + type="file" label="Cover du Toucan" onChange={this.onFileChange} + style={{maxWidth:"25em"}} name="cover" - type="file" accept="image/png, image/jpeg" required /> - <Form.Button disabled={formError} content="C'est parti !" /> </Form.Group> - + <Form.Button disabled={formError} content="C'est parti !" /> <Message error header="Formulaire incomplet" content={ <ul> {errorMessage.map((err) => {return <li>{err}</li>})} diff --git a/front/yarn.lock b/front/yarn.lock index 0509569010bea2cb3602d40835f38c25289ac4f6..0ebf7493ffb4414c03d0e2603edcd6f466f440a2 100644 --- a/front/yarn.lock +++ b/front/yarn.lock @@ -5681,7 +5681,7 @@ jsx-ast-utils@^2.0.1: dependencies: array-includes "^3.0.3" -keyboard-key@^1.0.2, keyboard-key@^1.0.4: +keyboard-key@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/keyboard-key/-/keyboard-key-1.0.4.tgz#52d8fa07b7e17757072aa22a67fb4ae85e4c46b0" integrity sha512-my04dE6BCwPpwoe4KYKfPxWiwgDYQOHrVmtzn1CfzmoEsGG/ef4oZGaXCzi1+iFhG7CN5JkOuxmei5OABY8/ag== @@ -6162,11 +6162,6 @@ mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@ dependencies: minimist "0.0.8" -moment@^2.22.2: - version "2.24.0" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" - integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== - move-concurrently@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" @@ -8398,16 +8393,6 @@ selfsigned@^1.9.1: dependencies: node-forge "0.7.5" -semantic-ui-calendar-react@^0.15.0: - version "0.15.0" - resolved "https://registry.yarnpkg.com/semantic-ui-calendar-react/-/semantic-ui-calendar-react-0.15.0.tgz#1294eed17304e3428b4c39fa5a3deb85db85c22c" - integrity sha512-AG+XrUrpPFwc1/dYgtVnoGZgaOw5ijJiegZuhBnYsyiWux4FITvJXnUsuHyZz4qyjcrVt0tMzNAMutJesVeG1Q== - dependencies: - keyboard-key "^1.0.2" - lodash "^4.17.10" - moment "^2.22.2" - prop-types "^15.6.2" - semantic-ui-react@^0.86.0: version "0.86.0" resolved "https://registry.yarnpkg.com/semantic-ui-react/-/semantic-ui-react-0.86.0.tgz#f3c6a27250f2e9e07a975d0a3399ffd3a48861b5"