Files
opensourcepos/application/views/items/excel_import.php
jekkos 808943f250 Add bootstrap form style to item kits, suppliers, giftcards, and excel import in
items and customers (#118)
Fix dialog submission in all pages (#328)
2016-02-18 08:57:17 +01:00

58 lines
1.4 KiB
PHP

<?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-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='col-xs-6'>
<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'>
//validation and submit handling
$(document).ready(function()
{
$('#item_form').validate({
submitHandler:function(form)
{
$(form).ajaxSubmit({
success:function(response)
{
dialog_support.hide();
post_item_form_submit(response);
},
dataType:'json'
});
},
errorLabelContainer: "#error_message_box",
wrapper: "li",
rules:
{
file_path:"required"
},
messages:
{
file_path:"<?php echo $this->lang->line('common_import_full_path'); ?>"
}
});
});
</script>