Input Form Bugfix
Kursname, Theorieanfang und Ende müssen nun gesetzt werden sonst kann kein Kurs angelegt werden
This commit is contained in:
@@ -280,7 +280,7 @@ export default function InputForm(p) {
|
|||||||
<div className={"box-shadow input-form round-border"}>
|
<div className={"box-shadow input-form round-border"}>
|
||||||
|
|
||||||
<p>Kursname</p>
|
<p>Kursname</p>
|
||||||
<input type={"text"} className={"box-shadow round-border"} style={{padding: 8, width: "100%"}}
|
<input type={"text"} className={"box-shadow round-border"} style={{padding: 8, width: "100%", backgroundColor: (courseName == "") ? "#E44747" : "white"}}
|
||||||
onChange={e => onCourseNameChange(e)} value={courseName}/>
|
onChange={e => onCourseNameChange(e)} value={courseName}/>
|
||||||
|
|
||||||
<div style={{display: "flex", justifyContent: "flex-start", gap: 40}}>
|
<div style={{display: "flex", justifyContent: "flex-start", gap: 40}}>
|
||||||
@@ -288,9 +288,11 @@ export default function InputForm(p) {
|
|||||||
<p>Theorie Ende</p>
|
<p>Theorie Ende</p>
|
||||||
</div>
|
</div>
|
||||||
<div style={{display: "flex", justifyContent: "flex-start", gap: 20}}>
|
<div style={{display: "flex", justifyContent: "flex-start", gap: 20}}>
|
||||||
<input type={"date"} className={"box-shadow round-border"} style={{padding: 8}}
|
<input type={"date"} className={"box-shadow round-border"} style={{padding: 8, backgroundColor: (startDate == "" || startDate >= endDate) ? "#E44747" : "white"
|
||||||
|
}}
|
||||||
onChange={e => onStartDateChange(e)} value={startDate}/>
|
onChange={e => onStartDateChange(e)} value={startDate}/>
|
||||||
<input type={"date"} className={"box-shadow round-border"} style={{padding: 8}}
|
<input type={"date"} className={"box-shadow round-border"} style={{padding: 8, backgroundColor: (endDate == "" || startDate >= endDate) ? "#E44747" : "white"
|
||||||
|
}}
|
||||||
onChange={e => onEndDateChange(e)} value={endDate}/>
|
onChange={e => onEndDateChange(e)} value={endDate}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -353,7 +355,7 @@ export default function InputForm(p) {
|
|||||||
gap: 10
|
gap: 10
|
||||||
}}>
|
}}>
|
||||||
<Button text={"Abbrechen"} onClick={onButtonAbort}/>
|
<Button text={"Abbrechen"} onClick={onButtonAbort}/>
|
||||||
<Button text={"Speichern"} color={"#77932b"} onClick={onButtonSave}/>
|
<Button text={"Speichern"} color={"#77932b"} onClick={() => { (startDate == "" || endDate == ""|| startDate >= endDate || courseName == "") ? () => {} : onButtonSave()}}/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in New Issue
Block a user