Add bootstrap form style to item kits, suppliers, giftcards, and excel import in

items and customers (#118)
Fix dialog submission in all pages (#328)
This commit is contained in:
jekkos
2016-02-18 08:57:17 +01:00
parent 82a3f9a3e2
commit 808943f250
12 changed files with 201 additions and 209 deletions

View File

@@ -1,23 +1,25 @@
<?php echo form_open_multipart('customers/do_excel_import/',array('id'=>'item_form', 'class'=>'form-horizontal')); ?>
<div id="required_fields_message"><?php echo $this->lang->line('customers_import_items_excel'); ?></div>
<ul id="error_message_box" class="error_message_box"></ul>
<b><a href="<?php echo site_url('customers/excel'); ?>"><?php echo $this->lang->line('common_download_import_template'); ?></a></b>
<fieldset id="item_basic_info">
<legend><?php echo $this->lang->line('common_import'); ?></legend>
<div class="form-group">
<?php echo form_label($this->lang->line('common_import_file_path').':', 'name',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_upload(array(
'name'=>'file_path',
'id'=>'file_path',
'class'=>'form-control',
'value'=>'')
);?>
<div class="col-xs-6">
<a href="<?php echo site_url('customers/excel'); ?>"><?php echo $this->lang->line('common_download_import_template'); ?></a>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('common_import_file_path'), 'name',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<label class="file">
<input type="file" id="file_input" name="file_input">
<span class="file-custom"></span>
</label>
</div>
</div>
?>
</fieldset>
<?php echo form_close(); ?>
<script type='text/javascript'>
@@ -31,7 +33,7 @@ $(document).ready(function()
$(form).ajaxSubmit({
success:function(response)
{
dialog_support.hide();;
dialog_support.hide();
post_person_form_submit(response);
},
dataType:'json'

View File

@@ -1,37 +1,40 @@
<?php echo form_open('customers/save/'.$person_info->person_id,array('id'=>'customer_form', 'class'=>'form-horizontal')); ?>
<div id="required_fields_message"><?php echo $this->lang->line('common_fields_required_message'); ?></div>
<ul id="error_message_box" class="error_message_box"></ul>
<?php $this->load->view("people/form_basic_info"); ?>
<fieldset id="customer_basic_info">
<legend><?php echo $this->lang->line("customers_basic_information"); ?></legend>
<?php $this->load->view("people/form_basic_info"); ?>
<div class="form-group">
<?php echo form_label($this->lang->line('customers_company_name'), 'company_name', array('class' => 'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'company_name',
'class'=>'form-control',
'value'=>$person_info->company_name)
);?>
<div class="form-group">
<?php echo form_label($this->lang->line('customers_company_name'), 'company_name', array('class' => 'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'company_name',
'class'=>'form-control',
'value'=>$person_info->company_name)
);?>
</div>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('customers_account_number'), 'account_number', array('class' => 'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'account_number',
'id'=>'account_number',
'class'=>'account_number form-control',
'value'=>$person_info->account_number)
);?>
<div class="form-group">
<?php echo form_label($this->lang->line('customers_account_number'), 'account_number', array('class' => 'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'account_number',
'id'=>'account_number',
'class'=>'account_number form-control',
'value'=>$person_info->account_number)
);?>
</div>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('customers_taxable'), 'taxable', array('class' => 'control-label col-xs-3')); ?>
<div class='col-xs-1'>
<?php echo form_checkbox('taxable', '1', $person_info->taxable == '' ? TRUE : (boolean)$person_info->taxable, 'class="form-control"');?>
<div class="form-group">
<?php echo form_label($this->lang->line('customers_taxable'), 'taxable', array('class' => 'control-label col-xs-3')); ?>
<div class='col-xs-1'>
<?php echo form_checkbox('taxable', '1', $person_info->taxable == '' ? TRUE : (boolean)$person_info->taxable);?>
</div>
</div>
</div>
</fieldset>
<?php echo form_close(); ?>
<script type='text/javascript'>

View File

@@ -1,4 +1,4 @@
<?php echo form_open('employees/save/'.$person_info->person_id,array('id'=>'employee_form')); ?>
<?php echo form_open('employees/save/'.$person_info->person_id,array('id'=>'employee_form', 'class'=> 'form-horizontal')); ?>
<div id="required_fields_message"><?php echo $this->lang->line('common_fields_required_message'); ?></div>
<ul id="error_message_box" class="error_message_box"></ul>
<fieldset id="employee_basic_info">
@@ -8,36 +8,39 @@
<fieldset id="employee_login_info">
<legend><?php echo $this->lang->line("employees_login_info"); ?></legend>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('employees_username').':', 'username',array('class'=>'required')); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('employees_username'), 'username',array('class'=>'required control-label col-xs-3')); ?>
<div class='col-xs-5'>
<?php echo form_input(array(
'name'=>'username',
'id'=>'username',
'class'=>'form-control',
'value'=>$person_info->username));?>
</div>
</div>
<?php
$password_label_attributes = $person_info->person_id == "" ? array('class'=>'required'):array();
$password_label_attributes = $person_info->person_id == "" ? array('class'=>'required col-xs-3 control-label'):array();
?>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('employees_password').':', 'password',$password_label_attributes); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('employees_password'), 'password',$password_label_attributes); ?>
<div class='col-xs-5'>
<?php echo form_password(array(
'name'=>'password',
'id'=>'password'
'id'=>'password',
'class'=>'form-control'
));?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('employees_repeat_password').':', 'repeat_password',$password_label_attributes); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('employees_repeat_password'), 'repeat_password',$password_label_attributes); ?>
<div class='col-xs-5'>
<?php echo form_password(array(
'name'=>'repeat_password',
'id'=>'repeat_password'
'id'=>'repeat_password',
'class'=>'form-control'
));?>
</div>
</div>
@@ -83,15 +86,6 @@
?>
</li>
</ul>
<?php
echo form_submit(array(
'name'=>'submit',
'id'=>'submit',
'value'=>$this->lang->line('common_submit'),
'class'=>'btn btn-primary btn-sm pull-right')
);
?>
</fieldset>
<?php echo form_close(); ?>
@@ -138,7 +132,7 @@ $(document).ready(function()
$(form).ajaxSubmit({
success:function(response)
{
tb_remove();
dialog_support.hide();
post_person_form_submit(response);
},
dataType:'json'

View File

@@ -1,51 +1,45 @@
<div id="required_fields_message"><?php echo $this->lang->line('common_fields_required_message'); ?></div>
<ul id="error_message_box" class="error_message_box"></ul>
<?php echo form_open('giftcards/save/'.$giftcard_info->giftcard_id,array('id'=>'giftcard_form')); ?>
<?php echo form_open('giftcards/save/'.$giftcard_info->giftcard_id,array('id'=>'giftcard_form', 'class'=>'form-horizontal')); ?>
<fieldset id="giftcard_basic_info" style="padding: 5px;">
<legend><?php echo $this->lang->line("giftcards_basic_information"); ?></legend>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('giftcards_person_id').':', 'name',array('class'=>'wide')); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('giftcards_person_id').':', 'name',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'person_id',
'id'=>'person_id',
'class'=>'form-control',
'value'=>$selected_person)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('giftcards_giftcard_number').':', 'name',array('class'=>'required wide')); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('giftcards_giftcard_number').':', 'name',array('class'=>'required control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'giftcard_number',
'id'=>'giftcard_number',
'class'=>'form-control',
'value'=>$giftcard_number)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('giftcards_card_value').':', 'name',array('class'=>'required wide')); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('giftcards_card_value').':', 'name',array('class'=>'required control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'value',
'id'=>'value',
'class'=>'form-control',
'value'=>$giftcard_info->value)
);?>
</div>
</div>
<?php
echo form_submit(array(
'name'=>'submit',
'id'=>'submit',
'value'=>$this->lang->line('common_submit'),
'class'=>'btn btn-primary btn-sm pull-right')
);
?>
</fieldset>
<?php echo form_close(); ?>
@@ -74,7 +68,7 @@ $(document).ready(function()
{
success:function(response)
{
tb_remove();
dialog_support.hide();
post_giftcard_form_submit(response);
},
error: function(jqXHR, textStatus, errorThrown)

View File

@@ -1,72 +1,67 @@
<div id="required_fields_message"><?php echo $this->lang->line('common_fields_required_message'); ?></div>
<ul id="error_message_box" class="error_message_box"></ul>
<?php echo form_open('item_kits/save/'.$item_kit_info->item_kit_id,array('id'=>'item_kit_form')); ?>
<fieldset id="item_kit_info">
<legend><?php echo $this->lang->line("item_kits_info"); ?></legend>
<?php echo form_open('item_kits/save/'.$item_kit_info->item_kit_id,array('id'=>'item_kit_form', 'class' => 'form-horizontal')); ?>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('item_kits_name').':', 'name',array('class'=>'wide required')); ?>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'name',
'id'=>'name',
'value'=>$item_kit_info->name)
);?>
</div>
</div>
<fieldset id="item_kit_info">
<legend><?php echo $this->lang->line("item_kits_info"); ?></legend>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('item_kits_description').':', 'description',array('class'=>'wide')); ?>
<div class='form_field'>
<?php echo form_textarea(array(
'name'=>'description',
'id'=>'description',
'value'=>$item_kit_info->description,
'rows'=>'5',
'cols'=>'17')
);?>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('item_kits_name').':', 'name',array('class'=>'control-label col-xs-3 required')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'name',
'id'=>'name',
'class'=>'form-control',
'value'=>$item_kit_info->name)
);?>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('item_kits_description').':', 'description',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_textarea(array(
'name'=>'description',
'id'=>'description',
'class'=>'form-control',
'value'=>$item_kit_info->description,
)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('item_kits_add_item').':', 'item',array('class'=>'wide')); ?>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'item',
'id'=>'item'
));?>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('item_kits_add_item').':', 'item',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'item',
'id'=>'item',
'class'=>'form-control',
));?>
</div>
</div>
<table id="item_kit_items">
<tr>
<th><?php echo $this->lang->line('common_delete');?></th>
<th><?php echo $this->lang->line('item_kits_item');?></th>
<th><?php echo $this->lang->line('item_kits_quantity');?></th>
</tr>
<?php foreach ($this->Item_kit_items->get_info($item_kit_info->item_kit_id) as $item_kit_item) {?>
<tr>
<?php
$item_info = $this->Item->get_info($item_kit_item['item_id']);
?>
<td><a href="#" onclick='return deleteItemKitRow(this);'>X</a></td>
<td><?php echo $item_info->name; ?></td>
<td><input class='quantity' id='item_kit_item_<?php echo $item_kit_item['item_id'] ?>' type='text' size='3' name=item_kit_item[<?php echo $item_kit_item['item_id'] ?>] value='<?php echo $item_kit_item['quantity'] ?>'/></td>
</tr>
<?php } ?>
</table>
<?php
echo form_submit(array(
'name'=>'submit',
'id'=>'submit',
'value'=>$this->lang->line('common_submit'),
'class'=>'btn btn-primary btn-sm pull-right')
);
?>
</fieldset>
<table id="item_kit_items">
<tr>
<th><?php echo $this->lang->line('common_delete');?></th>
<th><?php echo $this->lang->line('item_kits_item');?></th>
<th><?php echo $this->lang->line('item_kits_quantity');?></th>
</tr>
<?php foreach ($this->Item_kit_items->get_info($item_kit_info->item_kit_id) as $item_kit_item) {?>
<tr>
<?php
$item_info = $this->Item->get_info($item_kit_item['item_id']);
?>
<td><a href="#" onclick='return deleteItemKitRow(this);'>X</a></td>
<td><?php echo $item_info->name; ?></td>
<td><input class='quantity' id='item_kit_item_<?php echo $item_kit_item['item_id'] ?>' type='text' class='form-control' name=item_kit_item[<?php echo $item_kit_item['item_id'] ?>] value='<?php echo $item_kit_item['quantity'] ?>'/></td>
</tr>
<?php } ?>
</table>
</fieldset>
<?php echo form_close(); ?>
<script type='text/javascript'>
@@ -91,7 +86,7 @@ $("#item").result(function(event, data, formatted)
}
else
{
$("#item_kit_items").append("<tr><td><a href='#' onclick='return deleteItemKitRow(this);'>X</a></td><td>"+data[1]+"</td><td><input class='quantity' id='item_kit_item_"+data[0]+"' type='text' size='3' name=item_kit_item["+data[0]+"] value='1'/></td></tr>");
$("#item_kit_items").append("<tr><td><a href='#' onclick='return deleteItemKitRow(this);'><span class='glyphicon glyphicon-remove'></span></a></td><td>"+data[1]+"</td><td><input class='quantity form-control' id='item_kit_item_"+data[0]+"' type='text' name=item_kit_item["+data[0]+"] value='1'/></td></tr>");
}
});
@@ -105,7 +100,7 @@ $(document).ready(function()
$(form).ajaxSubmit({
success:function(response)
{
tb_remove();
dialog_support.hide();
post_item_kit_form_submit(response);
},
dataType:'json'

View File

@@ -1,25 +1,28 @@
<?php echo form_open_multipart('items/do_excel_import/',array('id'=>'item_form', 'class'=>'form_horizontal')); ?>
<?php echo form_open_multipart('items/do_excel_import/',array('id'=>'item_form', 'class' => 'form-horizontal')); ?>
<div id="required_fields_message"><?php echo $this->lang->line('items_import_items_excel'); ?></div>
<ul id="error_message_box" class="error_message_box"></ul>
<fieldset id="item_basic_info">
<legend><?php echo $this->lang->line('common_import'); ?></legend>
<div class="form-group">
<div class="col-xs-9">
<div class="col-xs-6">
<a href="<?php echo site_url('items/excel'); ?>"><?php echo $this->lang->line('common_download_import_template'); ?></a>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('common_import_file_path').':', 'name',array('class'=>'control-label col-xs-3')); ?>
<div class="form-group">
<?php echo form_label($this->lang->line('common_import_file_path'), 'name',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_upload(array(
'name'=>'file_path',
'id'=>'file_path',
'class'=>'form-control',
'value'=>'')
);?>
<label class="file">
<input type="file" id="item_image" name="file_path">
<span class="file-custom"></span>
</label>
</div>
</div>
</fieldset>
<?php echo form_close(); ?>
<script type='text/javascript'>
@@ -32,7 +35,7 @@ $(document).ready(function()
$(form).ajaxSubmit({
success:function(response)
{
tb_remove();
dialog_support.hide();
post_item_form_submit(response);
},
dataType:'json'

View File

@@ -2,6 +2,8 @@
<ul id="error_message_box" class="error_message_box"></ul>
<?php echo form_open('items/save/'.$item_info->item_id,array('id'=>'item_form', 'enctype'=>'multipart/form-data', 'class' => 'form-horizontal')); ?>
<fieldset id="item_basic_info">
<legend><?php echo $this->lang->line("items_basic_information"); ?></legend>
<div class="form-group">
<?php echo form_label($this->lang->line('items_item_number'), 'item_number',array('class'=>'control-label col-xs-3')); ?>
@@ -127,7 +129,7 @@
{
?>
<div class="form-group">
<?php echo form_label($this->lang->line('items_quantity').' '.$location_detail['location_name'] .':',
<?php echo form_label($this->lang->line('items_quantity').' '.$location_detail['location_name'] ,
$key.'_quantity',
array('class'=>'required wide control-label col-xs-3')); ?>
<div class='col-xs-2'>
@@ -180,19 +182,21 @@
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('items_image').':', 'item_image',array('class'=>'control-label col-xs-3')); ?>
<?php echo form_label($this->lang->line('items_image'), 'item_image',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_upload('item_image');?>
<label class="file">
<input type="file" id="item_image">
<span class="file-custom"></span>
</label>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('items_allow_alt_description').':', 'allow_alt_description',array('class'=>'control-label col-xs-3')); ?>
<?php echo form_label($this->lang->line('items_allow_alt_description'), 'allow_alt_description',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-1'>
<?php echo form_checkbox(array(
'name'=>'allow_alt_description',
'id'=>'allow_alt_description',
'class'=>'form-control',
'value'=>1,
'checked'=>($item_info->allow_alt_description)? 1 :0)
);?>
@@ -200,12 +204,11 @@
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('items_is_serialized').':', 'is_serialized',array('class'=>'control-label col-xs-3')); ?>
<?php echo form_label($this->lang->line('items_is_serialized'), 'is_serialized',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-1'>
<?php echo form_checkbox(array(
'name'=>'is_serialized',
'id'=>'is_serialized',
'class'=>'form-control',
'value'=>1,
'checked'=>($item_info->is_serialized)? 1 : 0)
);?>
@@ -213,12 +216,11 @@
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('items_is_deleted').':', 'is_deleted',array('class'=>'control-label col-xs-3')); ?>
<?php echo form_label($this->lang->line('items_is_deleted'), 'is_deleted',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-1'>
<?php echo form_checkbox(array(
'name'=>'is_deleted',
'id'=>'is_deleted',
'class'=>'form-control',
'value'=>1,
'checked'=>($item_info->deleted)? 1 : 0)
);?>
@@ -234,7 +236,7 @@
$item_arr = (array)$item_info;
?>
<div class="form-group">
<?php echo form_label($this->config->item('custom'.$i.'_name').':', 'custom'.$i,array('class'=>'control-label col-xs-3')); ?>
<?php echo form_label($this->config->item('custom'.$i.'_name'), 'custom'.$i,array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'custom'.$i,
@@ -248,6 +250,7 @@
}
}
?>
</fieldset>
<?php echo form_close(); ?>
<script type='text/javascript'>

View File

@@ -171,7 +171,7 @@ $(document).ready(function()
$(form).ajaxSubmit({
success:function(response)
{
tb_remove();
dialog_support.hide();
post_bulk_form_submit(response);
},
dataType:'json'

View File

@@ -4,6 +4,7 @@
<?php echo form_input(array(
'name'=>'first_name',
'id'=>'first_name',
'class'=>'form-control',
'value'=>$person_info->first_name)
);?>
</div>
@@ -14,6 +15,7 @@
<?php echo form_input(array(
'name'=>'last_name',
'id'=>'last_name',
'class'=>'form-control',
'value'=>$person_info->last_name)
);?>
</div>
@@ -21,27 +23,28 @@
<div class="form-group">
<?php echo form_label($this->lang->line('common_gender'), 'gender',
!empty($basic_version) ? array('class'=>'control-label required col-xs-3') : array()); ?>
<div class='col-sm-2'>
<?php echo form_radio(array(
'name'=>'gender',
'type'=>'radio',
'id'=>'gender',
'class'=>'form-control',
'value'=>1,
'checked'=>$person_info->gender === '1')
);
echo '&nbsp;' . $this->lang->line('common_gender_male') . '&nbsp;';
echo form_radio(array(
'name'=>'gender',
'type'=>'radio',
'id'=>'gender',
'class'=>'form-control',
'value'=>0,
'checked'=>$person_info->gender === '0')
);
echo '&nbsp;' . $this->lang->line('common_gender_female');
?>
!empty($basic_version) ? array('class'=>'control-label required col-xs-3') : array('class' => 'control-label col-xs-3')); ?>
<div class="col-xs-4">
<label class="radio-inline">
<?php echo form_radio(array(
'name'=>'gender',
'type'=>'radio',
'id'=>'gender',
'value'=>1,
'checked'=>$person_info->gender === '1')
);
?> <?php echo $this->lang->line('common_gender_male'); ?>
</label>
<label class="radio-inline">
<?php echo form_radio(array(
'name'=>'gender',
'type'=>'radio',
'id'=>'gender',
'value'=>0,
'checked'=>$person_info->gender === '0')
); ?> <?php echo $this->lang->line('common_gender_female'); ?>
</label>
</div>
</div>

View File

@@ -120,7 +120,7 @@ $(document).ready(function()
$(this).ajaxSubmit({
success:function(response)
{
tb_remove();
dialog_support.hide();
post_form_submit(response);
},
error: function(jqXHR, textStatus, errorThrown) {
@@ -161,7 +161,7 @@ $(document).ready(function()
{
if (confirm('<?php echo $this->lang->line("recvs_delete_confirmation"); ?>'))
{
tb_remove();
dialog_support.hide();
set_feedback(response.message, 'alert alert-dismissible alert-success', false);
var $element = get_table_row(id).parent().parent();
$element.find("td").animate({backgroundColor:"green"},1200,"linear")

View File

@@ -83,7 +83,7 @@ $(document).ready(function()
if (confirm("<?php echo $this->lang->line('sales_invoice_confirm') . ' ' . $sale_info['email'] ?>")) {
$.get('<?=site_url() . "/sales/send_invoice/" . $sale_info['sale_id']?>',
function(response) {
tb_remove();
dialog_support.hide();
post_form_submit(response);
}, "json"
);
@@ -146,7 +146,7 @@ $(document).ready(function()
{
success: function(response)
{
tb_remove();
dialog_support.hide();
post_form_submit(response);
},
error: function(jqXHR, textStatus, errorThrown)
@@ -190,7 +190,7 @@ $(document).ready(function()
$(this).ajaxSubmit({
success: function(response)
{
tb_remove();
dialog_support.hide();
set_feedback(response.message, 'alert alert-dismissible alert-success', false);
var $element = get_table_row(id).parent().parent();
$element.find("td").animate({backgroundColor:"green"},1200,"linear")

View File

@@ -1,50 +1,45 @@
<?php echo form_open('suppliers/save/'.$person_info->person_id,array('id'=>'supplier_form')); ?>
<?php echo form_open('suppliers/save/'.$person_info->person_id,array('id'=>'supplier_form', 'class' => 'form-horizontal')); ?>
<div id="required_fields_message"><?php echo $this->lang->line('common_fields_required_message'); ?></div>
<ul id="error_message_box" class="error_message_box"></ul>
<fieldset id="supplier_basic_info">
<legend><?php echo $this->lang->line("suppliers_basic_information"); ?></legend>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('suppliers_company_name').':', 'company_name', array('class'=>'required')); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('suppliers_company_name'), 'company_name', array('class'=>'required control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'company_name',
'id'=>'company_name_input',
'class'=>'form-control',
'value'=>$person_info->company_name)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('suppliers_agency_name').':', 'agency_name'); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('suppliers_agency_name'), 'agency_name', array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'agency_name',
'id'=>'agency_name_input',
'class'=>'form-control',
'value'=>$person_info->agency_name)
);?>
</div>
</div>
<?php $this->load->view("people/form_basic_info"); ?>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('suppliers_account_number').':', 'account_number'); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('suppliers_account_number'), 'account_number', array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'account_number',
'id'=>'account_number',
'class'=>'form-control',
'value'=>$person_info->account_number)
);?>
</div>
</div>
<?php
echo form_submit(array(
'name'=>'submit',
'id'=>'submit',
'value'=>$this->lang->line('common_submit'),
'class'=>'btn btn-primary btn-sm pull-right')
);
?>
</fieldset>
<?php echo form_close(); ?>
@@ -58,7 +53,7 @@ $(document).ready(function()
$(form).ajaxSubmit({
success:function(response)
{
tb_remove();
dialog_support.hide();
post_person_form_submit(response);
},
dataType:'json'