<?php
   /**
    * _replyForm
    *
    * @package Wojo Framework
    * @author wojoscripts.com
    * @copyright 2023
    * @version 5.50: _replyForm.tpl.php, v1.00 11/18/2023 12:22 PM Gewa Exp $
    *
    */
   const _WOJO = true;
   require_once('../../../../../../init.php');

   $conf = Comment::configuration();
?>
<?php if ($conf->public_access or App::Auth()->logged_in): ?>
   <div class="wojo small simple segment form hide-all" id="replyform">
      <?php if (App::Auth()->logged_in): ?>
         <input type="hidden" name="replayname" value="<?php echo App::Auth()->uid; ?>">
      <?php else: ?>
         <input name="replayname" placeholder="<?php echo Language::$word->NAME; ?>" type="text" value="<?php if (App::Auth()->logged_in) {
            echo App::Auth()->name;
         } ?>">
      <?php endif; ?>
      <div class="margin-small-top">
         <textarea data-counter="<?php echo $conf->char_limit; ?>" id="replybody" placeholder="<?php echo Language::$word->MESSAGE; ?>" name="replybody"></textarea>
      </div>
      <div class="margin-small-top">
         <p class="text-size-small replybody_counter"><?php echo Language::$word->CMT_CHARS . ' <span class="text-color-positive">' . $conf->char_limit . '</span>'; ?></p>
         <button type="button" name="doReply" class="wojo small primary button"><?php echo Language::$word->SUBMIT; ?></button>
      </div>
   </div>
<?php else: ?>
   <p id="pError" class="wojo small negative text"><?php echo Language::$word->CMT_REGONLY; ?></p>
<?php endif; ?>