<div class="span11">
	<fieldset>
		<legend>Update Product</legend>

		<div class="row">
			<div class="tabbable span9">

				<ul class="nav nav-tabs">
					<?php $c=0;foreach (StaticList_RecurSchedule::table() as $k=>$v) : ?>
						<li class="<?php echo $c++ ? '' : 'active'; ?>"><a href="#tab<?php echo $k; ?>" data-toggle="tab"><?php echo $v; ?></a></li>
					<?php endforeach ?>
				</ul>

				<div class="tab-content">
					<?php $c=0;foreach (StaticList_RecurSchedule::table() as $k=>$v) : ?>

						<div class="tab-pane <?php echo $c++ ? '' : 'active'; ?>" id="tab<?php echo $k; ?>">
							<?php echo Form::checkbox("price_group[$k][show]",1,$o->is_price_shown($k),array('label'=>'Price Active','class'=>'span2')); ?>

							<?php foreach (ORM::factory('Group')->list_pricegroups() as $go) : ?>

								<div class="row">
									<div class="span2"><?php echo $go->name; ?></div>

									<?php foreach (array_keys($o->price_options()) as $po) : ?>
										<div class="span2">
											<?php echo Form::input("price_group[$k][{$go->id}][{$o->price_option($po)}]",$o->price($go->id,$k,$po),array('placeholder'=>$po,'nocg'=>TRUE,'class'=>'span2')); ?>
										</div>
									<?php endforeach ?> <!-- /price_options() -->
								</div>

							<?php endforeach ?> <!-- /list_pricegroups() -->
						</div> <!-- /tab-pane -->

					<?php endforeach ?> <!-- /StaticList_RecurSchedule -->
				</div> <!-- /tab-content -->

			</div> <!-- /tabbable -->
		</div> <!-- /row -->

		<br>

		<div class="row">
			<?php echo StaticList_YesNo::form('status',$o->status,FALSE,array('label'=>'Product Active','class'=>'span1')); ?>
		</div>

		<div class="row">
			<?php echo StaticList_RecurSchedule::form('price_recurr_default',$o->price_recurr_default,FALSE,array('label'=>'Default Period','class'=>'span2')); ?></td>
		</div> <!-- /row -->

		<div class="row">
			<?php echo Form::input('position',$o->position,array('label'=>'Order','class'=>'span1')); ?>
		</div> <!-- /row -->

		<div class="row">
			<?php echo Form::select('language_id',ORM::factory('Language')->list_select(TRUE),'',array('label'=>'Language','required')); ?>
		</div> <!-- /row -->
	</fieldset>

	<div id="translate"></div>

	<?php if ($plugin_form) { echo '<br/>'.$plugin_form; } ?>

	<div class="row">
		<div class="offset2">
			<button type="submit" class="btn btn-primary">Save changes</button>
			<button type="button" class="btn">Cancel</button>
		</div>
	</div>
</div> <!-- /span -->
