import React, { Component } from 'react';

import { AbstractForm, ButtonBar, Button } from 'lib/components';

import form from 'lib/form';
import validator from 'lib/validator';


class TimelineReportForm extends AbstractForm {


	validate(customer) {
		let valid = true;
		/*
		if (!validator.required(customer.name)) {
			valid = false;
		}
		*/
		return valid;
	}


	render() {
		return (
			<div className={ this.props.className }>
				<form onSubmit={ this.handleSubmit(this.props.onSubmit) }>
	            	<div className="row row-margin-10">
	            		<div className="col-xs-12 p10">
							<div className="box p10">

								<div className="form">
									<div className="row row-margin-10">
										<div className="col-xs-3">
										</div>
										<div className="col-sm-3">
											<div className="form-field">
												<label>Date from</label>
												{ this.renderDateField("dateFrom", "") }
											</div>
										</div>
										<div className="col-sm-3">
											<div className="form-field">
												<label>Date to</label>
												{ this.renderDateField("dateTo", "") }
											</div>
										</div>
										<div className="col-sm-3">
											<ButtonBar>
												<button type="submit">Report</button>
											</ButtonBar>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>

				</form>
			</div>
		);
	}

}

export default form(TimelineReportForm);
