<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
?>
<?php include APPLICATION_PATH .  '/application/modules/Poke/views/scripts/_adminHeader.tpl';?>

<?php echo $this->htmlLink(array('route' => 'admin_default', 'module' => 'poke', 'controller' => 'manageactions', 'action' => 'index'), $this->translate("Back to Manage Poke & Actions"), array('class'=>'buttonlink icon_back')) ?>
<br style="clear" /><br />
<div class='clear'>
  <div class='settings'>
    <?php echo $this->form->render($this); ?>
  </div>
</div>
<script type="text/javascript">
  
  <?php if(empty($this->manageModules->icon)): ?>
    en4.core.runonce.add(function() {
      if (document.getElementById('icon_preview-wrapper'))
        document.getElementById('icon_preview-wrapper').style.display = 'none';
    });
  <?php endif; ?>
  
   //Show choose image 
  function showReadImage(input, id) {
    var url = input.value;
    var ext = url.substring(url.lastIndexOf('.') + 1).toLowerCase();
    if (input.files && input.files[0] && (ext == "png" || ext == "jpeg" || ext == "jpg" || ext == 'PNG' || ext == 'JPEG' || ext == 'JPG' || ext == 'gif')) {
      var reader = new FileReader();
      reader.onload = function (e) {
        document.getElementById(id + '-wrapper').style.display = 'flex';
        document.getElementById(id).setAttribute('src', e.target.result);
      }
      document.getElementById(id + '-wrapper').style.display = 'flex';
      reader.readAsDataURL(input.files[0]);
    }
  }
</script>
