<?php $this->load->view('site/layout'); ?>

<?php $this->load->view('site/navbar'); ?>

<div class="kt-content  kt-grid__item kt-grid__item--fluid kt-grid kt-grid--hor" id="kt_content">
    <div class="kt-subheader  kt-grid__item" id="kt_subheader">
        <div class="kt-container  kt-container--fluid ">
            <div class="kt-subheader__main">
                <h3 class="kt-subheader__title"><a href="<?php echo base_url() ?>Dashboard/"><?php echo $this->lang->line('dashboard'); ?></a></h3>
                <span class="kt-subheader__separator kt-subheader__separator--v"></span>
                <span class="kt-subheader__desc"><a href="<?= base_url('Stores/Supplier') ?>"><?php echo $this->lang->line('suppliers') ?></a></span>
            </div>
        </div>
    </div>
    <?php if (isset($msg) || validation_errors() !== ''): ?>
        <div class="alert alert-warning alert-dismissible">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
            <h4><i class="icon fa-warning"></i> Alert!</h4>
            <?= validation_errors(); ?>
            <?= isset($msg) ? $msg : ''; ?>
        </div>
    <?php endif; ?> 
    <div class="kt-portlet">
        <div class="kt-portlet__head">
            <div class="kt-portlet__head-label">
                <h3 class="kt-portlet__head-title">
                    <?php echo $this->lang->line('add-a-supplier') ?>
                </h3>
            </div>
        </div>
        <!--begin::Form-->
        <!-- <?php //echo form_open_multipart(base_url(''.$thispage.'/add/'));       ?> -->
        <form class="kt-form kt-form--label-right" method="post" action="" enctype="multipart/form-data">
            <div class="kt-portlet__body">

                <div class="form-group row">
                    <label for="example-text-input" class="col-2 col-form-label"><?php echo $this->lang->line('the-name') ?></label>
                    <div class="col-4">
                        <input type="text" class="form-control" id="exampleInputEmail1" placeholder="<?php echo $this->lang->line('the-name') ?> " name="name" required autofocus>
                    </div>

					<label for="example-text-input" class="col-2 col-form-label"><?php echo $this->lang->line('company-name') ?></label>
					<div class="col-4">
						<input type="text" class="form-control" id="exampleInputEmail1" placeholder="<?php echo $this->lang->line('company-name') ?> " name="company_name" required autofocus>
					</div>
				</div>

				<div class="form-group row">
                    <label for="example-email-input" class="col-2 col-form-label"> <?php echo $this->lang->line('e-mail') ?></label>
                    <div class="col-4">
                        <input type="email" class="form-control" id="exampleInputPassword1" placeholder=" <?php echo $this->lang->line('e-mail') ?> " name="email" required >
                    </div>

                    <label for="example-url-input" class="col-2 col-form-label"><?php echo $this->lang->line('the-phone') ?></label>
                    <div class="col-4">
                        <input type="text" class="form-control" id="exampleInputPassword1" placeholder=" <?php echo $this->lang->line('the-phone') ?> " name="phone" >
                    </div>
                </div>

				
                <div class="form-group row">
					<label for="address" class="col-2 col-form-label"><?php echo $this->lang->line('address') ?></label>
					<div class="col-4">
						<input type="text" class="form-control" id="address" placeholder=" <?php echo $this->lang->line('address') ?> " name="address" >
					</div>

					<label for="vat_number" class="col-2 col-form-label"><?php echo $this->lang->line('vat_number') ?></label>
					<div class="col-4">
						<input type="text" class="form-control" id="vat_number" placeholder=" <?php echo $this->lang->line('vat_number') ?> " name="vat_number" >
					</div>
				</div>

<!--				<div class="form-group row">-->
<!--					<label for="state" class="col-2 col-form-label">--><?php //echo $this->lang->line('state') ?><!--</label>-->
<!--					<div class="col-10">-->
<!--						<input type="text" class="form-control" id="state" placeholder=" --><?php //echo $this->lang->line('state') ?><!-- " name="state" >-->
<!--					</div>-->
<!---->
<!--				</div>-->

				<div class="form-group row">
					<label for="country" class="col-2 col-form-label"><?php echo $this->lang->line('country') ?></label>
					<div class="col-4">
						<input type="text" class="form-control" id="country" placeholder=" <?php echo $this->lang->line('state') ?> " name="country" >
					</div>

					<label for="city" class="col-2 col-form-label"><?php echo $this->lang->line('city') ?></label>
					<div class="col-4">
						<input type="text" class="form-control" id="city" placeholder=" <?php echo $this->lang->line('city') ?> " name="city" >
					</div>

				</div>
				<div class="form-group row">
					<label for="postal_code" class="col-2 col-form-label"><?php echo $this->lang->line('postal_code') ?></label>
					<div class="col-4">
						<input type="text" class="form-control" id="postal_code" placeholder=" <?php echo $this->lang->line('postal_code') ?> " name="postal_code" >
					</div>

					<label for="image" class="col-2 col-form-label"><?php echo $this->lang->line('image') ?></label>
					<div class="col-4">
						<input type="file" class="form-control"  name="image" >
					</div>

				</div>





			</div>
            <div class="kt-portlet__foot">
                <div class="kt-form__actions">
                    <div class="row">
                        <div class="col-2">
                        </div>
                        <div class="col-10">
                            <button type="submit" class="btn btn-primary" name="submit" value="pl"><?php echo $this->lang->line('add') ?></button>
                            <button type="reset" class="btn btn-secondary">Cancel</button>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <script src="<?= base_url() ?>public/js/pages/crud/forms/widgets/select2.js"></script>
    <?php $this->load->view('site/footer_2'); ?>
    <script>
        $('document').ready(function () {
            $(".select2").select2();
            $("#datepicker").datepicker({format: 'yyyy-mm-dd'});
        });
    </script>
