<?php 
	Template::show('ICSFleet/header.php');
?>
<section class="form-elegant">

  <!-- Grid row -->
  <div class="row">

    <!-- Grid column -->
    <div class="col-md-12">

      <!--Form without header-->
      <div class="card">

        <div class="card-body mx-4">
          <!--Header-->
          <div class="text-center">
            <h3 class="dark-grey-text mb-5"><strong><?php echo $category->name; ?></strong>
        	</h3>
          </div>
          
        <form class="form" action="<?php echo adminurl('ICSFleet/category_process'); ?>" method="POST">
        	 
	
	
		<div class="md-form">
            <input type="text" name="name" <?php if($category->name != '') { ?> value="<?php echo $category->name; ?>" <?php } ?> class="form-control" required>
            <label for="Form-email1">Category Name</label>
          </div>
          
          
		<div class="md-form">
            <label for="Form-email1">About Category (50 words max)</label>
            <textarea rows="1" name="about" class="md-textarea form-control" required><?php echo $category->description; ?></textarea>
          </div>
          
          
          <label for="Form-email1">Category Status?</label>
          <br>
         <div class="md-form">
         		<select name="active" class="browser-default custom-select">
        	<?php 
        		if($category->active == 1) {
        			?>
        			<option value="0">Inactive</option>
					<option value="1" selected>Active</option>
        			<?php
        		} else {
        			?>
        			<option value="0"selected >Inactive</option>
					<option value="1" >Active</option>
        			<?php
        		}
        	?>
		</select>
         </div>
          
          <div class="text-center mb-3">
          	<input type="hidden" name="category_id" value="<?php echo $category->category_id; ?>" />
          	<input type="hidden" name="action" value="<?php echo $action; ?>" />
          	<input type="submit" name="submit" value="<?php echo $action; ?>" class="btn blue-gradient btn-block btn-rounded z-depth-1a" />
          </div>
        </div>
        </form>

      </div>
      <!--/Form without header-->

    </div>
    <!-- Grid column -->

  </div>
  <!-- Grid row -->

</section>  