Fakultas Ilmu Komputer UI

Commit 0bcd7df0 authored by ISNAINI NURUL KHASANAH's avatar ISNAINI NURUL KHASANAH
Browse files

Sprint 3 : mencegah field kosong saat edit profil perusahaan

parent 57e01d81
...@@ -191,16 +191,17 @@ karyawan ...@@ -191,16 +191,17 @@ karyawan
key={this.state.refresh} key={this.state.refresh}
onSubmit={this.handleSubmit} onSubmit={this.handleSubmit}
> >
<Form.Field> <Form.Field required>
<label htmlFor="name">Nama Perusahaan</label> <label htmlFor="name">Nama Perusahaan</label>
<input <input
placeholder="Nama Perusahaan" placeholder="Nama Perusahaan"
name="name" name="name"
onChange={this.handleChange} onChange={this.handleChange}
defaultValue={this.state.name === null ? null : this.state.name} defaultValue={this.state.name === null ? null : this.state.name}
required
/> />
</Form.Field> </Form.Field>
<Form.Field> <Form.Field required>
<label htmlFor="address">Alamat Perusahaan</label> <label htmlFor="address">Alamat Perusahaan</label>
<input <input
placeholder="Alamat Perusahaan" placeholder="Alamat Perusahaan"
...@@ -209,9 +210,10 @@ karyawan ...@@ -209,9 +210,10 @@ karyawan
defaultValue={ defaultValue={
this.state.address === null ? null : this.state.address this.state.address === null ? null : this.state.address
} }
required
/> />
</Form.Field> </Form.Field>
<Form.Field> <Form.Field required>
<label htmlFor="description">Deskripsi</label> <label htmlFor="description">Deskripsi</label>
<TextArea <TextArea
placeholder="Try adding multiple lines" placeholder="Try adding multiple lines"
...@@ -223,9 +225,10 @@ karyawan ...@@ -223,9 +225,10 @@ karyawan
? null ? null
: this.state.description : this.state.description
} }
required
/> />
</Form.Field> </Form.Field>
<Form.Field> <Form.Field required>
<label htmlFor="size">Jumlah karyawan</label> <label htmlFor="size">Jumlah karyawan</label>
<input <input
placeholder="Jumlah karyawan keseluruhan" placeholder="Jumlah karyawan keseluruhan"
...@@ -235,9 +238,10 @@ karyawan ...@@ -235,9 +238,10 @@ karyawan
defaultValue={ defaultValue={
this.state.size === null ? '0' : this.state.size this.state.size === null ? '0' : this.state.size
} }
required
/> />
</Form.Field> </Form.Field>
<Form.Field> <Form.Field required>
<label htmlFor="website">Website</label> <label htmlFor="website">Website</label>
<input <input
placeholder="Alamat Website" placeholder="Alamat Website"
...@@ -246,6 +250,7 @@ karyawan ...@@ -246,6 +250,7 @@ karyawan
defaultValue={ defaultValue={
this.state.website === null ? null : this.state.website this.state.website === null ? null : this.state.website
} }
required
/> />
</Form.Field> </Form.Field>
<Form.Field> <Form.Field>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment