<div class="row">

  <div class="col-lg-12 mt-4">

    <div class="card">

      <div class="card-header form-card-header">

        <h4 class="m-b-0 text-light">UPDATE ARTICLES </h4>

      </div>

      <div class="card-body">

        <form id="update_pressreleases" class="form-material">

          <div class="form-body">

            <div class="row">

              
              <div class="col-md-6">

                <div class="form-group">

                  <label class="control-label"><strong>PRESS RELEASES TITLE <span>*</span></strong></label>

                  <input type="text" id="name" name="name" class="form-control" value="<?php echo $pressreleases[0]->name; ?>">

                  <label for="name" class="error"></label> 

                </div>

              </div>

              <div class="col-md-6">

                <div class="form-group">

                  <label class="control-label"><strong>PRESS RELEASES DATE<span>*</span></strong></label>

                  <input type="text" id="pressrelease_date" name="pressrelease_date" class="form-control" value="<?php echo $pressreleases[0]->pressreleaseDate; ?>">

                  <label for="pressrelease_date" class="error"></label> 

                </div>

              </div>

              <div class="col-md-6">

                <div class="form-group">

                  <label class="control-label"><strong>UPLOAD PDF</strong></label>

                  <input type="file" name="pdfimage" id="pdfimage" class="form-control"/>

                  <!-- <label> Note : image size ( 227 x 163 pixels )</label> -->

                  <label for="pdfimage" class="error"></label> 
                  <div>

                    <?php 

                    if($pressreleases[0]->pdfpath !== "NA"){

                      $url = base_url().$pressreleases[0]->pdfpath;
                      $imgurl = base_url().'public/custom/images/pressreleases/pdfimage.png';
                    }else{
                      $url = "#";
                      $imgurl = base_url().'public/custom/images/pressreleases/pdfimage.png';

                    } ?>

                    <a href="<?php echo $url; ?>" target="_blank"><img src="<?php echo $imgurl; ?>" height="250" width="250"></a>
                  </div>
                </div>

              </div>

              
            </div>

          </div>

          

          <input type="hidden" id="id" name="id" value="<?php echo $pressreleases[0]->pressreleasesid; ?>">

          <input type="hidden" id="pdfpath" name="pdfpath" value="<?php echo $pressreleases[0]->pdfpath; ?>">



          <div class="form-actions">

            <button type="submit" class="btn btn-rounded btn-outline-success col-md-3">SAVE</button>  

            <button type="button" class="btn btn-rounded btn-outline-danger col-md-3" onclick="window.location.href='<?php echo base_url(); ?>articles/list'">CANCEL</button>  

          </div>

        </form>

      </div>

    </div>

  </div>

</div>