<script type="text/javascript" src="<?php echo base_url();?>assets/js/settings.js"></script>
<aside class="right-side">
    <section class="content-header">
        <div class="title_bar">
            <h1 class="major_txt_color">Basic Settings Edit</h1>
            <div class="breadcrumb_container"><?php echo breadcrumb_links();?></div>
        </div>
    </section>
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box-header">
                    <div class="box-body table-responsive">
                        <?php if(!empty($success)) {?>
                            <div class="alert alert-success alert-dismissable">
                                <i class="fa fa-thumbs-o-up"></i>
                                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                                <h4><?php echo $success;?></h4>
                            </div>
                        <?php }
                        else if(!empty($error)) {?>
                            <div class="alert alert-danger alert-dismissable">
                                <i class="fa fa-thumbs-o-down"></i>
                                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                                <h4><?php echo $error;?></h4>
                            </div>
                        <?php }?>
                    </div>
                    <!-- .box-tools -->
                </div>
            </div>
            
            <div class="col-xs-12">
                <h3 style="margin-top: 0; margin-right: 5px; width: 100%; display: inline-block;">
                    <a class="label btn btn-primary float-rht edit" href="<?php echo $view_link?>"><span>View</span></a>
                </h3>
                 <form name="settings" action="<?php echo $form_action;?>" method="post" enctype="multipart/form-data">
                    <div class="box box-danger">
                        <div class="box-body">
                            <ul class="error_container"></ul>
                            <div class="col-xs-12">
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label>Temple Name<span class="required">*</span></label>
                                        <input type="text" class="form-control" name="temple_name" placeholder="Temple Name" maxlength="150" value="<?php echo form_prep($setting->temple_name);?>" />
                                    </div>
                                    
                                    <div class="form-group">
                                        <label>Temple Name (T)</label>
                                        <div class="input-group">
                                            <input type="text" class="form-control multi tamil-name input-tamil" name="tamil_temple_name" placeholder="Temple Name" maxlength="150" onclick="set_tamil_keypad(this);" value="<?php echo $setting->tamil_name;?>" />
                                            <div class="input-group-addon"><i class="fa fa-keyboard-o"></i></div>
                                        </div>
                                    </div>
                                    
                                    <div class="form-group">
                                        <label>Registration Number</label>
                                        <input type="text" class="form-control" name="reg_no" placeholder="Registration Number" maxlength="50" value="<?php echo form_prep($setting->reg_no);?>" />
                                    </div>
                                    
                                    <div class="form-group">
                                        <label>Email</label>
                                        <div class="input-group">
                                            <input type="text" class="form-control" name="comp_email" placeholder="Company Email" maxlength="150" value="<?php echo form_prep($setting->comp_email);?>" />
                                            <div class="input-group-addon"><i class="fa fa-envelope"></i></div>
                                        </div>
                                    </div>
                                    
                                    <div class="form-group">
                                        <label>Address<span class="required">*</span></label>
                                        <textarea class="form-control resize_none" name="address" placeholder="Company Address" maxlength="500"><?php echo form_prep($setting->address);?></textarea>
                                    </div>
                                </div>
                                
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label>Website</label>
                                        <input type="text" class="form-control" name="website_url" value="<?php echo form_prep($setting->website_url);?>" />
                                    </div>
                                    <div class="form-group">
                                        <label>Contact Name</label>
                                        <input type="text" class="form-control" name="contact_name" placeholder="Contact Name" maxlength="150" value="<?php echo form_prep($setting->contact_name);?>" />
                                    </div>
                                    
                                    <div class="form-group">
                                        <label>Contact Email</label>
                                        <div class="input-group">
                                            <input type="text" class="form-control" name="contact_email" placeholder="Contact Email" maxlength="50" value="<?php echo form_prep($setting->contact_email);?>" />
                                            <div class="input-group-addon"><i class="fa fa-envelope"></i></div>
                                        </div>
                                    </div>
                                    
                                    <div class="form-group">
                                        <label>Contact Number<span class="required">*</span></label>
                                        <div class="input-group">
                                            <input type="text" class="form-control integer_value" name="contact_no" placeholder="Contact Number" maxlength="50" value="<?php echo form_prep($setting->contact_no);?>" />
                                            <div class="input-group-addon"><i class="fa fa-phone"></i></div>
                                        </div>
                                    </div>
                                    
                                    <div class="form-group">
                                        <label>Contact Fax</label>
                                        <input type="text" class="form-control" name="fax" placeholder="Contact Fax" maxlength="20" value="<?php echo form_prep($setting->fax);?>" />
                                    </div>
                                    
                                    <?php if( $user_data['role'] == 3) :  ?>
                                        <div class="form-group">
                                            <label>Setup File</label>
                                            <a href="<?php echo base_url().'setup.msi'; ?>" style="color: #1ba; letter-spacing: 1px; border-bottom: 1px solid;" title="Setup file">Download</a>
                                        </div>
                                    <?php endif;  ?>
                                </div>
                            </div>
                        </div>
                        
                        <div class="box-footer form-actions float-clear" style="text-align:center;">
                            <input class="btn reset" type="reset" value="Reset" />
                            <input type="submit" name="submit" value="Update" class="btn btn-success btn-primary" />
                        </div>
                    </div><!-- /.box -->
                </form>
            </div><!-- /.col-xs-12 -->
        </div><!-- /.row -->
    </section><!-- /.content -->
</aside>