<script src="https://www.google.com/recaptcha/api.js?"></script>    
<div class="col-sm-10">
            <div class="col-sm-12 text-center gray form-group">
                <div class="col-sm-6 col-sm-offset-1 text-center form-group">
                    <h2 class="padding-zero"> Suggest an idea</h2>
                </div>
                <div class="col-sm-4 form-group padding-zero">
                    <a href="<?php echo base_url() ?>ideas" class="btn btn-danger">Ideas</a>
                    <a href="<?php echo base_url() ?>bug-report" class="btn btn-success">Bug Report</a>
                </div>
            </div>

            <div class="col-sm-12 form-group"><br></div>
            <div class="col-sm-12 gray form-group">
                <?php
                $url = 'add-idea';
                echo form_open_multipart($url, 'class="cmxform" id="formID6" onsubmit="return check_form_bug_report()" name="shareidea1"');
                ?>
                <div class="col-sm-8 col-sm-offset-2 form-group">
                    <div class="col-sm-12 form-group">
                        <div class="input-group">
                            <input class="form-control" 
                                   type="text" 
                                   name="idea_title"  
                                   id="idea_title"
                                   value="<?php echo set_value('idea_title'); ?>"
                                   placeholder="Please Type Idea Title">
                            <span class="input-group-addon" id="basic-addon1"><i class="fa fa-lightbulb-o"></i></span>
                        </div>
                        <span style="color: red"><?php echo form_error('idea_title'); ?></span>
                    </div>
                    <div class="col-sm-12 form-group">
                        <div class="input-group">
                            <textarea  class="form-control" 
                                       name="idea_describe"
                                       id="idea_describe"
                                       cols="100" placeholder="Describe Your Idea .." 
                                       aria-describedby="basic-addon1" 
                                       style="width:100%;float:right;max-width: 472px;max-height: 100px"><?php echo set_value('idea_describe'); ?></textarea>
                        </div>
                        <span style="color: red"><?php echo form_error('idea_describe'); ?></span>
                    </div>
    <div class="form-group col-sm-12 padding-zero">
                                <div class="form-group col-sm-7 ">
                                    <script>
                                        $(":file").filestyle({icon: false});</script>
                                    <input type="file"
                                           id="idea_file"
                                           name="idea_file"
                                           onchange="getIdeafile(this)"
                                           class="filestyle" 
                                           data-icon="false">
                                </div>
                                <div class="form-group col-sm-5">
                                    <span class="text-left" 
                                          id="upload_file">
                                        [Upload File]
                                    </span>
                                    <span id="view_file" style="display: none">
                                        <img id="src_file" src="" height="40" width="50">
                                    </span>
                                </div>
                            </div>
                            <div class="col-sm-12 form-group">
                                <div>
                                    <input type="hidden" id="mcap" name="google_captcha" value="">
                                    <?php $this->general_library->google_captcha(); ?>
                                </div> 
                                <span id="captcha_error" style="color: red;"><?php echo form_error('google_captcha')?></span>
                            </div>
                                        
                    <div class="col-sm-12">
                        <div class="col-sm-3 col-sm-offset-4 form-group">
                            <input type="submit" 
                                   class="green-btn btn btn-default" 
                                   value="Submit !">
                        </div>
                    </div>
                </div>
                <?php echo form_close(); ?>
            </div>
 </div>
<script>
    function check_form_bug_report(){
        if(grecaptcha.getResponse() == ''){
             $('#mcap').val('');
             $('#captcha_error').html('Fill up the above fields then Complete The Captcha');
             return false;
         }else{
             $('#mcap').val('1');
             return true;
         }
    }
</script>
<script src="<?php echo base_url() ?>back_end_resource/support/support.js" type="text/javascript"></script>

