当前位置: 首页>>代码示例>>PHP>>正文


PHP FunctionsEdit::selectEditControl方法代码示例

本文整理汇总了PHP中Fisharebest\Webtrees\Functions\FunctionsEdit::selectEditControl方法的典型用法代码示例。如果您正苦于以下问题:PHP FunctionsEdit::selectEditControl方法的具体用法?PHP FunctionsEdit::selectEditControl怎么用?PHP FunctionsEdit::selectEditControl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Fisharebest\Webtrees\Functions\FunctionsEdit的用法示例。


在下文中一共展示了FunctionsEdit::selectEditControl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

        echo I18N::translate('The “%” character is a wildcard, and will match zero or more other characters.');
        ?>
				</p>
			</div>
		</div>

		<!-- RULE -->
		<div class="form-group">
			<label class="control-label col-sm-3" for="rule">
				<?php 
        echo I18N::translate('Rule');
        ?>
			</label>
			<div class="col-sm-9">
				<?php 
        echo FunctionsEdit::selectEditControl('rule', $rules_edit, null, $rule, 'class="form-control"');
        ?>
			</div>
		</div>

		<!-- COMMENT -->
		<div class="form-group">
			<label class="control-label col-sm-3" for="comment">
				<?php 
        echo I18N::translate('Comment');
        ?>
			</label>
			<div class="col-sm-9">
				<input class="form-control" type="text" id="comment" name="comment" value="<?php 
        echo Filter::escapeHtml($comment);
        ?>
开发者ID:tunandras,项目名称:webtrees,代码行数:31,代码来源:admin_site_access.php

示例2: array

							size="3" value="<?php 
echo $controller->root->getXref();
?>
">
						<?php 
echo FunctionsPrint::printFindIndividualLink('rootid');
?>
					</td>
					<td class="optionbox center">
						<?php 
echo FunctionsEdit::editFieldInteger('PEDIGREE_GENERATIONS', $controller->generations, 3, $WT_TREE->getPreference('MAX_PEDIGREE_GENERATIONS'));
?>
					</td>
					<td class="optionbox center">
						<?php 
echo FunctionsEdit::selectEditControl('orientation', array(0 => I18N::translate('Portrait'), 1 => I18N::translate('Landscape'), 2 => I18N::translate('Oldest at top'), 3 => I18N::translate('Oldest at bottom')), null, $controller->orientation);
?>
					</td>
					<td class="optionbox center">
						<?php 
echo FunctionsEdit::twoStateCheckbox('show_full', $controller->showFull());
?>
					</td>
				</tr>
			</tbody>
		</table>
	</form>
<?php 
if ($controller->error_message) {
    echo '<p class="ui-state-error">', $controller->error_message, '</p>';
    return;
开发者ID:tronsmit,项目名称:webtrees,代码行数:31,代码来源:pedigree.php

示例3: configureBlock

 /**
  * An HTML form to edit block settings
  *
  * @param int $block_id
  */
 public function configureBlock($block_id)
 {
     if (Filter::postBool('save') && Filter::checkCsrf()) {
         $this->setBlockSetting($block_id, 'num', Filter::postInteger('num', 1, 10000, 10));
         $this->setBlockSetting($block_id, 'infoStyle', Filter::post('infoStyle', 'list|table', 'table'));
         $this->setBlockSetting($block_id, 'block', Filter::postBool('block'));
     }
     $num = $this->getBlockSetting($block_id, 'num', '10');
     $infoStyle = $this->getBlockSetting($block_id, 'infoStyle', 'table');
     $block = $this->getBlockSetting($block_id, 'block', '0');
     echo '<tr><td class="descriptionbox wrap width33">';
     echo I18N::translate('Number of items to show');
     echo '</td><td class="optionbox">';
     echo '<input type="text" name="num" size="2" value="', $num, '">';
     echo '</td></tr>';
     echo '<tr><td class="descriptionbox wrap width33">';
     echo I18N::translate('Presentation style');
     echo '</td><td class="optionbox">';
     echo FunctionsEdit::selectEditControl('infoStyle', array('list' => I18N::translate('list'), 'table' => I18N::translate('table')), null, $infoStyle, '');
     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>';
 }
开发者ID:pal-saugstad,项目名称:webtrees,代码行数:31,代码来源:TopGivenNamesModule.php

示例4:

echo I18N::translate('User');
?>
			</label>
			<?php 
echo FunctionsEdit::selectEditControl('user', $users_array, '', $user, 'class="form-control"');
?>
		</div>

		<div class="form-group col-xs-6 col-md-3">
			<label for="gedc">
				<?php 
echo I18N::translate('Family tree');
?>
			</label>
			<?php 
echo FunctionsEdit::selectEditControl('gedc', Tree::getNameList(), '', $gedc, Auth::isAdmin() ? 'class="form-control"' : 'disabled class="form-control"');
?>
		</div>
	</div>

	<div class="row text-center">
		<button type="submit" class="btn btn-primary">
			<?php 
echo I18N::translate('Filter');
?>
		</button>

		<button type="submit" class="btn btn-primary" onclick="document.logs.action.value='export';return true;" <?php 
echo $action === 'show' ? '' : 'disabled';
?>
>
开发者ID:tunandras,项目名称:webtrees,代码行数:31,代码来源:admin_site_change.php

示例5:

			<div class="value">
				<?php 
echo FunctionsEdit::editFieldLanguage('form_language', Auth::user()->getPreference('language'));
?>
			</div>

			<div class="label">
				<label for="form_timezone">
					<?php 
echo I18N::translate('Time zone');
?>
				</label>
			</div>
			<div class="value">
				<?php 
echo FunctionsEdit::selectEditControl('form_timezone', array_combine(\DateTimeZone::listIdentifiers(), \DateTimeZone::listIdentifiers()), null, Auth::user()->getPreference('TIMEZONE') ?: 'UTC', 'class="form-control"');
?>
				<p class="small text-muted">
					<?php 
echo I18N::translate('The time zone is required for date calculations, such as knowing today’s date.');
?>
				</p>
			</div>

			<div class="label">
				<label for="form_email">
					<?php 
echo I18N::translate('Email address');
?>
				</label>
			</div>
开发者ID:pal-saugstad,项目名称:webtrees,代码行数:31,代码来源:edituser.php

示例6:

">
	<input type="hidden" name="action" value="filter">
	<input type="hidden" name="search" value="yes">
	<table class="list_table">
		<tbody>
			<tr>
				<td class="descriptionbox wrap">
					<label for="folder">
						<?php 
echo I18N::translate('Folder');
?>
					</label>
				</td>
				<td class="optionbox wrap">
					<?php 
echo FunctionsEdit::selectEditControl('folder', $folders, null, $folder);
?>
				</td>
				<?php 
if (Auth::isEditor($WT_TREE)) {
    ?>
				<td class="descriptionbox wrap">
					<label for="sortby">
						<?php 
    echo I18N::translate('Sort order');
    ?>
					</label>
				</td>
				<td class="optionbox wrap">
					<select name="sortby" id="sortby">
						<option value="title" <?php 
开发者ID:josefpavlik,项目名称:webtrees,代码行数:31,代码来源:medialist.php

示例7: number

        echo '<p>', I18N::translate('In a family tree, each record has an internal reference number (called an “XREF”) such as “F123” or “R14”.'), '</p>', '<p>', I18N::plural('The two family trees have %1$s record which uses the same “XREF”.', 'The two family trees have %1$s records which use the same “XREF”.', count($xrefs), count($xrefs)), '</p>', '<p>', I18N::translate('You must renumber the records in one of the trees before you can merge them.'), '</p>', '<p>', '<a class="current" href="admin_trees_renumber.php?ged=', $tree1->getNameUrl(), '">', I18N::translate('Renumber family tree'), ' — ', $tree1->getTitleHtml(), '</a>', '</p>', '<p>', '<a class="current" href="admin_trees_renumber.php?ged=', $tree2->getNameUrl(), '">', I18N::translate('Renumber family tree'), ' — ', $tree2->getTitleHtml(), '</a>', '</p>';
    } else {
        Database::beginTransaction();
        Database::exec("LOCK TABLE" . " `##individuals` WRITE," . " `##individuals` AS individuals2 READ," . " `##families` WRITE," . " `##families` AS families2 READ," . " `##sources` WRITE," . " `##sources` AS sources2 READ," . " `##media` WRITE," . " `##media` AS media2 READ," . " `##other` WRITE," . " `##other` AS other2 READ," . " `##name` WRITE," . " `##name` AS name2 READ," . " `##placelinks` WRITE," . " `##placelinks` AS placelinks2 READ," . " `##change` WRITE," . " `##change` AS change2 READ," . " `##dates` WRITE," . " `##dates` AS dates2 READ," . " `##default_resn` WRITE," . " `##default_resn` AS default_resn2 READ," . " `##hit_counter` WRITE," . " `##hit_counter` AS hit_counter2 READ," . " `##link` WRITE," . " `##link` AS link2 READ");
        Database::prepare("INSERT INTO `##individuals` (i_id, i_file, i_rin, i_sex, i_gedcom)" . " SELECT i_id, ?, i_rin, i_sex, i_gedcom FROM `##individuals` AS individuals2 WHERE i_file = ?")->execute(array($tree2_id, $tree1_id));
        Database::prepare("INSERT INTO `##families` (f_id, f_file, f_husb, f_wife, f_gedcom, f_numchil)" . " SELECT f_id, ?, f_husb, f_wife, f_gedcom, f_numchil FROM `##families` AS families2 WHERE f_file = ?")->execute(array($tree2_id, $tree1_id));
        Database::prepare("INSERT INTO `##sources` (s_id, s_file, s_name, s_gedcom)" . " SELECT s_id, ?, s_name, s_gedcom FROM `##sources` AS sources2 WHERE s_file = ?")->execute(array($tree2_id, $tree1_id));
        Database::prepare("INSERT INTO `##media` (m_id, m_ext, m_type, m_titl, m_filename, m_file, m_gedcom)" . " SELECT m_id, m_ext, m_type, m_titl, m_filename, ?, m_gedcom FROM `##media` AS media2 WHERE m_file = ?")->execute(array($tree2_id, $tree1_id));
        Database::prepare("INSERT INTO `##other` (o_id, o_file, o_type, o_gedcom)" . " SELECT o_id, ?, o_type, o_gedcom FROM `##other` AS other2 WHERE o_file = ? AND o_type NOT IN ('HEAD', 'TRLR')")->execute(array($tree2_id, $tree1_id));
        Database::prepare("INSERT INTO `##name` (n_file, n_id, n_num, n_type, n_sort, n_full, n_surname, n_surn, n_givn, n_soundex_givn_std, n_soundex_surn_std, n_soundex_givn_dm, n_soundex_surn_dm)" . " SELECT ?, n_id, n_num, n_type, n_sort, n_full, n_surname, n_surn, n_givn, n_soundex_givn_std, n_soundex_surn_std, n_soundex_givn_dm, n_soundex_surn_dm FROM `##name` AS name2 WHERE n_file = ?")->execute(array($tree2_id, $tree1_id));
        Database::prepare("INSERT INTO `##placelinks` (pl_p_id, pl_gid, pl_file)" . " SELECT pl_p_id, pl_gid, ? FROM `##placelinks` AS placelinks2 WHERE pl_file = ?")->execute(array($tree2_id, $tree1_id));
        Database::prepare("INSERT INTO `##dates` (d_day, d_month, d_mon, d_year, d_julianday1, d_julianday2, d_fact, d_gid, d_file, d_type)" . " SELECT d_day, d_month, d_mon, d_year, d_julianday1, d_julianday2, d_fact, d_gid, ?, d_type FROM `##dates` AS dates2 WHERE d_file = ?")->execute(array($tree2_id, $tree1_id));
        Database::prepare("INSERT INTO `##default_resn` (gedcom_id, xref, tag_type, resn)" . " SELECT ?, xref, tag_type, resn FROM `##default_resn` AS default_resn2 WHERE gedcom_id = ?")->execute(array($tree2_id, $tree1_id));
        Database::prepare("INSERT INTO `##link` (l_file, l_from, l_type, l_to)" . " SELECT ?, l_from, l_type, l_to FROM `##link` AS link2 WHERE l_file = ?")->execute(array($tree2_id, $tree1_id));
        // This table may contain old (deleted) references, which could clash. IGNORE these.
        Database::prepare("INSERT IGNORE INTO `##change` (change_time, status, gedcom_id, xref, old_gedcom, new_gedcom, user_id)" . " SELECT change_time, status, ?, xref, old_gedcom, new_gedcom, user_id FROM `##change` AS change2 WHERE gedcom_id = ?")->execute(array($tree2_id, $tree1_id));
        // This table may contain old (deleted) references, which could clash. IGNORE these.
        Database::prepare("INSERT IGNORE INTO `##hit_counter` (gedcom_id, page_name, page_parameter, page_count)" . " SELECT ?, page_name, page_parameter, page_count FROM `##hit_counter` AS hit_counter2 WHERE gedcom_id = ? AND page_name <> 'index.php'")->execute(array($tree2_id, $tree1_id));
        Database::exec("UNLOCK TABLES");
        Database::commit();
        echo '<p>', I18N::translate('The family trees have been merged successfully.'), '</p>';
    }
} else {
    echo '<form method="post">';
    echo '<input type="hidden" name="go" value="1">';
    echo '<p>', I18N::translate('Copy all the records from %1$s into %2$s.', FunctionsEdit::selectEditControl('tree1_id', Tree::getIdList(), '', null), FunctionsEdit::selectEditControl('tree2_id', Tree::getIdList(), '', null)), '</p>';
    echo '<button type="submit" class="btn btn-primary">';
    echo '<i class="fa fa-check"></i> ', I18N::translate('continue');
    echo '</button>';
    echo '</form>';
}
开发者ID:pal-saugstad,项目名称:webtrees,代码行数:31,代码来源:admin_trees_merge.php

示例8: config

    /**
     * The admin view - list, create, edit, delete stories.
     */
    private function config()
    {
        global $WT_TREE;
        $controller = new PageController();
        $controller->restrictAccess(Auth::isAdmin())->setPageTitle($this->getTitle())->pageHeader()->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)->addExternalJavascript(WT_DATATABLES_BOOTSTRAP_JS_URL)->addInlineJavascript('
				jQuery("#story_table").dataTable({
					' . I18N::datatablesI18N() . ',
					autoWidth: false,
					paging: true,
					pagingType: "full_numbers",
					lengthChange: true,
					filter: true,
					info: true,
					sorting: [[0,"asc"]],
					columns: [
						/* 0-name */ null,
						/* 1-NAME */ null,
						/* 2-NAME */ { sortable:false },
						/* 3-NAME */ { sortable:false }
					]
				});
			');
        $stories = Database::prepare("SELECT block_id, xref" . " FROM `##block` b" . " WHERE module_name=?" . " AND gedcom_id=?" . " ORDER BY xref")->execute(array($this->getName(), $WT_TREE->getTreeId()))->fetchAll();
        ?>
		<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 $controller->getPageTitle();
        ?>
</li>
		</ol>

		<h1><?php 
        echo $controller->getPageTitle();
        ?>
</h1>

		<form class="form form-inline">
			<label for="ged" class="sr-only">
				<?php 
        echo I18N::translate('Family tree');
        ?>
			</label>
			<input type="hidden" name="mod" value="<?php 
        echo $this->getName();
        ?>
">
			<input type="hidden" name="mod_action" value="admin_config">
			<?php 
        echo FunctionsEdit::selectEditControl('ged', Tree::getNameList(), null, $WT_TREE->getName(), 'class="form-control"');
        ?>
			<input type="submit" class="btn btn-primary" value="<?php 
        echo I18N::translate('show');
        ?>
">
		</form>

		<p>
			<a href="module.php?mod=<?php 
        echo $this->getName();
        ?>
&amp;mod_action=admin_edit" class="btn btn-default">
				<i class="fa fa-plus"></i>
				<?php 
        echo I18N::translate('Add a story');
        ?>
			</a>
		</p>

		<table class="table table-bordered table-condensed">
			<thead>
				<tr>
					<th><?php 
        echo I18N::translate('Story title');
        ?>
</th>
					<th><?php 
        echo I18N::translate('Individual');
        ?>
</th>
					<th><?php 
        echo I18N::translate('Edit');
        ?>
</th>
					<th><?php 
        echo I18N::translate('Delete');
        ?>
</th>
				</tr>
			</thead>
//.........这里部分代码省略.........
开发者ID:tunandras,项目名称:webtrees,代码行数:101,代码来源:StoriesModule.php

示例9:

        echo WT_DATA_DIR, Filter::escapeHtml($media_folder);
        ?>
						<input type="hidden" name="media_folder" value="<?php 
        echo Filter::escapeHtml($media_folder);
        ?>
">
						<?php 
    }
    ?>
					</div>

					<?php 
    if (count($media_paths) > 1) {
        ?>
					<?php 
        echo FunctionsEdit::selectEditControl('media_path', $media_paths, null, $media_path, 'onchange="this.form.submit();"');
        ?>
					<?php 
    } else {
        ?>
					<?php 
        echo Filter::escapeHtml($media_path);
        ?>
					<input type="hidden" name="media_path" value="<?php 
        echo Filter::escapeHtml($media_path);
        ?>
">
					<?php 
    }
    ?>
开发者ID:tronsmit,项目名称:webtrees,代码行数:30,代码来源:admin_media.php

示例10: configureBlock

 /**
  * An HTML form to edit block settings
  *
  * @param int $block_id
  */
 public function configureBlock($block_id)
 {
     if (Filter::postBool('save') && Filter::checkCsrf()) {
         $this->setBlockSetting($block_id, 'days', Filter::postInteger('days', 1, 30, 7));
         $this->setBlockSetting($block_id, 'filter', Filter::postBool('filter'));
         $this->setBlockSetting($block_id, 'onlyBDM', Filter::postBool('onlyBDM'));
         $this->setBlockSetting($block_id, 'infoStyle', Filter::post('infoStyle', 'list|table', 'table'));
         $this->setBlockSetting($block_id, 'sortStyle', Filter::post('sortStyle', 'alpha|anniv', 'alpha'));
         $this->setBlockSetting($block_id, 'block', Filter::postBool('block'));
     }
     $days = $this->getBlockSetting($block_id, 'days', '7');
     $filter = $this->getBlockSetting($block_id, 'filter', '1');
     $onlyBDM = $this->getBlockSetting($block_id, 'onlyBDM', '0');
     $infoStyle = $this->getBlockSetting($block_id, 'infoStyle', 'table');
     $sortStyle = $this->getBlockSetting($block_id, 'sortStyle', 'alpha');
     $block = $this->getBlockSetting($block_id, 'block', '1');
     echo '<tr><td class="descriptionbox wrap width33">';
     echo I18N::translate('Number of days to show');
     echo '</td><td class="optionbox">';
     echo '<input type="text" name="days" size="2" value="', $days, '">';
     echo ' <em>', I18N::plural('maximum %s day', 'maximum %s days', 30, I18N::number(30)), '</em>';
     echo '</td></tr>';
     echo '<tr><td class="descriptionbox wrap width33">';
     echo I18N::translate('Show only events of living individuals');
     echo '</td><td class="optionbox">';
     echo FunctionsEdit::editFieldYesNo('filter', $filter);
     echo '</td></tr>';
     echo '<tr><td class="descriptionbox wrap width33">';
     echo I18N::translate('Show only births, deaths, and marriages');
     echo '</td><td class="optionbox">';
     echo FunctionsEdit::editFieldYesNo('onlyBDM', $onlyBDM);
     echo '</td></tr>';
     echo '<tr><td class="descriptionbox wrap width33">';
     echo I18N::translate('Presentation style');
     echo '</td><td class="optionbox">';
     echo FunctionsEdit::selectEditControl('infoStyle', array('list' => I18N::translate('list'), 'table' => I18N::translate('table')), null, $infoStyle, '');
     echo '</td></tr>';
     echo '<tr><td class="descriptionbox wrap width33">';
     echo I18N::translate('Sort order');
     echo '</td><td class="optionbox">';
     echo FunctionsEdit::selectEditControl('sortStyle', array('alpha' => I18N::translate('sort by name'), 'anniv' => I18N::translate('sort by date')), null, $sortStyle, '');
     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>';
 }
开发者ID:tronsmit,项目名称:webtrees,代码行数:53,代码来源:UpcomingAnniversariesModule.php

示例11: configureBlock

 /**
  * An HTML form to edit block settings
  *
  * @param int $block_id
  */
 public function configureBlock($block_id)
 {
     if (Filter::postBool('save') && Filter::checkCsrf()) {
         $this->setBlockSetting($block_id, 'num', Filter::postInteger('num', 1, 10000, 10));
         $this->setBlockSetting($block_id, 'count_placement', Filter::post('count_placement', 'before|after', 'before'));
         $this->setBlockSetting($block_id, 'block', Filter::postBool('block'));
     }
     $num = $this->getBlockSetting($block_id, 'num', '10');
     $count_placement = $this->getBlockSetting($block_id, 'count_placement', 'before');
     $block = $this->getBlockSetting($block_id, 'block', '0');
     echo '<tr><td class="descriptionbox wrap width33">';
     echo I18N::translate('Number of items to show');
     echo '</td><td class="optionbox">';
     echo '<input type="text" name="num" size="2" value="', $num, '">';
     echo '</td></tr>';
     echo "<tr><td class=\"descriptionbox wrap width33\">";
     echo I18N::translate('Place counts before or after name?');
     echo "</td><td class=\"optionbox\">";
     echo FunctionsEdit::selectEditControl('count_placement', array('before' => I18N::translate('before'), 'after' => I18N::translate('after')), null, $count_placement, '');
     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>';
 }
开发者ID:josefpavlik,项目名称:webtrees,代码行数:31,代码来源:TopPageViewsModule.php

示例12: main

 /**
  * Main entry point
  *
  * @return string
  */
 private function main()
 {
     global $WT_TREE;
     $this->plugins = $this->getPluginList();
     // List of available plugins
     $this->plugin = Filter::get('plugin');
     // User parameters
     $this->xref = Filter::get('xref', WT_REGEX_XREF);
     $this->action = Filter::get('action');
     $this->data = Filter::get('data');
     // Don't do any processing until a plugin is chosen.
     if ($this->plugin && array_key_exists($this->plugin, $this->plugins)) {
         $this->PLUGIN = new $this->plugin();
         $this->PLUGIN->getOptions();
         $this->getAllXrefs();
         switch ($this->action) {
             case 'update':
                 $record = self::getLatestRecord($this->xref, $this->all_xrefs[$this->xref]);
                 if ($this->PLUGIN->doesRecordNeedUpdate($this->xref, $record)) {
                     $newrecord = $this->PLUGIN->updateRecord($this->xref, $record);
                     if ($newrecord != $record) {
                         if ($newrecord) {
                             GedcomRecord::getInstance($this->xref, $WT_TREE)->updateRecord($newrecord, $this->PLUGIN->chan);
                         } else {
                             GedcomRecord::getInstance($this->xref, $WT_TREE)->deleteRecord();
                         }
                     }
                 }
                 $this->xref = $this->findNextXref($this->xref);
                 break;
             case 'update_all':
                 foreach ($this->all_xrefs as $xref => $type) {
                     $record = self::getLatestRecord($xref, $type);
                     if ($this->PLUGIN->doesRecordNeedUpdate($xref, $record)) {
                         $newrecord = $this->PLUGIN->updateRecord($xref, $record);
                         if ($newrecord != $record) {
                             if ($newrecord) {
                                 GedcomRecord::getInstance($this->xref, $WT_TREE)->updateRecord($newrecord, $this->PLUGIN->chan);
                             } else {
                                 GedcomRecord::getInstance($this->xref, $WT_TREE)->deleteRecord();
                             }
                         }
                     }
                 }
                 $this->xref = '';
                 break;
         }
         // Make sure that our requested record really does need updating.
         // It may have been updated in another session, or may not have
         // been specified at all.
         if (array_key_exists($this->xref, $this->all_xrefs) && $this->PLUGIN->doesRecordNeedUpdate($this->xref, self::getLatestRecord($this->xref, $this->all_xrefs[$this->xref]))) {
             $this->curr_xref = $this->xref;
         }
         // The requested record doesn't need updating - find one that does
         if (!$this->curr_xref) {
             $this->curr_xref = $this->findNextXref($this->xref);
         }
         if (!$this->curr_xref) {
             $this->curr_xref = $this->findPrevXref($this->xref);
         }
         // If we've found a record to update, get details and look for the next/prev
         if ($this->curr_xref) {
             $this->prev_xref = $this->findPrevXref($this->curr_xref);
             $this->next_xref = $this->findNextXref($this->curr_xref);
         }
     }
     // HTML common to all pages
     $html = $this->getJavascript() . '<form id="batch_update_form" action="module.php" method="get">' . '<input type="hidden" name="mod" value="batch_update">' . '<input type="hidden" name="mod_action" value="admin_batch_update">' . '<input type="hidden" name="xref"   value="' . $this->xref . '">' . '<input type="hidden" name="action" value="">' . '<input type="hidden" name="data"   value="">' . '<table id="batch_update"><tr>' . '<th>' . I18N::translate('Family tree') . '</th>' . '<td>' . FunctionsEdit::selectEditControl('ged', Tree::getNameList(), '', $WT_TREE->getName(), 'onchange="reset_reload();"') . '</td></tr><tr><th>' . I18N::translate('Batch update') . '</th><td><select name="plugin" onchange="reset_reload();">';
     if (!$this->plugin) {
         $html .= '<option value="" selected></option>';
     }
     foreach ($this->plugins as $class => $plugin) {
         $html .= '<option value="' . $class . '" ' . ($this->plugin == $class ? 'selected' : '') . '>' . $plugin->getName() . '</option>';
     }
     $html .= '</select>';
     if ($this->PLUGIN) {
         $html .= '<br><em>' . $this->PLUGIN->getDescription() . '</em>';
     }
     $html .= '</td></tr>';
     if (!Auth::user()->getPreference('auto_accept')) {
         $html .= '<tr><td colspan="2" class="warning">' . I18N::translate('Your user account does not have “automatically approve changes” enabled.  You will only be able to change one record at a time.') . '</td></tr>';
     }
     // If a plugin is selected, display the details
     if ($this->PLUGIN) {
         $html .= $this->PLUGIN->getOptionsForm();
         if (substr($this->action, -4) == '_all') {
             // Reset - otherwise we might "undo all changes", which refreshes the
             // page, which makes them all again!
             $html .= '<script>reset_reload();</script>';
         } else {
             if ($this->curr_xref) {
                 // Create an object, so we can get the latest version of the name.
                 $this->record = GedcomRecord::getInstance($this->curr_xref, $WT_TREE);
                 $html .= '</table><table id="batch_update2"><tr><td>' . self::createSubmitButton(I18N::translate('previous'), $this->prev_xref) . self::createSubmitButton(I18N::translate('next'), $this->next_xref) . '</td><th><a href="' . $this->record->getHtmlUrl() . '">' . $this->record->getFullName() . '</a>' . '</th>' . '</tr><tr><td valign="top">' . '<br>' . implode('<br>', $this->PLUGIN->getActionButtons($this->curr_xref, $this->record)) . '<br>' . '</td><td dir="ltr" align="left">' . $this->PLUGIN->getActionPreview($this->record) . '</td></tr>';
             } else {
//.........这里部分代码省略.........
开发者ID:jflash,项目名称:webtrees,代码行数:101,代码来源:BatchUpdateModule.php

示例13:

?>
">
						<?php 
echo FunctionsPrint::printFindIndividualLink('rootid');
?>
					</td>
					<td class="descriptionbox">
						<label for="fan_style">
							<?php 
echo I18N::translate('Layout');
?>
							</label>
					</td>
					<td class="optionbox">
						<?php 
echo FunctionsEdit::selectEditControl('fan_style', $controller->getFanStyles(), null, $controller->fan_style);
?>
					</td>
					<td rowspan="2" class="topbottombar vmiddle">
						<input type="submit" value="<?php 
echo I18N::translate('view');
?>
">
					</td>
				</tr>
				<tr>
					<td class="descriptionbox">
						<label for="generations">
							<?php 
echo I18N::translate('Generations');
?>
开发者ID:tronsmit,项目名称:webtrees,代码行数:31,代码来源:fanchart.php

示例14: configureBlock

 /**
  * An HTML form to edit block settings
  *
  * @param int $block_id
  */
 public function configureBlock($block_id)
 {
     if (Filter::postBool('save') && Filter::checkCsrf()) {
         $this->setBlockSetting($block_id, 'num', Filter::postInteger('num', 1, 10000, 10));
         $this->setBlockSetting($block_id, 'infoStyle', Filter::post('infoStyle', 'list|array|table|tagcloud', 'table'));
     }
     $num = $this->getBlockSetting($block_id, 'num', '10');
     $infoStyle = $this->getBlockSetting($block_id, 'infoStyle', 'table');
     echo '<tr><td class="descriptionbox wrap width33">';
     echo I18N::translate('Number of surnames');
     echo '</td><td class="optionbox">';
     echo '<input type="text" name="num" size="2" value="', $num, '">';
     echo '</td></tr>';
     echo '<tr><td class="descriptionbox wrap width33">';
     echo I18N::translate('Presentation style');
     echo '</td><td class="optionbox">';
     echo FunctionsEdit::selectEditControl('infoStyle', array('list' => I18N::translate('bullet list'), 'array' => I18N::translate('compact list'), 'table' => I18N::translate('table'), 'tagcloud' => I18N::translate('tag cloud')), null, $infoStyle, '');
     echo '</td></tr>';
 }
开发者ID:tronsmit,项目名称:webtrees,代码行数:24,代码来源:TopSurnamesModule.php

示例15: configureBlock

 /** {@inheritdoc} */
 public function configureBlock($block_id)
 {
     if (Filter::postBool('save') && Filter::checkCsrf()) {
         $this->setBlockSetting($block_id, 'days', Filter::postInteger('days', 1, self::MAX_DAYS));
         $this->setBlockSetting($block_id, 'infoStyle', Filter::post('infoStyle', 'list|table'));
         $this->setBlockSetting($block_id, 'sortStyle', Filter::post('sortStyle', 'name|date_asc|date_desc'));
         $this->setBlockSetting($block_id, 'show_user', Filter::postBool('show_user'));
         $this->setBlockSetting($block_id, 'hide_empty', Filter::postBool('hide_empty'));
         $this->setBlockSetting($block_id, 'block', Filter::postBool('block'));
     }
     $days = $this->getBlockSetting($block_id, 'days', self::DEFAULT_DAYS);
     $infoStyle = $this->getBlockSetting($block_id, 'infoStyle', self::DEFAULT_INFO_STYLE);
     $sortStyle = $this->getBlockSetting($block_id, 'sortStyle', self::DEFAULT_SORT_STYLE);
     $show_user = $this->getBlockSetting($block_id, 'show_user', self::DEFAULT_SHOW_USER);
     $block = $this->getBlockSetting($block_id, 'block', self::DEFAULT_BLOCK);
     $hide_empty = $this->getBlockSetting($block_id, 'hide_empty', self::DEFAULT_HIDE_EMPTY);
     echo '<tr><td class="descriptionbox wrap width33">';
     echo I18N::translate('Number of days to show');
     echo '</td><td class="optionbox">';
     echo '<input type="text" name="days" size="2" value="', $days, '">';
     echo ' <em>', I18N::plural('maximum %s day', 'maximum %s days', I18N::number(self::MAX_DAYS), I18N::number(self::MAX_DAYS)), '</em>';
     echo '</td></tr>';
     echo '<tr><td class="descriptionbox wrap width33">';
     echo I18N::translate('Presentation style');
     echo '</td><td class="optionbox">';
     echo FunctionsEdit::selectEditControl('infoStyle', array('list' => I18N::translate('list'), 'table' => I18N::translate('table')), null, $infoStyle, '');
     echo '</td></tr>';
     echo '<tr><td class="descriptionbox wrap width33">';
     echo I18N::translate('Sort order');
     echo '</td><td class="optionbox">';
     echo FunctionsEdit::selectEditControl('sortStyle', array('name' => I18N::translate('sort by name'), 'date_asc' => I18N::translate('sort by date, oldest first'), 'date_desc' => I18N::translate('sort by date, newest first')), null, $sortStyle, '');
     echo '</td></tr>';
     echo '<tr><td class="descriptionbox wrap width33">';
     echo I18N::translate('Show the user who made the change');
     echo '</td><td class="optionbox">';
     echo FunctionsEdit::editFieldYesNo('show_user', $show_user);
     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>';
     echo '<tr><td class="descriptionbox wrap width33">';
     echo I18N::translate('Should this block be hidden when it is empty');
     echo '</td><td class="optionbox">';
     echo FunctionsEdit::editFieldYesNo('hide_empty', $hide_empty);
     echo '</td></tr>';
     echo '<tr><td colspan="2" class="optionbox wrap">';
     echo '<span class="error">', I18N::translate('If you hide an empty block, you will not be able to change its configuration until it becomes visible by no longer being empty.'), '</span>';
     echo '</td></tr>';
 }
开发者ID:tronsmit,项目名称:webtrees,代码行数:52,代码来源:RecentChangesModule.php


注:本文中的Fisharebest\Webtrees\Functions\FunctionsEdit::selectEditControl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。