<script>
    $(document).ready(function() {
        $('.summernote').summernote({
            height: 350,                 // set editor height
            minHeight: 350,             // set minimum height of editor
            maxHeight: 350,             // set maximum height of editor

            focus: true                 // set focus to editable area after initializing summernote
        });
    });
</script>
<div class="container">
    <div class="row">
        <div class="form-group col-md-12" style="margin-top:20px;">
            <ol class="breadcrumb">
                <li><a href="<?php echo base_url()?>administrator/home"><i class="glyphicon glyphicon-home"></i> Home</a></li>
                <li class="active">Contacts</li>
            </ol>
        </div>
        <div class="form-group col-md-12">
            <h3>Contacts</h3>
        </div>
        <div class="col-md-12 form-group">
            <?php
            if(!empty($error)){
                 echo "<div class='alert alert-danger'><i class='glyphicon glyphicon-exclamation-sign'></i> ".$error."</div>"; 
            }
            elseif(!empty($success)){
                 echo "<div class='alert alert-success'><i class='glyphicon glyphicon-ok-circle'></i> ".$success."</div>"; 
            }
            ?>
        </div>
        <form name="uploadform" enctype="multipart/form-data" method="POST">
            <div class="form-group col-md-12">
                <div class="col-md-3">Company Name</div>
                <div class="col-md-9">
                    <input type="text" id="name" name="name" class="form-control" value="<?php echo $result->name;?>"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <div class="col-md-3">Address</div>
                <div class="col-md-9">
                    <textarea id="address" name="address" class="summernote"><?php echo $result->address;?></textarea>
                </div>
            </div>
            <div class="form-group col-md-12">
                <div class="col-md-3">Phone</div>
                <div class="col-md-9">
                    <textarea id="phone" name="phone" class="summernote"/><?php echo $result->phone;?></textarea>
                </div>
            </div>
            
            <div class="form-group col-md-12">
                <div class="col-md-3">Fax</div>
                <div class="col-md-9">
                    <textarea id="fax" name="fax" class="summernote"/><?php echo $result->fax;?></textarea>
                </div>
            </div>
            <div class="form-group col-md-12">
                <div class="col-md-3">Email</div>
                <div class="col-md-9">
                    <input type="text" id="email" name="email" class="form-control" value="<?php echo $result->email;?>"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <div class="col-md-3 control-label">Google Maps Link</div>
                <div class="col-md-9">
                    <textarea id="maps" name="maps" class="form-control" rows="5"><?php echo $result->maps;?></textarea>
                </div>
            </div>
            <div class="form-group col-md-12">
                <div class="col-md-12" align="center">
                    <input type="submit" id="submit" name="submit" class="btn btn-success" value="Submit">
                    &nbsp;
                    <input type="reset" id="reset" name="reset" class="btn btn-warning" value="Reset">
                    &nbsp;
                    <a href="<?php echo base_url().'administrator/home'?>" class="btn btn-default">Cancel</a>
                </div>
            </div>
        </form>
    </div>
</div>