if (!$block || !array_key_exists($block->module_name, $blocks) || $block->gedcom_id && !Auth::isManager(Tree::findById($block->gedcom_id)) || $block->user_id && $block->user_id != Auth::id() && !Auth::isAdmin()) { header('Location: ' . WT_BASE_URL); return; } $block = $blocks[$block->module_name]; if (Filter::post('save')) { $ctype = Filter::post('ctype', 'user', 'gedcom'); header('Location: ' . WT_BASE_URL . 'index.php?ctype=' . $ctype . '&ged=' . $WT_TREE->getNameUrl()); $block->configureBlock($block_id); return; } $ctype = FIlter::get('ctype', 'user', 'gedcom'); $controller = new PageController(); $controller->setPageTitle(I18N::translate('Configure') . ' — ' . $block->getTitle())->pageHeader(); if (Module::getModuleByName('ckeditor')) { CkeditorModule::enableEditor($controller); } ?> <h2><?php echo $controller->getPageTitle(); ?> </h2> <form name="block" method="post" action="?block_id=<?php echo $block_id; ?> "> <input type="hidden" name="save" value="1"> <input type="hidden" name="ged" value="<?php echo $WT_TREE->getNameHtml(); ?>
/** * Action from the configuration page */ private function edit() { global $WT_TREE; if (Filter::postBool('save') && Filter::checkCsrf()) { $block_id = Filter::postInteger('block_id'); if ($block_id) { Database::prepare("UPDATE `##block` SET gedcom_id = NULLIF(:tree_id, '0'), block_order = :block_order WHERE block_id = :block_id")->execute(array('tree_id' => Filter::postInteger('gedcom_id'), 'block_order' => Filter::postInteger('block_order'), 'block_id' => $block_id)); } else { Database::prepare("INSERT INTO `##block` (gedcom_id, module_name, block_order) VALUES (NULLIF(:tree_id, '0'), :module_name, :block_order)")->execute(array('tree_id' => Filter::postInteger('gedcom_id'), 'module_name' => $this->getName(), 'block_order' => Filter::postInteger('block_order'))); $block_id = Database::getInstance()->lastInsertId(); } $this->setBlockSetting($block_id, 'header', Filter::post('header')); $this->setBlockSetting($block_id, 'faqbody', Filter::post('faqbody')); $languages = Filter::postArray('lang'); $this->setBlockSetting($block_id, 'languages', implode(',', $languages)); $this->config(); } else { $block_id = Filter::getInteger('block_id'); $controller = new PageController(); if ($block_id) { $controller->setPageTitle(I18N::translate('Edit FAQ item')); $header = $this->getBlockSetting($block_id, 'header'); $faqbody = $this->getBlockSetting($block_id, 'faqbody'); $block_order = Database::prepare("SELECT block_order FROM `##block` WHERE block_id = :block_id")->execute(array('block_id' => $block_id))->fetchOne(); $gedcom_id = Database::prepare("SELECT gedcom_id FROM `##block` WHERE block_id = :block_id")->execute(array('block_id' => $block_id))->fetchOne(); } else { $controller->setPageTitle(I18N::translate('Add an FAQ item')); $header = ''; $faqbody = ''; $block_order = Database::prepare("SELECT IFNULL(MAX(block_order)+1, 0) FROM `##block` WHERE module_name = :module_name")->execute(array('module_name' => $this->getName()))->fetchOne(); $gedcom_id = $WT_TREE->getTreeId(); } $controller->pageHeader(); if (Module::getModuleByName('ckeditor')) { CkeditorModule::enableEditor($controller); } ?> <ol class="breadcrumb small"> <li><a href="admin.php"><?php echo I18N::translate('Control panel'); ?> </a></li> <li><a href="admin_modules.php"><?php echo I18N::translate('Module administration'); ?> </a></li> <li><a href="module.php?mod=<?php echo $this->getName(); ?> &mod_action=admin_config"><?php echo I18N::translate('Frequently asked questions'); ?> </a> </li> <li class="active"><?php echo $controller->getPageTitle(); ?> </li> </ol> <h1><?php echo $controller->getPageTitle(); ?> </h1> <form name="faq" class="form-horizontal" method="post" action="module.php?mod=<?php echo $this->getName(); ?> &mod_action=admin_edit"> <?php echo Filter::getCsrf(); ?> <input type="hidden" name="save" value="1"> <input type="hidden" name="block_id" value="<?php echo $block_id; ?> "> <div class="form-group"> <label for="header" class="col-sm-3 control-label"> <?php echo I18N::translate('Question'); ?> </label> <div class="col-sm-9"> <input type="text" class="form-control" name="header" id="header" value="<?php echo Filter::escapeHtml($header); ?> "> </div> </div> <div class="form-group"> <label for="faqbody" class="col-sm-3 control-label"> <?php echo I18N::translate('Answer'); ?> </label> <div class="col-sm-9"> <textarea name="faqbody" id="faqbody" class="form-control html-edit" rows="10"><?php echo Filter::escapeHtml($faqbody); ?> </textarea> </div> </div> <div class="form-group"> <label for="xref" class="col-sm-3 control-label"> <?php echo I18N::translate('Show this block for which languages?'); ?> </label> <div class="col-sm-9"> <?php echo FunctionsEdit::editLanguageCheckboxes('lang', explode(',', $this->getBlockSetting($block_id, 'languages'))); ?> </div> </div> <div class="form-group"> <label for="block_order" class="col-sm-3 control-label"> <?php echo I18N::translate('FAQ position'); ?> </label> <div class="col-sm-9"> <input type="text" name="block_order" id="block_order" class="form-control" value="<?php echo $block_order; ?> "> </div> </div> <div class="form-group"> <label for="gedcom_id" class="col-sm-3 control-label"> <?php echo I18N::translate('FAQ visibility'); ?> </label> <div class="col-sm-9"> <?php echo FunctionsEdit::selectEditControl('gedcom_id', Tree::getIdList(), I18N::translate('All'), $gedcom_id, 'class="form-control"'); ?> <p class="small text-muted"> <?php echo I18N::translate('A FAQ item can be displayed on just one of the family trees, or on all the family trees.'); ?> </p> </div> </div> <div class="form-group"> <div class="col-sm-offset-3 col-sm-9"> <button type="submit" class="btn btn-primary"> <i class="fa fa-check"></i> <?php echo I18N::translate('save'); ?> </button> </div> </div> </form> <?php } }
/** * Show and process a form to edit a story. */ private function edit() { global $WT_TREE; if (Auth::isEditor($WT_TREE)) { if (Filter::postBool('save') && Filter::checkCsrf()) { $block_id = Filter::postInteger('block_id'); if ($block_id) { Database::prepare("UPDATE `##block` SET gedcom_id=?, xref=? WHERE block_id=?")->execute(array(Filter::postInteger('gedcom_id'), Filter::post('xref', WT_REGEX_XREF), $block_id)); } else { Database::prepare("INSERT INTO `##block` (gedcom_id, xref, module_name, block_order) VALUES (?, ?, ?, ?)")->execute(array(Filter::postInteger('gedcom_id'), Filter::post('xref', WT_REGEX_XREF), $this->getName(), 0)); $block_id = Database::getInstance()->lastInsertId(); } $this->setBlockSetting($block_id, 'title', Filter::post('title')); $this->setBlockSetting($block_id, 'story_body', Filter::post('story_body')); $languages = Filter::postArray('lang'); $this->setBlockSetting($block_id, 'languages', implode(',', $languages)); $this->config(); } else { $block_id = Filter::getInteger('block_id'); $controller = new PageController(); if ($block_id) { $controller->setPageTitle(I18N::translate('Edit story')); $title = $this->getBlockSetting($block_id, 'title'); $story_body = $this->getBlockSetting($block_id, 'story_body'); $xref = Database::prepare("SELECT xref FROM `##block` WHERE block_id=?")->execute(array($block_id))->fetchOne(); } else { $controller->setPageTitle(I18N::translate('Add a story')); $title = ''; $story_body = ''; $xref = Filter::get('xref', WT_REGEX_XREF); } $controller->pageHeader()->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)->addInlineJavascript('autocomplete();'); if (Module::getModuleByName('ckeditor')) { CkeditorModule::enableEditor($controller); } $individual = Individual::getInstance($xref, $WT_TREE); ?> <ol class="breadcrumb small"> <li><a href="admin.php"><?php echo I18N::translate('Control panel'); ?> </a></li> <li><a href="admin_modules.php"><?php echo I18N::translate('Module administration'); ?> </a></li> <li><a href="module.php?mod=<?php echo $this->getName(); ?> &mod_action=admin_config"><?php echo $this->getTitle(); ?> </a></li> <li class="active"><?php echo $controller->getPageTitle(); ?> </li> </ol> <h1><?php echo $controller->getPageTitle(); ?> </h1> <form class="form-horizontal" method="post" action="module.php?mod=<?php echo $this->getName(); ?> &mod_action=admin_edit"> <?php echo Filter::getCsrf(); ?> <input type="hidden" name="save" value="1"> <input type="hidden" name="block_id" value="<?php echo $block_id; ?> "> <input type="hidden" name="gedcom_id" value="<?php echo $WT_TREE->getTreeId(); ?> "> <div class="form-group"> <label for="title" class="col-sm-3 control-label"> <?php echo I18N::translate('Story title'); ?> </label> <div class="col-sm-9"> <input type="text" class="form-control" name="title" id="title" value="<?php echo Filter::escapeHtml($title); ?> "> </div> </div> <div class="form-group"> <label for="story_body" class="col-sm-3 control-label"> <?php echo I18N::translate('Story'); ?> </label> <div class="col-sm-9"> <textarea name="story_body" id="story_body" class="html-edit form-control" rows="10"><?php echo Filter::escapeHtml($story_body); ?> </textarea> </div> </div> <div class="form-group"> <label for="xref" class="col-sm-3 control-label"> <?php echo I18N::translate('Individual'); ?> </label> <div class="col-sm-9"> <input data-autocomplete-type="INDI" type="text" name="xref" id="xref" size="4" value="<?php echo $xref; ?> "> <?php echo FunctionsPrint::printFindIndividualLink('xref'); ?> <?php if ($individual) { ?> <?php echo $individual->formatList('span'); ?> <?php } ?> </div> </div> <div class="form-group"> <label for="xref" class="col-sm-3 control-label"> <?php echo I18N::translate('Show this block for which languages?'); ?> </label> <div class="col-sm-9"> <?php echo FunctionsEdit::editLanguageCheckboxes('lang', explode(',', $this->getBlockSetting($block_id, 'languages'))); ?> </div> </div> <div class="form-group"> <div class="col-sm-offset-3 col-sm-9"> <button type="submit" class="btn btn-primary"> <i class="fa fa-check"></i> <?php echo I18N::translate('save'); ?> </button> </div> </div> </form> <?php } } else { header('Location: ' . WT_BASE_URL); } }
/** * {@inhericDoc} * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() */ protected function renderContent() { if (Module::getModuleByName('ckeditor')) { CkeditorModule::enableEditor($this->ctrl); } /** @var AbstractModule $module */ $module = $this->data->get('module'); ?> <ol class="breadcrumb small"> <li><a href="admin.php"><?php echo I18N::translate('Control panel'); ?> </a></li> <li><a href="admin_modules.php"><?php echo I18N::translate('Module administration'); ?> </a></li> <li class="active"><?php echo $this->data->get('title'); ?> </li> </ol> <h1><?php echo $this->data->get('title'); ?> </h1> <form method="post" class="form-horizontal"> <?php echo Filter::getCsrf(); ?> <input type="hidden" name="action" value="update"> <h3><?php echo I18N::translate('Titles'); ?> </h3> <!-- MAJ_TITLE_PREFIX --> <div class="form-group"> <label for="MAJ_TITLE_PREFIX" class="col-sm-3 control-label"> <?php echo I18N::translate('Title prefixes'); ?> </label> <div class="col-sm-9"> <input type="text" class="form-control" dir="auto" id="MAJ_TITLE_PREFIX" name="MAJ_TITLE_PREFIX" value="<?php echo Filter::escapeHtml($module->getSetting('MAJ_TITLE_PREFIX')); ?> " maxlength="255" placeholder="de |d'|du |of |von |vom |am |zur |van |del |della |t'|da |ten |ter |das |dos |af "> <p class="small text-muted"> <?php echo I18N::translate('Set possible aristocratic particles to separate titles from the land they refer to (e.g. Earl <strong>of</strong> Essex). Variants must be separated by the character |.'); ?> <br /> <?php echo I18N::translate('An example for this setting is : <strong>de |d\'|du |of |von |vom |am |zur |van |del |della |t\'|da |ten |ter |das |dos |af </strong> (covering some of French, English, German, Dutch, Italian, Spanish, Portuguese, Swedish common particles).'); ?> </p> </div> </div> <h3><?php echo I18N::translate('Header'); ?> </h3> <!-- MAJ_ADD_HTML_HEADER --> <div class="form-group"> <label class="control-label col-sm-3" for="MAJ_ADD_HTML_HEADER"> <?php echo I18N::translate('Include additional HTML in header'); ?> </label> <div class="col-sm-9"> <?php echo FunctionsEdit::editFieldYesNo('MAJ_ADD_HTML_HEADER', $module->getSetting('MAJ_ADD_HTML_HEADER', 0), 'class="radio-inline"'); ?> <p class="small text-muted"> <?php echo I18N::translate('Enable this option to include raw additional HTML in the header of the page.'); ?> </p> </div> </div> <!-- MAJ_SHOW_HTML_HEADER --> <div class="form-group"> <label class="control-label col-sm-3" for="MAJ_SHOW_HTML_HEADER"> <?php echo I18N::translate('Hide additional header'); ?> </label> <div class="col-sm-9"> <?php echo FunctionsEdit::editFieldAccessLevel('MAJ_SHOW_HTML_HEADER', $module->getSetting('MAJ_SHOW_HTML_HEADER', Auth::PRIV_HIDE), 'class="form-control"'); ?> <p class="small text-muted"> <?php echo I18N::translate('Select the access level until which the additional header should be displayed. The <em>Hide from everyone</em> should be used to show the header to everybody.'); ?> </p> </div> </div> <!-- MAJ_HTML_HEADER --> <div class="form-group"> <label for="MAJ_HTML_HEADER" class="col-sm-3 control-label"> <?php echo I18N::translate('Additional HTML in header'); ?> </label> <div class="col-sm-9"> <textarea class="form-control html-edit" rows="10" dir="auto" id="MAJ_HTML_HEADER" name="MAJ_HTML_HEADER" ><?php echo Filter::escapeHtml($module->getSetting('MAJ_HTML_HEADER')); ?> </textarea> <p class="small text-muted"> <?php echo I18N::translate('If the option has been enabled, the saved HTML will be inserted in the header.'); ?> <br> <?php echo I18N::translate('In edit mode, the HTML characters might have been transformed to their HTML equivalents (for instance &gt; for >), it is however possible to insert HTML characters, they will be automatically converted to their equivalent values.'); ?> </p> </div> </div> <h3><?php echo I18N::translate('Footer'); ?> </h3> <!-- MAJ_DISPLAY_CNIL --> <div class="form-group"> <label class="control-label col-sm-3" for="MAJ_DISPLAY_CNIL"> <?php echo I18N::translate('Display French <em>CNIL</em> disclaimer'); ?> </label> <div class="col-sm-9"> <?php echo FunctionsEdit::editFieldYesNo('MAJ_DISPLAY_CNIL', $module->getSetting('MAJ_DISPLAY_CNIL', 0), 'class="radio-inline"'); ?> <p class="small text-muted"> <?php echo I18N::translate('Enable this option to display an information disclaimer in the footer required by the French <em>CNIL</em> for detaining personal information on users.'); ?> </p> </div> </div> <!-- MAJ_CNIL_REFERENCE --> <div class="form-group"> <label for="MAJ_CNIL_REFERENCE" class="col-sm-3 control-label"> <?php echo I18N::translate('<em>CNIL</em> reference'); ?> </label> <div class="col-sm-9"> <input type="text" class="form-control" dir="auto" id="MAJ_CNIL_REFERENCE" name="MAJ_CNIL_REFERENCE" value="<?php echo Filter::escapeHtml($module->getSetting('MAJ_CNIL_REFERENCE')); ?> " maxlength="255"> <p class="small text-muted"> <?php echo I18N::translate('If the website has been notified to the French <em>CNIL</em>, an authorisation number may have been delivered. Providing this reference will display a message in the footer visible to all users.'); ?> </p> </div> </div> <!-- MAJ_ADD_HTML_FOOTER --> <div class="form-group"> <label class="control-label col-sm-3" for="MAJ_ADD_HTML_FOOTER"> <?php echo I18N::translate('Include additional HTML in footer'); ?> </label> <div class="col-sm-9"> <?php echo FunctionsEdit::editFieldYesNo('MAJ_ADD_HTML_FOOTER', $module->getSetting('MAJ_ADD_HTML_FOOTER', 0), 'class="radio-inline"'); ?> <p class="small text-muted"> <?php echo I18N::translate('Enable this option to include raw additional HTML in the footer of the page.'); ?> </p> </div> </div> <!-- MAJ_SHOW_HTML_FOOTER --> <div class="form-group"> <label class="control-label col-sm-3" for="MAJ_SHOW_HTML_FOOTER"> <?php echo I18N::translate('Hide additional footer'); ?> </label> <div class="col-sm-9"> <?php echo FunctionsEdit::editFieldAccessLevel('MAJ_SHOW_HTML_FOOTER', $module->getSetting('MAJ_SHOW_HTML_FOOTER', Auth::PRIV_HIDE), 'class="form-control"'); ?> <p class="small text-muted"> <?php echo I18N::translate('Select the access level until which the additional footer should be displayed. The <em>Hide from everyone</em> should be used to show the footer to everybody.'); ?> </p> </div> </div> <!-- MAJ_HTML_FOOTER --> <div class="form-group"> <label for="MAJ_HTML_FOOTER" class="col-sm-3 control-label"> <?php echo I18N::translate('Additional HTML in footer'); ?> </label> <div class="col-sm-9"> <textarea class="form-control html-edit" rows="10" dir="auto" id="MAJ_HTML_FOOTER" name="MAJ_HTML_FOOTER" ><?php echo Filter::escapeHtml($module->getSetting('MAJ_HTML_FOOTER')); ?> </textarea> <p class="small text-muted"> <?php echo I18N::translate('If the option has been enabled, the saved HTML will be inserted in the footer, before the logo.'); ?> <br> <?php echo I18N::translate('In edit mode, the HTML characters might have been transformed to their HTML equivalents (for instance &gt; for >), it is however possible to insert HTML characters, they will be automatically converted to their equivalent values.'); ?> </p> </div> </div> <div class="form-group"> <div class="col-sm-offset-3 col-sm-9"> <button type="submit" class="btn btn-primary"> <i class="fa fa-check"></i> <?php echo I18N::translate('save'); ?> </button> </div> </div> </form> <?php }
private function edit() { global $WT_TREE; $args = array(); if (webtrees\Filter::postBool('save') && webtrees\Filter::checkCsrf()) { $block_id = webtrees\Filter::post('block_id'); if ($block_id) { $args['tree_id'] = webtrees\Filter::post('gedcom_id'); $args['block_order'] = (int) webtrees\Filter::post('block_order'); $args['block_id'] = $block_id; webtrees\Database::prepare("UPDATE `##block` SET gedcom_id=NULLIF(:tree_id, ''), block_order=:block_order WHERE block_id=:block_id")->execute($args); } else { $args['tree_id'] = webtrees\Filter::post('gedcom_id'); $args['module_name'] = $this->getName(); $args['block_order'] = (int) webtrees\Filter::post('block_order'); webtrees\Database::prepare("INSERT INTO `##block` (gedcom_id, module_name, block_order) VALUES (NULLIF(:tree_id, ''), :module_name, :block_order)")->execute($args); $block_id = webtrees\Database::getInstance()->lastInsertId(); } $this->setBlockSetting($block_id, 'pages_title', webtrees\Filter::post('pages_title')); $this->setBlockSetting($block_id, 'pages_content', webtrees\Filter::post('pages_content')); // allow html $this->setBlockSetting($block_id, 'pages_access', webtrees\Filter::post('pages_access')); $languages = array(); foreach (webtrees\I18N::installedLocales() as $locale) { if (webtrees\Filter::postBool('lang_' . $locale->languageTag())) { $languages[] = $locale->languageTag(); } } $this->setBlockSetting($block_id, 'languages', implode(',', $languages)); $this->config(); } else { $block_id = webtrees\Filter::get('block_id'); $controller = new webtrees\Controller\PageController(); $controller->restrictAccess(webtrees\Auth::isEditor($WT_TREE)); if ($block_id) { $controller->setPageTitle(webtrees\I18N::translate('Edit page')); $items_title = $this->getBlockSetting($block_id, 'pages_title'); $items_content = $this->getBlockSetting($block_id, 'pages_content'); $items_access = $this->getBlockSetting($block_id, 'pages_access'); $args['block_id'] = $block_id; $block_order = webtrees\Database::prepare("SELECT block_order FROM `##block` WHERE block_id=:block_id")->execute($args)->fetchOne(); $gedcom_id = webtrees\Database::prepare("SELECT gedcom_id FROM `##block` WHERE block_id=:block_id")->execute($args)->fetchOne(); } else { $controller->setPageTitle(webtrees\I18N::translate('Add page')); $items_title = ''; $items_content = ''; $items_access = 1; $args['module_name'] = $this->getName(); $block_order = webtrees\Database::prepare("SELECT IFNULL(MAX(block_order)+1, 0) FROM `##block` WHERE module_name=:module_name")->execute($args)->fetchOne(); $gedcom_id = $WT_TREE->getTreeId(); } $controller->pageHeader(); if (webtrees\Module::getModuleByName('ckeditor')) { webtrees\Module\CkeditorModule::enableEditor($controller); } ?> <ol class="breadcrumb small"> <li><a href="admin.php"><?php echo webtrees\I18N::translate('Control panel'); ?> </a></li> <li><a href="admin_modules.php"><?php echo webtrees\I18N::translate('Module administration'); ?> </a></li> <li><a href="module.php?mod=<?php echo $this->getName(); ?> &mod_action=admin_config"><?php echo webtrees\I18N::translate($this->getTitle()); ?> </a></li> <li class="active"><?php echo $controller->getPageTitle(); ?> </li> </ol> <form class="form-horizontal" method="POST" action="#" name="pages" id="pagesForm"> <?php echo webtrees\Filter::getCsrf(); ?> <input type="hidden" name="save" value="1"> <input type="hidden" name="block_id" value="<?php echo $block_id; ?> "> <h3><?php echo webtrees\I18N::translate('General'); ?> </h3> <div class="form-group"> <label class="control-label col-sm-3" for="pages_title"> <?php echo webtrees\I18N::translate('Title'); ?> </label> <div class="col-sm-9"> <input class="form-control" id="pages_title" size="90" name="pages_title" required type="text" value="<?php echo webtrees\Filter::escapeHtml($items_title); ?> " > </div> </div> <div class="form-group"> <label class="control-label col-sm-3" for="pages_content"> <?php echo webtrees\I18N::translate('Content'); ?> </label> <div class="col-sm-9"> <textarea class="form-control html-edit" id="pages_content" rows="10" cols="90" name="pages_content" required type="text"> <?php echo webtrees\Filter::escapeHtml($items_content); ?> </textarea> </div> </div> <h3><?php echo webtrees\I18N::translate('Languages'); ?> </h3> <div class="form-group"> <label class="control-label col-sm-3" for="lang_*"> <?php echo webtrees\I18N::translate('Show this page for which languages?'); ?> </label> <div class="col-sm-9"> <?php $accepted_languages = explode(',', $this->getBlockSetting($block_id, 'languages')); foreach (webtrees\I18N::activeLocales() as $locale) { ?> <div class="checkbox"> <label title="<?php echo $locale->languageTag(); ?> "> <input type="checkbox" name="lang_<?php echo $locale->languageTag(); ?> " <?php echo in_array($locale->languageTag(), $accepted_languages) ? 'checked' : ''; ?> ><?php echo $locale->endonym(); ?> </label> </div> <?php } ?> </div> </div> <h3><?php echo webtrees\I18N::translate('Visibility and Access'); ?> </h3> <div class="form-group"> <label class="control-label col-sm-3" for="block_order"> <?php echo webtrees\I18N::translate('Page position'); ?> </label> <div class="col-sm-9"> <input class="form-control" id="position" name="block_order" size="3" required type="number" value="<?php echo webtrees\Filter::escapeHtml($block_order); ?> " > </div> <span class="help-block col-sm-9 col-sm-offset-3 small text-muted"> <?php echo webtrees\I18N::translate('This field controls the order in which the pages are displayed.<br><br>You do not have to enter the numbers sequentially. If you leave holes in the numbering scheme, you can insert other pages later. For example, if you use the numbers 1, 6, 11, 16, you can later insert pages with the missing sequence numbers. Negative numbers and zero are allowed, and can be used to insert menu items in front of the first one.<br><br>When more than one page has the same position number, only one of these pages will be visible.'); ?> </span> </div> <div class="form-group"> <label class="control-label col-sm-3" for="block_order"> <?php echo webtrees\I18N::translate('Page visibility'); ?> </label> <div class="col-sm-9"> <?php echo webtrees\Functions\FunctionsEdit::selectEditControl('gedcom_id', webtrees\Tree::getIdList(), webtrees\I18N::translate('All'), $gedcom_id, 'class="form-control"'); ?> </div> <span class="help-block col-sm-9 col-sm-offset-3 small text-muted"> <?php echo webtrees\I18N::translate('You can determine whether this page will be visible regardless of family tree, or whether it will be visible only to the current family tree.'); ?> </span> </div> <div class="form-group"> <label class="control-label col-sm-3" for="pages_access"> <?php echo webtrees\I18N::translate('Access level'); ?> </label> <div class="col-sm-9"> <?php echo webtrees\Functions\FunctionsEdit::editFieldAccessLevel('pages_access', $items_access, 'class="form-control"'); ?> </div> </div> <div class="row col-sm-9 col-sm-offset-3"> <button class="btn btn-primary" type="submit"> <i class="fa fa-check"></i> <?php echo webtrees\I18N::translate('save'); ?> </button> <button class="btn" type="button" onclick="window.location='<?php echo $this->getConfigLink(); ?> ';"> <i class="fa fa-close"></i> <?php echo webtrees\I18N::translate('cancel'); ?> </button> </div> </form> <?php } }