<style>
.update-nag{
	display:none;
}

.adc-config-wrap{
	width:800px;
	margin:auto;
}

.adc-config-wrap .header{
	background-color: white;
	border: 1px solid rgba(200, 215, 225, 0.5);
	padding: 20px;
	margin-bottom: 20px;
}
.adc-config-wrap form{	
	border: 1px solid rgba(200, 215, 225, 0.5);
	background-color: white;
	padding: 20px;	
}
.adc-config-wrap .option_group{
	padding:10px;
}
.adc-config-wrap .option_group label{
	width:320px;
	display: inline-block;
}
.adc-config-wrap .option_group input[type="text"]{
	border: 1px solid #ddd;
    -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .07);
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, .07);
    background-color: #fff;
	color: #32373c;
	outline: 0;
    -webkit-transition: 50ms border-color ease-in-out;
	transition: 50ms border-color ease-in-out;
	line-height: 28px;
	width:400px;
}
.adc-config-wrap .option_group input[type="submit"]{

}
.adc-config-wrap .option_group select{
	width:400px;	
}
</style>
<div class="adc-config-wrap">
	<div class="header">
		<h2>ADC Settings</h2>
	</div>
	<form method="post" action="options.php">
		<?php wp_nonce_field('update-options'); ?>

		<div class="option_group">
			<label for="adc_api_endpoint">API URL</label>
			<input type="text" id="adc_api_endpoint" name="adc_api_endpoint" value="<?php echo get_option('adc_api_endpoint'); ?>" />
		</div>

		<div class="option_group">
			<label for="adc_api_key">API Key</label>
			<input type="text" id="adc_api_key" name="adc_api_key" value="<?php echo get_option('adc_api_key'); ?>" />
		</div>

		<div class="option_group">
			<label for="adc_tiles_page">Tiles Page</label>
            <select id="adc_tiles_page" name="adc_tiles_page_id">
            	<option value="0">Select</option>
            	<? foreach( get_pages() as $page ):?>
					<option value="<?=$page->ID?>" <?=get_option("adc_tiles_page_id") == $page->ID? 'selected="selected"':''?>>
						<? if (strlen($page->post_title) > 0):?>
							<?=$page->post_title?>
						<? else:?>
							No Title #<?=$page->ID?>
						<? endif;?>
					</option>
				<? endforeach;?>
            </select>
        </div>

        <div class="option_group">
			<label for="adc_details_page">Product Details Page</label>
            <select id="adc_details_page" name="adc_details_page_id">
            	<? foreach( get_pages() as $page ):?>
					<option value="<?=$page->ID?>" <?=get_option("adc_details_page_id") == $page->ID? 'selected="selected"':''?>>
						<? if (strlen($page->post_title) > 0):?>
							<?=$page->post_title?>
						<? else:?>
							No Title #<?=$page->ID?>
						<? endif;?>
					</option>
				<? endforeach;?>
            </select>
        </div>
		<input type="hidden" name="action" value="update" />
		<input type="hidden" name="page_options" value="adc_api_endpoint,adc_api_key,adc_details_page_id,adc_tiles_page_id" />

		<div class="option_group">
			<label></label>
			<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
		</div>
	</form>
</div>