From 69fedb371246ca4286a487bdf965ff6affef9727 Mon Sep 17 00:00:00 2001 From: FrancescoUK Date: Sun, 28 Feb 2016 17:08:30 +0000 Subject: [PATCH] bootstrapify inventory form (#116) --- application/views/items/form.php | 52 +++++----- application/views/items/inventory.php | 138 ++++++++++++-------------- 2 files changed, 88 insertions(+), 102 deletions(-) diff --git a/application/views/items/form.php b/application/views/items/form.php index cc4628854..1566e95dc 100644 --- a/application/views/items/form.php +++ b/application/views/items/form.php @@ -64,7 +64,7 @@ 'id'=>'cost_price', 'class'=>'form-control input-sm', 'value'=>$item_info->cost_price) - );?> + );?> @@ -75,11 +75,11 @@
config->item('currency_symbol'); ?> 'unit_price', - 'id'=>'unit_price', - 'class'=>'form-control input-sm', - 'value'=>$item_info->unit_price) - );?> + 'name'=>'unit_price', + 'id'=>'unit_price', + 'class'=>'form-control input-sm', + 'value'=>$item_info->unit_price) + );?>
@@ -88,11 +88,11 @@ lang->line('items_tax_1'), 'tax_percent_1', array('class'=>'control-label col-xs-3')); ?>
'tax_names[]', - 'id'=>'tax_name_1', - 'class'=>'form-control input-sm', - 'value'=> isset($item_tax_info[0]['name']) ? $item_tax_info[0]['name'] : $this->config->item('default_tax_1_name')) - );?> + 'name'=>'tax_names[]', + 'id'=>'tax_name_1', + 'class'=>'form-control input-sm', + 'value'=> isset($item_tax_info[0]['name']) ? $item_tax_info[0]['name'] : $this->config->item('default_tax_1_name')) + );?>
@@ -101,7 +101,7 @@ 'id'=>'tax_percent_name_1', 'class'=>'form-control input-sm', 'value'=> isset($item_tax_info[0]['percent']) ? $item_tax_info[0]['percent'] : $default_tax_1_rate) - );?> + );?> %
@@ -111,11 +111,11 @@ lang->line('items_tax_2'), 'tax_percent_2', array('class'=>'control-label col-xs-3')); ?>
'tax_names[]', - 'id'=>'tax_name_2', - 'class'=>'form-control input-sm', - 'value'=> isset($item_tax_info[1]['name']) ? $item_tax_info[1]['name'] : $this->config->item('default_tax_2_name')) - );?> + 'name'=>'tax_names[]', + 'id'=>'tax_name_2', + 'class'=>'form-control input-sm', + 'value'=> isset($item_tax_info[1]['name']) ? $item_tax_info[1]['name'] : $this->config->item('default_tax_2_name')) + );?>
@@ -124,7 +124,7 @@ 'class'=>'form-control input-sm', 'id'=>'tax_percent_name_2', 'value'=> isset($item_tax_info[1]['percent']) ? $item_tax_info[1]['percent'] : $default_tax_2_rate) - );?> + );?> %
@@ -144,7 +144,7 @@ 'id'=>$key.'_quantity', 'class'=>'quantity form-control', 'value'=>isset($item_info->item_id)?$location_detail['quantity']:0) - );?> + );?> 'receiving_quantity', 'class'=>'form-control input-sm', 'value'=>$item_info->receiving_quantity) - );?> + );?> @@ -171,7 +171,7 @@ 'id'=>'reorder_level', 'class'=>'form-control input-sm', 'value'=>!isset($item_info->item_id)?0:$item_info->reorder_level) - );?> + );?> @@ -183,7 +183,7 @@ 'id'=>'description', 'class'=>'form-control input-sm', 'value'=>$item_info->description) - );?> + );?> @@ -205,7 +205,7 @@ 'id'=>'allow_alt_description', 'value'=>1, 'checked'=>($item_info->allow_alt_description)? 1 : 0) - );?> + );?> @@ -217,7 +217,7 @@ 'id'=>'is_serialized', 'value'=>1, 'checked'=>($item_info->is_serialized)? 1 : 0) - );?> + );?> @@ -229,7 +229,7 @@ 'id'=>'is_deleted', 'value'=>1, 'checked'=>($item_info->deleted)? 1 : 0) - );?> + );?> @@ -250,7 +250,7 @@ 'id'=>'custom'.$i, 'class'=>'form-control input-sm', 'value'=>$item_arr['custom'.$i]) - );?> + );?> lang->line('common_fields_required_message'); ?> + -item_id, array('id'=>'item_form')); ?> +item_id, array('id'=>'item_form', 'class' => 'form-horizontal')); ?>
- -
- lang->line('items_item_number').':', 'name', array('class'=>'wide')); ?> -
- 'item_number', - 'id'=>'item_number', - 'value'=>$item_info->item_number, - 'style' => 'border:none', - 'readonly' => 'readonly' - ); - echo form_input($inumber); - ?> +
+ lang->line('items_item_number').':', 'name', array('class'=>'control-label col-xs-3')); ?> +
+ 'item_number', + 'id'=>'item_number', + 'value'=>$item_info->item_number, + 'class'=>'form-control input-sm', + 'disabled'=>'') + ); ?>
-
- lang->line('items_name').':', 'name', array('class'=>'wide')); ?> -
- 'name', - 'id'=>'name', - 'value'=>$item_info->name, - 'style' => 'border:none', - 'readonly' => 'readonly' - ); - echo form_input($iname); - ?> +
+ lang->line('items_name').':', 'name', array('class'=>'control-label col-xs-3')); ?> +
+ 'name', + 'id'=>'name', + 'value'=>$item_info->name, + 'class'=>'form-control input-sm', + 'disabled'=>'') + ); ?>
-
- lang->line('items_category').':', 'category', array('class'=>'wide')); ?> -
- 'category', - 'id'=>'category', - 'value'=>$item_info->category, - 'style' => 'border:none', - 'readonly' => 'readonly' - ); - echo form_input($cat); - ?> +
+ lang->line('items_category').':', 'category', array('class'=>'control-label col-xs-3')); ?> +
+ 'category', + 'id'=>'category', + 'value'=>$item_info->category, + 'class'=>'form-control input-sm', + 'disabled'=>'') + ); ?>
-
- lang->line('items_stock_location').':', 'stock_location', array('class'=>'wide')); ?> -
- +
+ lang->line('items_stock_location').':', 'stock_location', array('class'=>'control-label col-xs-3')); ?> +
+ 'fill_quantity(this.value)', 'class'=>'form-control')); ?>
-
- lang->line('items_current_quantity').':', 'quantity', array('class'=>'wide')); ?> -
- 'quantity', - 'id'=>'quantity', - 'value'=>current($item_quantities), - 'style' => 'border:none', - 'readonly' => 'readonly' - ); - - echo form_input($qty); - ?> +
+ lang->line('items_current_quantity').':', 'quantity', array('class'=>'control-label col-xs-3')); ?> +
+ 'quantity', + 'id'=>'quantity', + 'value'=>current($item_quantities), + 'class'=>'form-control input-sm', + 'disabled'=>'') + ); ?>
-
- lang->line('items_add_minus').':', 'quantity', array('class'=>'required wide')); ?> -
- 'newquantity', - 'id'=>'newquantity' - ) - );?> +
+ lang->line('items_add_minus').':', 'quantity', array('class'=>'required control-label col-xs-3')); ?> +
+ 'newquantity', + 'id'=>'newquantity', + 'class'=>'form-control input-sm') + ); ?>
-
- lang->line('items_inventory_comments').':', 'description', array('class'=>'wide')); ?> -
- 'trans_comment', - 'id'=>'trans_comment', - 'rows'=>'3', - 'cols'=>'17') - );?> +
+ lang->line('items_inventory_comments').':', 'description', array('class'=>'control-label col-xs-3')); ?> +
+ 'trans_comment', + 'id'=>'trans_comment', + 'class'=>'form-control input-sm') + );?>