<?php
/**
 * @var $disp_type
 * @var $year_arr
 * @var $select_year
 * @var $month_arr
 * @var $select_month
 * @var $icon
 */

if ( wpj_get_option( 'wpjobster_enable_user_charts' ) == 'yes' ) { ?>

	<div class="ui notpadded no-margin segment user-chart-wrapper js-user-chart-wrapper">
		<div id="chart-div-container" class="ui no-margin segment" style="display: none;">

			<div class="main-content cf">

				<div class="chart-controls">

					<div class="cf right">
						<div class="graph-button">
							<input type="radio" name="disp_type" id="radio1" value="all" <?php echo ( $disp_type == 'all' ? 'checked' : '' ); ?> class="radio" />
							<label for="radio1"><?php _e( 'All', 'wpjobster' ); ?></label>
						</div>

						<div class="graph-button">
							<input type="radio" name="disp_type" id="radio2" value="year" <?php echo ( $disp_type == 'year' ? 'checked' : '' ); ?>  class="radio" />
							<label for="radio2"><?php _e( 'Year', 'wpjobster' ); ?></label>
						</div>

						<div class="graph-button">
							<input type="radio" name="disp_type" id="radio3" value="month" <?php echo ( $disp_type == 'month' ? 'checked' : '' ); ?> class="radio" />
							<label for="radio3"><?php _e( 'Month', 'wpjobster' ); ?></label>
						</div>

						<div class="graph-button">
							<input type="radio" name="disp_type" id="radio4" value="lastweek" <?php echo ( $disp_type == 'lastweek' ? 'checked' : '' ); ?> class="radio" />
							<label for="radio4"><?php _e( 'Last week', 'wpjobster' ); ?></label>
						</div>
					</div>

					<div class="cf left">
						<form action="" id="form_graph" class="hidden">

							<div class="graph-options borderselect" id="select_year" >

								<input type="hidden" name="disp_type" id="disp_type" value="<?php echo $disp_type;?>">

								<?php wpj_display_dropdown( $year_arr, 'select_year', $select_year, ' class="fw400" ' ); ?>

							</div>

							<div class="graph-options borderselect" id="select_month" class="hidden">

								<?php wpj_display_dropdown( $month_arr, 'select_month', $select_month, ' class="fw400" ' ); ?>

							</div>

							<div class="graph-options"><input class="ui primary button" type="button" onclick="wpj_get_user_account_graph();" value="<?php _e( "Go", "wpjobster" );?>" style="margin-top:0;"></div>
						</form>
					</div>

				</div>

			</div>

			<div class="main-content cf">

				<div id="chart_div" style="width: 100%; height: 300px; display: none;"></div>

			</div>

		</div>

		<a class="graph-link"><i class="<?php echo $icon; ?> icon"></i></a>

	</div>

<?php }