render() {
    return (
      <div style={{ marginTop: 22}}>
        <h3>Add New Flight</h3>
        <form onSubmit={this.onSubmit}>
          <div className="form-group">
            <label>Flight From: </label>
            <input
              type="text"
              className="form-control"
              value={this.state.flight_from}
              onChange={this.onChangeFlightFrom}
              required
            />
          </div>
          <div className="form-group">
            <label>Flight To: </label>
            <input
              type="text"
              className="form-control"
              value={this.state.flight_to}
              onChange={this.onChangeFlightTo}
              required
            />
          </div>
          <div className="form-group">
            <div className="form-check form-check-inline">
              <input
                className="form-check-input"
                type="radio"
                name="priorityOptions"
                id="priorityLow"
                value="First" 
                checked ={this.state.cabin === "First"}
                onChange={this.onChangeFlightCabin}
              />
              <label className="form-check-label">First</label>
            </div>
            <div className="form-check form-check-inline">
              <input
                className="form-check-input"
                type="radio"
                name="priorityOptions"
                id="priorityMedium"
                value="Business"
                checked={this.state.cabin === "Business"}
                onChange={this.onChangeFlightCabin}
              />
              <label className="form-check-label">Business</label>
            </div>
            <div className="form-check form-check-inline">
              <input
                className="form-check-input"
                type="radio" 
                name="priorityOptions"
                id="priorityHigh"
                value="Economy" 
                checked={this.state.cabin === "Economy"} 
                onChange={this.onChangeFlightCabin}                
              />
              <label className="form-check-label">Economy</label>
            </div>
          </div>
          <div className="form-group">
            <label>Number of Seats Available: </label>
            <input
              type="text"
              className="form-control"
              value={this.state.noSeats}
              onChange={this.onChangeFlightSeats}
              required
            />
          </div>         
          <div className="form-group">
            <label>Flight Date: </label>
            <input
              type="date" 
              className="form-control"
              value={this.state.flight_date}
              onChange={this.onChangeFlightDate}
              required
            />
          </div>
          <div className="form-group">
            <label>Flight Number: </label>
            <input
              type="text" 
              className="form-control"
              value={this.state.flightNum}
              onChange={this.onChangeFlightNo}
              required
            />
          </div>
          <div className="form-group">
            <label>Flight Departure Time: </label>
            <input
              type="text" 
              className="form-control"
              value={this.state.depTime}
              onChange={this.onChangeFlightDep}
              required
            />
          </div>
          <div className="form-group">
            <label>Flight Arrival Time: </label>
            <input
              type="text" 
              className="form-control"
              value={this.state.arrTime}
              onChange={this.onChangeFlightArr}
              required
            />
          </div>
          <div className="form-group">
            <label>Airport Departure Terminal: </label>
            <input
              type="text" 
              className="form-control"
              value={this.state.terminal}
              onChange={this.onChangeFlightTer}
              required
            />
          </div>

          <div className="form-group">
            <input
              type="submit"
              value="Add Flight"
              className="btn btn-primary"
            />
          </div>
        </form>
      </div>
    );
  }
// This following section will display the form that takes the input from the user.
This following section will display the form that takes the input from the user.
This following section will display the form that takes the input from the user .
render() {
    return (
      <div style={{ marginTop: 22}}>
        <h3>Add New Flight</h3>
        <form onSubmit={this.onSubmit}>
          <div className="form-group">
            <label>Flight From: </label>
            <input
              type="text"
              className="form-control"
              value={this.state.flight_from}
              onChange={this.onChangeFlightFrom}
              required
            />
          </div>
          <div className="form-group">
            <label>Flight To: </label>
            <input
              type="text"
              className="form-control"
              value={this.state.flight_to}
              onChange={this.onChangeFlightTo}
              required
            />
          </div>
          <div className="form-group">
            <div className="form-check form-check-inline">
              <input
                className="form-check-input"
                type="radio"
                name="priorityOptions"
                id="priorityLow"
                value="First" 
                checked ={this.state.cabin === "First"}
                onChange={this.onChangeFlightCabin}
              />
              <label className="form-check-label">First</label>
            </div>
            <div className="form-check form-check-inline">
              <input
                className="form-check-input"
                type="radio"
                name="priorityOptions"
                id="priorityMedium"
                value="Business"
                checked={this.state.cabin === "Business"}
                onChange={this.onChangeFlightCabin}
              />
              <label className="form-check-label">Business</label>
            </div>
            <div className="form-check form-check-inline">
              <input
                className="form-check-input"
                type="radio" 
                name="priorityOptions"
                id="priorityHigh"
                value="Economy" 
                checked={this.state.cabin === "Economy"} 
                onChange={this.onChangeFlightCabin}                
              />
              <label className="form-check-label">Economy</label>
            </div>
          </div>
          <div className="form-group">
            <label>Number of Seats Available: </label>
            <input
              type="text"
              className="form-control"
              value={this.state.noSeats}
              onChange={this.onChangeFlightSeats}
              required
            />
          </div>         
          <div className="form-group">
            <label>Flight Date: </label>
            <input
              type="date" 
              className="form-control"
              value={this.state.flight_date}
              onChange={this.onChangeFlightDate}
              required
            />
          </div>
          <div className="form-group">
            <label>Flight Number: </label>
            <input
              type="text" 
              className="form-control"
              value={this.state.flightNum}
              onChange={this.onChangeFlightNo}
              required
            />
          </div>
          <div className="form-group">
            <label>Flight Departure Time: </label>
            <input
              type="text" 
              className="form-control"
              value={this.state.depTime}
              onChange={this.onChangeFlightDep}
              required
            />
          </div>
          <div className="form-group">
            <label>Flight Arrival Time: </label>
            <input
              type="text" 
              className="form-control"
              value={this.state.arrTime}
              onChange={this.onChangeFlightArr}
              required
            />
          </div>
          <div className="form-group">
            <label>Airport Departure Terminal: </label>
            <input
              type="text" 
              className="form-control"
              value={this.state.terminal}
              onChange={this.onChangeFlightTer}
              required
            />
          </div>
          <div className="form-group">
            <input
              type="submit"
              value="Add Flight"
              className="btn btn-primary"
            />
          </div>
        </form>
      </div>
    );
  }
render ( ) { return ( < div style = { { marginTop : 22 } } > < h3 > Add New Flight < / h3 > < form onSubmit = { this . onSubmit } > < div className = "form-group" > < label > Flight From:  < / label > < input type = "text" className = "form-control" value = { this . state . flight_from } onChange = { this . onChangeFlightFrom } required / > < / div > < div className = "form-group" > < label > Flight To:  < / label > < input type = "text" className = "form-control" value = { this . state . flight_to } onChange = { this . onChangeFlightTo } required / > < / div > < div className = "form-group" > < div className = "form-check form-check-inline" > < input className = "form-check-input" type = "radio" name = "priorityOptions" id = "priorityLow" value = "First" checked = { this . state . cabin === "First" } onChange = { this . onChangeFlightCabin } / > < label className = "form-check-label" > First < / label > < / div > < div className = "form-check form-check-inline" > < input className = "form-check-input" type = "radio" name = "priorityOptions" id = "priorityMedium" value = "Business" checked = { this . state . cabin === "Business" } onChange = { this . onChangeFlightCabin } / > < label className = "form-check-label" > Business < / label > < / div > < div className = "form-check form-check-inline" > < input className = "form-check-input" type = "radio" name = "priorityOptions" id = "priorityHigh" value = "Economy" checked = { this . state . cabin === "Economy" } onChange = { this . onChangeFlightCabin } / > < label className = "form-check-label" > Economy < / label > < / div > < / div > < div className = "form-group" > < label > Number of Seats Available:  < / label > < input type = "text" className = "form-control" value = { this . state . noSeats } onChange = { this . onChangeFlightSeats } required / > < / div > < div className = "form-group" > < label > Flight Date:  < / label > < input type = "date" className = "form-control" value = { this . state . flight_date } onChange = { this . onChangeFlightDate } required / > < / div > < div className = "form-group" > < label > Flight Number:  < / label > < input type = "text" className = "form-control" value = { this . state . flightNum } onChange = { this . onChangeFlightNo } required / > < / div > < div className = "form-group" > < label > Flight Departure Time:  < / label > < input type = "text" className = "form-control" value = { this . state . depTime } onChange = { this . onChangeFlightDep } required / > < / div > < div className = "form-group" > < label > Flight Arrival Time:  < / label > < input type = "text" className = "form-control" value = { this . state . arrTime } onChange = { this . onChangeFlightArr } required / > < / div > < div className = "form-group" > < label > Airport Departure Terminal:  < / label > < input type = "text" className = "form-control" value = { this . state . terminal } onChange = { this . onChangeFlightTer } required / > < / div > < div className = "form-group" > < input type = "submit" value = "Add Flight" className = "btn btn-primary" / > < / div > < / form > < / div > ) ; }
This following section will display the form that takes the input from the user.
This following section will display the form that takes the input from the user .