<?php

/**
 * File template form edit nhanh 1 taxonomy
 */
?>
<form action="?run=taxonomy_ajax.php&key=<?php 
echo hm_get('key');
?>
&action=edit&id=<?php 
echo hm_get('id');
?>
" method="post" class="ajaxForm ajaxFormTaxonomyEdit">
	<?php 
taxonomy_select_parent($args['taxonomy_key'], $args['object_id']);
foreach ($args['taxonomy_field'] as $field) {
    $field['object_id'] = $args['object_id'];
    $field['object_type'] = $args['object_type'];
    $field['default_value'] = get_tax_val(array('name' => $field['name'], 'id' => $field['object_id']));
    build_input_form($field);
}
?>
	<button name="submit" type="submit" class="btn btn-default"><?php 
echo $args['edit_item'];
?>
</button>
</form>
<script type="text/javascript">
	$('.ajaxFormTaxonomyEdit').ajaxForm(function(data) {
		$('.quick_edit_tr').remove();
		$('.custom_paged').click();
?>
</h1>
	</div>
	<div class="col-md-3">
		<p class="page_action"><?php 
echo $args['add_new_item'];
?>
</p>
		<form action="?run=taxonomy_ajax.php&key=<?php 
echo hm_get('key');
?>
&action=add" method="post" class="ajaxForm ajaxFormTaxonomyAdd">
			<div class="list-form-input">
				<?php 
$fields = $args['taxonomy_field'];
taxonomy_select_parent($args['taxonomy_key']);
foreach ($fields as $field) {
    build_input_form($field);
}
?>
			</div>
			<?php 
taxonomy_box(array('taxonomy_key' => $args['taxonomy_key'], 'position' => 'left'));
?>
			<button name="submit" type="submit" class="btn btn-default"><?php 
echo $args['add_new_item'];
?>
</button>
		</form>
	</div>
	<div class="col-md-9">