Fisharebest\Webtrees\Module\ResearchTaskModule::configureBlock PHP Method

configureBlock() public method

An HTML form to edit block settings
public configureBlock ( integer $block_id )
$block_id integer
    public function configureBlock($block_id)
    {
        if (Filter::postBool('save') && Filter::checkCsrf()) {
            $this->setBlockSetting($block_id, 'show_other', Filter::postBool('show_other'));
            $this->setBlockSetting($block_id, 'show_unassigned', Filter::postBool('show_unassigned'));
            $this->setBlockSetting($block_id, 'show_future', Filter::postBool('show_future'));
            $this->setBlockSetting($block_id, 'block', Filter::postBool('block'));
        }
        $show_other = $this->getBlockSetting($block_id, 'show_other', self::DEFAULT_SHOW_OTHER);
        $show_unassigned = $this->getBlockSetting($block_id, 'show_unassigned', self::DEFAULT_SHOW_UNASSIGNED);
        $show_future = $this->getBlockSetting($block_id, 'show_future', self::DEFAULT_SHOW_FUTURE);
        $block = $this->getBlockSetting($block_id, 'block', self::DEFAULT_BLOCK);
        ?>
		<tr>
			<td colspan="2">
				<?php 
        echo I18N::translate('Research tasks are special events, added to individuals in your family tree, which identify the need for further research. You can use them as a reminder to check facts against more reliable sources, to obtain documents or photographs, to resolve conflicting information, etc.');
        ?>
				<?php 
        echo I18N::translate('To create new research tasks, you must first add “research task” to the list of facts and events in the family tree’s preferences.');
        ?>
				<?php 
        echo I18N::translate('Research tasks are stored using the custom GEDCOM tag “_TODO”. Other genealogy applications may not recognize this tag.');
        ?>
			</td>
		</tr>
		<?php 
        echo '<tr><td class="descriptionbox wrap width33">';
        echo I18N::translate('Show research tasks that are assigned to other users');
        echo '</td><td class="optionbox">';
        echo FunctionsEdit::editFieldYesNo('show_other', $show_other);
        echo '</td></tr>';
        echo '<tr><td class="descriptionbox wrap width33">';
        echo I18N::translate('Show research tasks that are not assigned to any user');
        echo '</td><td class="optionbox">';
        echo FunctionsEdit::editFieldYesNo('show_unassigned', $show_unassigned);
        echo '</td></tr>';
        echo '<tr><td class="descriptionbox wrap width33">';
        echo I18N::translate('Show research tasks that have a date in the future');
        echo '</td><td class="optionbox">';
        echo FunctionsEdit::editFieldYesNo('show_future', $show_future);
        echo '</td></tr>';
        echo '<tr><td class="descriptionbox wrap width33">';
        echo I18N::translate('Add a scrollbar when block contents grow');
        echo '</td><td class="optionbox">';
        echo FunctionsEdit::editFieldYesNo('block', $block);
        echo '</td></tr>';
    }