Пример #1
0
 /**
  * Hide or show inputs on the form depending on whether the user has the correct Thread permissions
  * @return void
  */
 public function checkThreadPermissions()
 {
     if ($this->board->canPostLockedThread()) {
         $locked = !empty($_POST['locked']) ? ' checked="checked"' : '';
         $this->setPlaceholders(array('locked' => $locked, 'locked_cb' => $this->discuss->getChunk('form/disCheckbox', array('name' => 'locked', 'value' => 1, 'text' => $this->getOption('textCheckboxLocked'), 'attributes' => $locked)), 'can_lock' => true));
     }
     if ($this->board->canPostStickyThread()) {
         $sticky = !empty($this->scriptProperties['sticky']) ? ' checked="checked"' : '';
         $this->setPlaceholders(array('sticky' => $sticky, 'sticky_cb' => $this->discuss->getChunk('form/disCheckbox', array('name' => 'sticky', 'value' => 1, 'text' => $this->getOption('textCheckboxSticky'), 'attributes' => $sticky)), 'can_stick' => true));
     }
 }