<?php

if ( ! class_exists( 'GFForms' ) ) {
	die();
}

class Wiaas_Field_Order_Bundle_Installation_Date extends GF_Field_Date {

	public $type ='wiaas_order_bundle_installation_date';

	public $inputType = 'date';

	public $dateType = 'datepicker';

	public function get_input_type() {
		return 'date';
	}

	public function get_form_editor_field_title() {
		return esc_attr__( 'Bundle Install Date', 'wiaas' );
	}

	public function add_button( $field_groups ) {
		$field_groups = Wiaas_Order_Fields::maybe_add_order_field_group($field_groups);

		return parent::add_button( $field_groups );
	}

	public function get_form_editor_button() {
		return array(
			'group' => 'wiaas_order_fields',
			'text'  => $this->get_form_editor_field_title(),
		);
	}
}


GF_Fields::register( new Wiaas_Field_Order_Bundle_Installation_Date() );