summaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/js/treeview.js7
-rw-r--r--resources/views/branches-page.phtml13
-rw-r--r--resources/views/media-list-page.phtml23
-rw-r--r--resources/views/modules/ancestors-chart/page.phtml10
-rw-r--r--resources/views/modules/batch_update/admin.phtml6
-rw-r--r--resources/views/modules/census-assistant.phtml9
-rw-r--r--resources/views/modules/clippings/download.phtml13
-rw-r--r--resources/views/modules/clippings/show.phtml3
-rw-r--r--resources/views/modules/compact-chart/chart.phtml62
-rw-r--r--resources/views/modules/compact-chart/page.phtml14
-rw-r--r--resources/views/modules/descendancy/sidebar.phtml9
-rw-r--r--resources/views/modules/descendancy_chart/page.phtml14
-rw-r--r--resources/views/modules/family-book-chart/chart.phtml6
-rw-r--r--resources/views/modules/family-book-chart/page.phtml16
-rw-r--r--resources/views/modules/fanchart/page.phtml24
-rw-r--r--resources/views/modules/faq/config.phtml13
-rw-r--r--resources/views/modules/faq/edit.phtml9
-rw-r--r--resources/views/modules/favorites/favorites.phtml1
-rw-r--r--resources/views/modules/gedcom_news/list.phtml31
-rw-r--r--resources/views/modules/hourglass-chart/chart.phtml6
-rw-r--r--resources/views/modules/hourglass-chart/children.phtml10
-rw-r--r--resources/views/modules/hourglass-chart/page.phtml17
-rw-r--r--resources/views/modules/interactive-tree/page.phtml6
-rw-r--r--resources/views/modules/lifespans-chart/page.phtml19
-rw-r--r--resources/views/modules/pedigree-chart/chart.phtml6
-rw-r--r--resources/views/modules/pedigree-chart/page.phtml20
-rw-r--r--resources/views/modules/pedigree-map/chart.phtml4
-rw-r--r--resources/views/modules/pedigree-map/page.phtml15
-rw-r--r--resources/views/modules/relationships-chart/page.phtml14
-rw-r--r--resources/views/modules/sitemap/config.phtml7
-rw-r--r--resources/views/modules/sitemap/sitemap-index.xml.phtml3
-rw-r--r--resources/views/modules/statistics-chart/custom.phtml55
-rw-r--r--resources/views/modules/stories/config.phtml9
-rw-r--r--resources/views/modules/stories/edit.phtml3
-rw-r--r--resources/views/modules/stories/tab.phtml7
-rw-r--r--resources/views/modules/timeline-chart/page.phtml58
-rw-r--r--resources/views/modules/user_blog/list.phtml9
-rw-r--r--resources/views/places-page.phtml3
38 files changed, 308 insertions, 246 deletions
diff --git a/resources/js/treeview.js b/resources/js/treeview.js
index b625d43f30..0b2f1b90f7 100644
--- a/resources/js/treeview.js
+++ b/resources/js/treeview.js
@@ -24,7 +24,8 @@ function TreeViewHandler(treeview_instance, ged) {
this.boxWidth = 180; // default family box width
this.boxExpandedWidth = 250; // default expanded family box width
this.cookieDays = 3; // lifetime of preferences memory, in days
- this.ajaxUrl = "index.php?route=module&module=tree&ged=" + encodeURIComponent(ged) + "&instance=" + treeview_instance + "&action=";
+ this.ajaxUrl1 = "index.php?route=/module/tree/";
+ this.ajaxUrl2 = "&ged=" + encodeURIComponent(ged) + "&instance=" + treeview_instance;
this.container = this.treeview.parent(); // Store the container element ("#" + treeview_instance + "_out")
this.auto_box_width = false;
@@ -175,7 +176,7 @@ TreeViewHandler.prototype.updateTree = function (center, button) {
tv.updating = true;
tv.setLoading();
jQuery.ajax({
- url: tv.ajaxUrl + "Persons",
+ url: tv.ajaxUrl1 + "Persons" + tv.ajaxUrl2,
dataType: "json",
data: "q=" + to_load.join(";"),
success: function (ret) {
@@ -310,7 +311,7 @@ TreeViewHandler.prototype.expandBox = function (box, event) {
tv.updating = true;
tv.setLoading();
// perform the Ajax request and load the result in the box
- box.load(tv.ajaxUrl + "Details&pid=" + pid, function () {
+ box.load(tv.ajaxUrl1 + "Details&pid=" + pid + tv.ajaxUrl2, function () {
// If Lightbox module is active, we reinitialize it for the new links
if (typeof CB_Init === "function") {
CB_Init();
diff --git a/resources/views/branches-page.phtml b/resources/views/branches-page.phtml
index a6a58d5f28..e04c92103f 100644
--- a/resources/views/branches-page.phtml
+++ b/resources/views/branches-page.phtml
@@ -1,13 +1,16 @@
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php
+
+use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
+use Fisharebest\Webtrees\I18N;
+
+?>
<h2 class="wt-page-title">
<?= $title ?>
</h2>
-<form method="get" action="<?= e(route('module')) ?>" class="wt-page-options wt-page-options-branches d-print-none">
- <input type="hidden" name="route" value="module">
- <input type="hidden" name="module" value="<?= e($module) ?>">
- <input type="hidden" name="action" value="<?= e($action) ?>">
+<form method="get" action="<?= e(route('module', ['module' => $module, 'action' => $action])) ?>" class="wt-page-options wt-page-options-branches d-print-none">
+ <input type="hidden" name="route" value="<?= e('/module/' . $module . '/' . $action) ?>">
<input type="hidden" name="ged" value="<?= e($tree->name()) ?>">
<div class="form-group row">
diff --git a/resources/views/media-list-page.phtml b/resources/views/media-list-page.phtml
index 9d720bd08e..6a0843106b 100644
--- a/resources/views/media-list-page.phtml
+++ b/resources/views/media-list-page.phtml
@@ -1,19 +1,22 @@
-<?php use Fisharebest\Webtrees\Auth; ?>
-<?php use Fisharebest\Webtrees\Functions\FunctionsEdit; ?>
-<?php use Fisharebest\Webtrees\Functions\FunctionsPrint; ?>
-<?php use Fisharebest\Webtrees\Functions\FunctionsPrintFacts; ?>
-<?php use Fisharebest\Webtrees\GedcomTag; ?>
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php
+
+use Fisharebest\Webtrees\Auth;
+use Fisharebest\Webtrees\Functions\FunctionsEdit;
+use Fisharebest\Webtrees\Functions\FunctionsPrint;
+use Fisharebest\Webtrees\Functions\FunctionsPrintFacts;
+use Fisharebest\Webtrees\GedcomTag;
+use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
+use Fisharebest\Webtrees\I18N;
+
+?>
<h2 class="wt-page-title">
<?= $title ?>
</h2>
-<form method="get" action="<?= e(route('module')) ?>" class="wt-page-options wt-page-options-media-list d-print-none">
+<form method="get" action="<?= e(route('module', ['module' => $module, 'action' => $action])) ?>" class="wt-page-options wt-page-options-media-list d-print-none">
+ <input type="hidden" name="route" value="<?= e('/module/' . $module . '/' . $action) ?>">
<input type="hidden" name="ged" value="<?= e($tree->name()) ?>">
- <input type="hidden" name="route" value="module">
- <input type="hidden" name="module" value="<?= e($module) ?>">
- <input type="hidden" name="action" value="<?= e($action) ?>">
<input type="hidden" name="action2" value="1">
<input type="hidden" name="search" value="yes">
diff --git a/resources/views/modules/ancestors-chart/page.phtml b/resources/views/modules/ancestors-chart/page.phtml
index 5d2bda29a1..26377fc05b 100644
--- a/resources/views/modules/ancestors-chart/page.phtml
+++ b/resources/views/modules/ancestors-chart/page.phtml
@@ -1,5 +1,6 @@
<?php
+use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
use Fisharebest\Webtrees\I18N;
?>
@@ -8,11 +9,8 @@ use Fisharebest\Webtrees\I18N;
<?= $title ?>
</h2>
-<form method="get" action="<?= e(route('module')) ?>" class="wt-page-options wt-page-options-ancestors-chart d-print-none">
- <input type="hidden" name="route" value="module">
- <input type="hidden" name="module" value="<?= e($module_name) ?>">
- <input type="hidden" name="action" value="Chart">
- <input type="hidden" name="ged" value="<?= e($tree->name()) ?>">
+<form method="post" class="wt-page-options wt-page-options-ancestors-chart d-print-none">
+ <?= csrf_field() ?>
<div class="row form-group">
<label class="col-sm-3 col-form-label wt-page-options-label" for="xref">
@@ -38,7 +36,7 @@ use Fisharebest\Webtrees\I18N;
<?= I18N::translate('Layout') ?>
</legend>
<div class="col-sm-9 wt-page-options-value">
- <?= view('components/radios-inline', ['name' => 'chart_style', 'options' => $chart_styles, 'selected' => $chart_style]) ?>
+ <?= view('components/radios-inline', ['name' => 'style', 'options' => $styles, 'selected' => $style]) ?>
</div>
</div>
</fieldset>
diff --git a/resources/views/modules/batch_update/admin.phtml b/resources/views/modules/batch_update/admin.phtml
index 18f55663ed..4f24a6cacb 100644
--- a/resources/views/modules/batch_update/admin.phtml
+++ b/resources/views/modules/batch_update/admin.phtml
@@ -9,10 +9,8 @@ use Fisharebest\Webtrees\View;
<h1><?= $title ?></h1>
-<form method="get" action="<?= e(route('module')) ?>" id="batch-update-form">
- <input type="hidden" name="route" value="module">
- <input type="hidden" name="module" value="batch_update">
- <input type="hidden" name="action" value="Admin">
+<form method="get" action="<?= e(route('module', ['module' => $module, 'action' => 'Admin'])) ?>" id="batch-update-form">
+ <input type="hidden" name="route" value="<?= e('/module/' . $module . '/Chart') ?>">
<input type="hidden" name="xref" value="<?= $curr_xref ?>">
<?= csrf_field() ?>
diff --git a/resources/views/modules/census-assistant.phtml b/resources/views/modules/census-assistant.phtml
index 626cda6af7..0453a2e67e 100644
--- a/resources/views/modules/census-assistant.phtml
+++ b/resources/views/modules/census-assistant.phtml
@@ -1,5 +1,10 @@
-<?php use Fisharebest\Webtrees\I18N; ?>
-<?php use Fisharebest\Webtrees\View; ?>
+<?php
+
+use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
+use Fisharebest\Webtrees\I18N;
+use Fisharebest\Webtrees\View;
+
+?>
<div id="census-assistant-link" hidden>
<a href="#">
diff --git a/resources/views/modules/clippings/download.phtml b/resources/views/modules/clippings/download.phtml
index 44d87339a4..280a227cc3 100644
--- a/resources/views/modules/clippings/download.phtml
+++ b/resources/views/modules/clippings/download.phtml
@@ -1,11 +1,14 @@
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php
+
+use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
+use Fisharebest\Webtrees\I18N;
+
+?>
<h2 class="wt-page-title"><?= $title ?></h2>
-<form method="get" action="<?= e(route('module')) ?>" class="wt-page-options wt-page-options-clippings-download hidden-print">
- <input type="hidden" name="route" value="module">
- <input type="hidden" name="module" value="clippings">
- <input type="hidden" name="action" value="Download">
+<form method="get" action="<?= e(route('module', ['module' => $module, 'action' => 'Download'])) ?>" class="wt-page-options wt-page-options-clippings-download hidden-print">
+ <input type="hidden" name="route" value="<?= e('/module/' . $module . '/Download') ?>">
<input type="hidden" name="ged" value="<?= e($tree->name()) ?>">
<?php if ($is_manager) : ?>
diff --git a/resources/views/modules/clippings/show.phtml b/resources/views/modules/clippings/show.phtml
index f08095ba6f..61e2ec0dd0 100644
--- a/resources/views/modules/clippings/show.phtml
+++ b/resources/views/modules/clippings/show.phtml
@@ -1,4 +1,5 @@
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
+use Fisharebest\Webtrees\I18N; ?>
<h2 class="wt-page-title"><?= $title ?></h2>
diff --git a/resources/views/modules/compact-chart/chart.phtml b/resources/views/modules/compact-chart/chart.phtml
index a92a48d124..5f427378b2 100644
--- a/resources/views/modules/compact-chart/chart.phtml
+++ b/resources/views/modules/compact-chart/chart.phtml
@@ -1,23 +1,23 @@
<table class="text-center w-100 h-100 wt-chart-compact-table" role="presentation">
<tr>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(16)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(16)]) ?>
</td>
<td></td>
<td></td>
<td></td>
<td class="h-100">
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(18)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(18)]) ?>
</td>
<td></td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(24)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(24)]) ?>
</td>
<td></td>
<td></td>
<td></td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(26)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(26)]) ?>
</td>
</tr>
<tr>
@@ -43,35 +43,35 @@
</tr>
<tr>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(8)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(8)]) ?>
</td>
<td>
<?= view('modules/compact-chart/arrow-left', ['module' => $module, 'individual' => $ancestors->get(8)]) ?>
</td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(4)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(4)]) ?>
</td>
<td>
<?= view('modules/compact-chart/arrow-right', ['module' => $module, 'individual' => $ancestors->get(9)]) ?>
</td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(9)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(9)]) ?>
</td>
<td></td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(12)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(12)]) ?>
</td>
<td>
<?= view('modules/compact-chart/arrow-left', ['module' => $module, 'individual' => $ancestors->get(12)]) ?>
</td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(6)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(6)]) ?>
</td>
<td>
<?= view('modules/compact-chart/arrow-right', ['module' => $module, 'individual' => $ancestors->get(13)]) ?>
</td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(13)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(13)]) ?>
</td>
</tr>
<tr>
@@ -97,7 +97,7 @@
</tr>
<tr>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(17)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(17)]) ?>
</td>
<td></td>
<td>
@@ -105,11 +105,11 @@
</td>
<td></td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(19)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(19)]) ?>
</td>
<td></td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(25)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(25)]) ?>
</td>
<td></td>
<td>
@@ -117,7 +117,7 @@
</td>
<td></td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(27)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(27)]) ?>
</td>
</tr>
<tr>
@@ -137,7 +137,7 @@
<td></td>
<td></td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(2)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(2)]) ?>
</td>
<td></td>
<td colspan="3">
@@ -147,7 +147,7 @@
<?= view('modules/compact-chart/arrow-left', ['module' => $module, 'individual' => $ancestors->get(2)]) ?>
</td>
<td class="w-50">
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(1)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(1)]) ?>
</td>
<td class="w-25">
<?= view('modules/compact-chart/arrow-right', ['module' => $module, 'individual' => $ancestors->get(3)]) ?>
@@ -157,7 +157,7 @@
</td>
<td></td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(3)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(3)]) ?>
</td>
<td></td>
<td></td>
@@ -177,7 +177,7 @@
</tr>
<tr>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(20)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(20)]) ?>
</td>
<td></td>
<td>
@@ -185,11 +185,11 @@
</td>
<td></td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(22)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(22)]) ?>
</td>
<td></td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(28)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(28)]) ?>
</td>
<td></td>
<td>
@@ -197,7 +197,7 @@
</td>
<td></td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(30)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(30)]) ?>
</td>
</tr>
<tr>
@@ -223,35 +223,35 @@
</tr>
<tr>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(10)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(10)]) ?>
</td>
<td>
<?= view('modules/compact-chart/arrow-left', ['module' => $module, 'individual' => $ancestors->get(10)]) ?>
</td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(5)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(5)]) ?>
</td>
<td>
<?= view('modules/compact-chart/arrow-right', ['module' => $module, 'individual' => $ancestors->get(11)]) ?>
</td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(11)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(11)]) ?>
</td>
<td></td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(14)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(14)]) ?>
</td>
<td>
<?= view('modules/compact-chart/arrow-left', ['module' => $module, 'individual' => $ancestors->get(14)]) ?>
</td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(7)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(7)]) ?>
</td>
<td>
<?= view('modules/compact-chart/arrow-right', ['module' => $module, 'individual' => $ancestors->get(15)]) ?>
</td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(15)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(15)]) ?>
</td>
</tr>
<tr>
@@ -277,23 +277,23 @@
</tr>
<tr>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(21)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(21)]) ?>
</td>
<td></td>
<td></td>
<td></td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(23)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(23)]) ?>
</td>
<td></td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(29)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(29)]) ?>
</td>
<td></td>
<td></td>
<td></td>
<td>
- <?= view('modules/compact-chart/individual', ['module' => $module, 'individual' => $ancestors->get(31)]) ?>
+ <?= view('modules/compact-chart/individual', ['individual' => $ancestors->get(31)]) ?>
</td>
</tr>
</table>
diff --git a/resources/views/modules/compact-chart/page.phtml b/resources/views/modules/compact-chart/page.phtml
index 47ddb1dc29..f27733bb74 100644
--- a/resources/views/modules/compact-chart/page.phtml
+++ b/resources/views/modules/compact-chart/page.phtml
@@ -1,14 +1,16 @@
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php
+
+use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
+use Fisharebest\Webtrees\I18N;
+
+?>
<h2 class="wt-page-title">
<?= $title ?>
</h2>
-<form method="get" action="<?= e(route('module')) ?>" class="wt-page-options wt-page-options-compact-chart d-print-none">
- <input type="hidden" name="route" value="module">
- <input type="hidden" name="module" value="<?= e($module_name) ?>">
- <input type="hidden" name="action" value="Chart">
- <input type="hidden" name="ged" value="<?= e($individual->tree()->name()) ?>">
+<form method="post" class="wt-page-options wt-page-options-compact-chart d-print-none">
+ <?= csrf_field() ?>
<div class="row form-group">
<label class="col-sm-3 col-form-label wt-page-options-label" for="xref">
diff --git a/resources/views/modules/descendancy/sidebar.phtml b/resources/views/modules/descendancy/sidebar.phtml
index cc670dd661..e07d150de2 100644
--- a/resources/views/modules/descendancy/sidebar.phtml
+++ b/resources/views/modules/descendancy/sidebar.phtml
@@ -1,5 +1,10 @@
-<?php use Fisharebest\Webtrees\I18N; ?>
-<?php use Fisharebest\Webtrees\View; ?>
+<?php
+
+use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
+use Fisharebest\Webtrees\I18N;
+use Fisharebest\Webtrees\View;
+
+?>
<form method="post" action="<?= e(route('module', ['module' => 'descendancy', 'action' => 'Descendants', 'ged' => $tree->name()])) ?>" onsubmit="return false;">
<input type="search" name="sb_desc_name" id="sb_desc_name" placeholder="<?= I18N::translate('Search') ?>">
diff --git a/resources/views/modules/descendancy_chart/page.phtml b/resources/views/modules/descendancy_chart/page.phtml
index 591f681510..e806f92a07 100644
--- a/resources/views/modules/descendancy_chart/page.phtml
+++ b/resources/views/modules/descendancy_chart/page.phtml
@@ -1,14 +1,14 @@
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php
+use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
+use Fisharebest\Webtrees\I18N;
+?>
<h2 class="wt-page-title">
<?= $title ?>
</h2>
-<form method="get" action="<?= e(route('module')) ?>" class="wt-page-options wt-page-options-descendants-chart d-print-none">
- <input type="hidden" name="route" value="module">
- <input type="hidden" name="module" value="<?= e($module_name) ?>">
- <input type="hidden" name="action" value="Chart">
- <input type="hidden" name="ged" value="<?= e($tree->name()) ?>">
+<form method="post" class="wt-page-options wt-page-options-descendants-chart d-print-none">
+ <?= csrf_field() ?>
<div class="row form-group">
<label class="col-sm-3 col-form-label wt-page-options-label" for="xref">
@@ -34,7 +34,7 @@
<?= I18N::translate('Layout') ?>
</legend>
<div class="col-sm-9 wt-page-options-value">
- <?= view('components/radios-inline', ['name' => 'chart_style', 'options' => $chart_styles, 'selected' => $chart_style]) ?>
+ <?= view('components/radios-inline', ['name' => 'style', 'options' => $styles, 'selected' => $style]) ?>
</div>
</div>
</fieldset>
diff --git a/resources/views/modules/family-book-chart/chart.phtml b/resources/views/modules/family-book-chart/chart.phtml
index 36f1dea803..289b47ab8a 100644
--- a/resources/views/modules/family-book-chart/chart.phtml
+++ b/resources/views/modules/family-book-chart/chart.phtml
@@ -9,7 +9,7 @@ use Illuminate\Support\Collection;
* @var int $book_size
* @var int $generations
* @var Individual $individual
- * @var bool $show_spouse
+ * @var bool $spouses
*/
$children = $individual->spouseFamilies()->map(static function (Family $family): Collection {
@@ -24,7 +24,7 @@ $children = $individual->spouseFamilies()->map(static function (Family $family):
<?= view('modules/family-book-chart/children', ['children' => $children, 'generations' => $book_size - 1]) ?>
<div class="align-self-center">
<?= view('chart-box', ['individual' => $individual]) ?>
- <?php if ($show_spouse): ?>
+ <?php if ($spouses): ?>
<?php foreach ($individual->spouseFamilies() as $family): ?>
<?= view('chart-box', ['individual' => $family->spouse($individual)]) ?>
<?php endforeach ?>
@@ -39,6 +39,6 @@ $children = $individual->spouseFamilies()->map(static function (Family $family):
<?php if ($generations > 1): ?>
<?php foreach ($children as $child): ?>
<hr class="wt-family-separator">
- <?= view('modules/family-book-chart/chart', ['individual' => $child, 'generations' => $generations - 1, 'book_size' => $book_size, 'show_spouse' => $show_spouse]) ?>
+ <?= view('modules/family-book-chart/chart', ['individual' => $child, 'generations' => $generations - 1, 'book_size' => $book_size, 'spouses' => $spouses]) ?>
<?php endforeach ?>
<?php endif ?>
diff --git a/resources/views/modules/family-book-chart/page.phtml b/resources/views/modules/family-book-chart/page.phtml
index 8ed9081af5..ce3108a4ca 100644
--- a/resources/views/modules/family-book-chart/page.phtml
+++ b/resources/views/modules/family-book-chart/page.phtml
@@ -1,15 +1,15 @@
-<?php use Fisharebest\Webtrees\Functions\FunctionsEdit; ?>
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php
+use Fisharebest\Webtrees\Functions\FunctionsEdit;
+use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
+use Fisharebest\Webtrees\I18N;
+?>
<h2 class="wt-page-title">
<?= $title ?>
</h2>
-<form method="get" action="<?= e(route('module')) ?>" class="wt-page-options wt-page-options-family-book-chart d-print-none">
- <input type="hidden" name="route" value="module">
- <input type="hidden" name="module" value="<?= e($module_name) ?>">
- <input type="hidden" name="action" value="Chart">
- <input type="hidden" name="ged" value="<?= e($individual->tree()->name()) ?>">
+<form method="post" class="wt-page-options wt-page-options-family-book-chart d-print-none">
+ <?= csrf_field() ?>
<div class="row form-group">
<label class="col-sm-3 col-form-label wt-page-options-label" for="xref">
@@ -44,7 +44,7 @@
<?= I18N::translate('Spouses') ?>
</legend>
<div class="col-sm-9 wt-page-options-value">
- <?= view('components/checkbox', ['label' => I18N::translate('Show spouses'), 'name' => 'show_spouse', 'checked' => $show_spouse]) ?>
+ <?= view('components/checkbox', ['label' => I18N::translate('Show spouses'), 'name' => 'spouses', 'checked' => $spouses]) ?>
</div>
</div>
</fieldset>
diff --git a/resources/views/modules/fanchart/page.phtml b/resources/views/modules/fanchart/page.phtml
index 002df4e066..5f2aa1e0a4 100644
--- a/resources/views/modules/fanchart/page.phtml
+++ b/resources/views/modules/fanchart/page.phtml
@@ -1,15 +1,17 @@
-<?php use Fisharebest\Webtrees\Functions\FunctionsEdit; ?>
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php
+
+use Fisharebest\Webtrees\Functions\FunctionsEdit;
+use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
+use Fisharebest\Webtrees\I18N;
+
+?>
<h2 class="wt-page-title">
<?= $title ?>
</h2>
-<form method="get" action="<?= e(route('module')) ?>" class="wt-page-options wt-page-options-fan-chart d-print-none">
- <input type="hidden" name="route" value="module">
- <input type="hidden" name="module" value="<?= e($module_name) ?>">
- <input type="hidden" name="action" value="Chart">
- <input type="hidden" name="ged" value="<?= e($tree->name()) ?>">
+<form method="post" class="wt-page-options wt-page-options-fan-chart d-print-none">
+ <?= csrf_field() ?>
<div class="row form-group">
<label class="col-sm-3 col-form-label wt-page-options-label" for="xref">
@@ -21,11 +23,11 @@
</div>
<div class="row form-group">
- <label class="col-sm-3 col-form-label wt-page-options-label">
+ <label class="col-sm-3 col-form-label wt-page-options-label" for="style">
<?= I18N::translate('Layout') ?>
</label>
<div class="col-sm-9 wt-page-options-value">
- <?= view('components/select', ['name' => 'chart_style', 'selected' => $chart_style, 'options' => $chart_styles]) ?>
+ <?= view('components/select', ['name' => 'style', 'selected' => $style, 'options' => $styles]) ?>
</div>
</div>
@@ -39,12 +41,12 @@
</div>
<div class="row form-group">
- <label class="col-sm-3 col-form-label wt-page-options-label" for="fan_width">
+ <label class="col-sm-3 col-form-label wt-page-options-label" for="width">
<?= I18N::translate('Zoom') ?>
</label>
<div class="col-sm-9 wt-page-options-value">
<div class="input-group">
- <input class="form-control" id="fan_width" max="<?= $maximum_width ?>" min="<?= $minimum_width ?>" name="fan_width" required type="number" value="<?= $fan_width ?>">
+ <input class="form-control" id="width" max="<?= $maximum_width ?>" min="<?= $minimum_width ?>" name="width" required type="number" value="<?= $width ?>">
<div class="input-group-append">
<span class="input-group-text">
%
diff --git a/resources/views/modules/faq/config.phtml b/resources/views/modules/faq/config.phtml
index c00c373a58..d6fe977691 100644
--- a/resources/views/modules/faq/config.phtml
+++ b/resources/views/modules/faq/config.phtml
@@ -1,4 +1,9 @@
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php
+
+use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
+use Fisharebest\Webtrees\I18N;
+
+?>
<?= view('components/breadcrumbs', ['links' => [route('admin-control-panel') => I18N::translate('Control panel'), route('modules') => I18N::translate('Modules'), $title]]) ?>
@@ -11,10 +16,8 @@
</p>
<p>
-<form method="get" action="<?= e(route('module')) ?>" class="form form-inline">
- <input type="hidden" name="route" value="module">
- <input type="hidden" name="module" value="faq">
- <input type="hidden" name="action" value="Admin">
+<form method="get" action="<?= e(route('module', ['module' => $module, 'action' => 'Admin'])) ?>" class="form form-inline">
+ <input type="hidden" name="route" value="<?= e('/module/' . $module . '/Admin') ?>">
<label for="ged" class="sr-only">
<?= I18N::translate('Family tree') ?>
</label>
diff --git a/resources/views/modules/faq/edit.phtml b/resources/views/modules/faq/edit.phtml
index c61e94dd5e..4fa021307d 100644
--- a/resources/views/modules/faq/edit.phtml
+++ b/resources/views/modules/faq/edit.phtml
@@ -1,5 +1,10 @@
-<?php use Fisharebest\Webtrees\Functions\FunctionsEdit; ?>
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php
+
+use Fisharebest\Webtrees\Functions\FunctionsEdit;
+use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
+use Fisharebest\Webtrees\I18N;
+
+?>
<?= view('components/breadcrumbs', ['links' => [route('admin-control-panel') => I18N::translate('Control panel'), route('modules') => I18N::translate('Modules'), route('module', ['module' => 'faq', 'action' => 'Admin', 'ged' => $tree->name()]) => I18N::translate('Frequently asked questions'), $title]]) ?>
diff --git a/resources/views/modules/favorites/favorites.phtml b/resources/views/modules/favorites/favorites.phtml
index a8b1dc3829..ba2958b0a5 100644
--- a/resources/views/modules/favorites/favorites.phtml
+++ b/resources/views/modules/favorites/favorites.phtml
@@ -1,5 +1,6 @@
<?php
+use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Individual;
use Illuminate\Support\Collection;
diff --git a/resources/views/modules/gedcom_news/list.phtml b/resources/views/modules/gedcom_news/list.phtml
index 36e5f0d5ca..01ec3560d2 100644
--- a/resources/views/modules/gedcom_news/list.phtml
+++ b/resources/views/modules/gedcom_news/list.phtml
@@ -1,17 +1,24 @@
-<?php use Fisharebest\Webtrees\Auth; ?>
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php
+
+use Fisharebest\Webtrees\Auth;
+use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
+use Fisharebest\Webtrees\I18N;
+
+?>
<?php if (empty($articles)) : ?>
<?= I18N::translate('No news articles have been submitted.') ?>
<?php endif ?>
-<?php foreach ($articles as $n => $article) : ?>
- <?php if ($n === 5 && count($articles) > 5) : ?>
- <p>
- <a class="btn btn-link" data-toggle="collapse" data-target="#more-news-<?= e($block_id) ?>" role="button" aria-expanded="false" aria-controls="more-news-<?= e($block_id) ?>"><?= I18N::translate('More news articles') ?>
- </a>
- </p>
- <div class="collapse" id="more-news-<?= e($block_id) ?>">
+<?php foreach ($articles
+
+ as $n => $article) : ?>
+<?php if ($n === 5 && count($articles) > 5) : ?>
+ <p>
+ <a class="btn btn-link" data-toggle="collapse" data-target="#more-news-<?= e($block_id) ?>" role="button" aria-expanded="false" aria-controls="more-news-<?= e($block_id) ?>"><?= I18N::translate('More news articles') ?>
+ </a>
+ </p>
+<div class="collapse" id="more-news-<?= e($block_id) ?>">
<?php endif ?>
<div class="news_box">
@@ -33,10 +40,10 @@
</form>
<?php endif ?>
</div>
-<?php endforeach ?>
+ <?php endforeach ?>
-<?php if (count($articles) > 5) : ?>
- </div>
+ <?php if (count($articles) > 5) : ?>
+</div>
<?php endif ?>
<?php if (Auth::isManager($tree)) : ?>
diff --git a/resources/views/modules/hourglass-chart/chart.phtml b/resources/views/modules/hourglass-chart/chart.phtml
index 48e9e2be03..c68c7be7a5 100644
--- a/resources/views/modules/hourglass-chart/chart.phtml
+++ b/resources/views/modules/hourglass-chart/chart.phtml
@@ -8,7 +8,7 @@ use Illuminate\Support\Collection;
/**
* @var int $generations
* @var Individual $individual
- * @var bool $show_spouse
+ * @var bool $spouses
*/
$children = $individual->spouseFamilies()->map(static function (Family $family): Collection {
@@ -18,10 +18,10 @@ $children = $individual->spouseFamilies()->map(static function (Family $family):
?>
<div class="d-flex wt-chart-hourglass">
- <?= view('modules/hourglass-chart/children', ['children' => $children, 'generations' => $generations - 1, 'show_spouse' => $show_spouse]) ?>
+ <?= view('modules/hourglass-chart/children', ['children' => $children, 'generations' => $generations - 1, 'spouses' => $spouses]) ?>
<div class="align-self-center">
<?= view('chart-box', ['individual' => $individual]) ?>
- <?php if ($show_spouse): ?>
+ <?php if ($spouses): ?>
<?php foreach ($individual->spouseFamilies() as $family): ?>
<?= view('chart-box', ['individual' => $family->spouse($individual)]) ?>
<?php endforeach ?>
diff --git a/resources/views/modules/hourglass-chart/children.phtml b/resources/views/modules/hourglass-chart/children.phtml
index 510c098177..59679f592c 100644
--- a/resources/views/modules/hourglass-chart/children.phtml
+++ b/resources/views/modules/hourglass-chart/children.phtml
@@ -6,7 +6,7 @@ use Illuminate\Support\Collection;
/**
* @var Collection $children
* @var int $generations
- * @var bool $show_spouse
+ * @var bool $spouses
*/
?>
@@ -16,21 +16,21 @@ use Illuminate\Support\Collection;
<div class="d-flex justify-content-end">
<?php if ($grandchildren->isNotEmpty()): ?>
<?php if ($generations > 1): ?>
- <?= view('modules/hourglass-chart/children', ['children' => $grandchildren, 'generations' => $generations - 1, 'show_spouse' => $show_spouse]) ?>
+ <?= view('modules/hourglass-chart/children', ['children' => $grandchildren, 'generations' => $generations - 1, 'spouses' => $spouses]) ?>
<?php else: ?>
<div class="d-flex align-self-center">
- <div class="hourglass-arrow" data-xref="<?= route('module', ['module' => 'hourglass_chart', 'action' => 'Descendants', 'xref' => $child->xref(), 'ged' => $child->tree()->name(), 'show_spouse' => $show_spouse]) ?>">
+ <div class="hourglass-arrow" data-xref="<?= route('module', ['module' => 'hourglass_chart', 'action' => 'Descendants', 'xref' => $child->xref(), 'ged' => $child->tree()->name(), 'spouses' => $spouses]) ?>">
<?= view('icons/arrow-left') ?>
</div>
</div>
<?php endif ?>
<?php endif ?>
<div class="align-self-center">
- <?php if ($show_spouse): ?>
+ <?php if ($spouses): ?>
<div>&nbsp;</div>
<?php endif ?>
<?= view('chart-box', ['individual' => $child]) ?>
- <?php if ($show_spouse): ?>
+ <?php if ($spouses): ?>
<?php foreach ($child->spouseFamilies() as $spouse_family): ?>
<?= view('chart-box', ['individual' => $spouse_family->spouse($child)]) ?>
<?php endforeach ?>
diff --git a/resources/views/modules/hourglass-chart/page.phtml b/resources/views/modules/hourglass-chart/page.phtml
index 3a428d3f64..3993c703f3 100644
--- a/resources/views/modules/hourglass-chart/page.phtml
+++ b/resources/views/modules/hourglass-chart/page.phtml
@@ -1,15 +1,16 @@
-<?php use Fisharebest\Webtrees\Functions\FunctionsEdit; ?>
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php
+
+use Fisharebest\Webtrees\Functions\FunctionsEdit;
+use Fisharebest\Webtrees\I18N;
+
+?>
<h2 class="wt-page-title">
<?= $title ?>
</h2>
-<form method="get" action="<?= e(route('module')) ?>" class="wt-page-options wt-page-options-hourglass-chart d-print-none">
- <input type="hidden" name="route" value="module">
- <input type="hidden" name="module" value="<?= e($module_name) ?>">
- <input type="hidden" name="action" value="Chart">
- <input type="hidden" name="ged" value="<?= e($individual->tree()->name()) ?>">
+<form method="post" class="wt-page-options wt-page-options-hourglass-chart d-print-none">
+ <?= csrf_field() ?>
<div class="row form-group">
<label class="col-sm-3 col-form-label wt-page-options-label" for="xref">
@@ -35,7 +36,7 @@
<?= I18N::translate('Layout') ?>
</legend>
<div class="col-sm-9 wt-page-options-value">
- <?= view('components/checkbox', ['label' => I18N::translate('Show spouses'), 'name' => 'show_spouse', 'checked' => $show_spouse]) ?>
+ <?= view('components/checkbox', ['label' => I18N::translate('Show spouses'), 'name' => 'spouses', 'checked' => $spouses]) ?>
</div>
</div>
</fieldset>
diff --git a/resources/views/modules/interactive-tree/page.phtml b/resources/views/modules/interactive-tree/page.phtml
index 7698f777f9..ed4856d6b1 100644
--- a/resources/views/modules/interactive-tree/page.phtml
+++ b/resources/views/modules/interactive-tree/page.phtml
@@ -9,10 +9,8 @@ use Fisharebest\Webtrees\View;
<?= $title ?>
</h2>
-<form method="get" action="<?= e(route('module')) ?>" class="wt-page-options wt-page-options-compact-chart d-print-none">
- <input type="hidden" name="route" value="module">
- <input type="hidden" name="module" value="tree">
- <input type="hidden" name="action" value="Chart">
+<form method="get" action="<?= e(route('module', ['module' => $module, 'action' => 'Chart'])) ?>" class="wt-page-options wt-page-options-compact-chart d-print-none">
+ <input type="hidden" name="route" value="<?= e('/module/' . $module . '/Chart') ?>">
<input type="hidden" name="ged" value="<?= e($tree->name()) ?>">
<div class="row form-group">
diff --git a/resources/views/modules/lifespans-chart/page.phtml b/resources/views/modules/lifespans-chart/page.phtml
index 54560fdb7f..98554881ea 100644
--- a/resources/views/modules/lifespans-chart/page.phtml
+++ b/resources/views/modules/lifespans-chart/page.phtml
@@ -1,14 +1,15 @@
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php
+
+use Fisharebest\Webtrees\I18N;
+
+?>
<h2 class="wt-page-title">
<?= $title ?>
</h2>
-<form method="get" action="<?= e(route('module')) ?>" class="wt-page-options wt-page-options-lifespans-chart d-print-none">
- <input type="hidden" name="route" value="module">
- <input type="hidden" name="module" value="<?= e($module_name) ?>">
- <input type="hidden" name="action" value="Chart">
- <input type="hidden" name="ged" value="<?= e($tree->name()) ?>">
+<form method="post" class="wt-page-options wt-page-options-lifespans-chart d-print-none">
+ <?= csrf_field() ?>
<?php foreach ($xrefs as $xref) : ?>
<input name="xrefs[]" type="hidden" value="<?= e($xref) ?>">
@@ -61,10 +62,12 @@
<div class="col-form-label col-sm-3 wt-page-options-label"></div>
<div class="col-sm-9 wt-page-options-value">
<button type="submit" class="btn btn-primary" type="submit">
- <?= /* I18N: A button label. */ I18N::translate('add') ?>
+ <?= /* I18N: A button label. */
+ I18N::translate('add') ?>
</button>
<a class="btn btn-secondary" href="<?= e($reset_url) ?>">
- <?= /* I18N: A button label. */ I18N::translate('reset') ?>
+ <?= /* I18N: A button label. */
+ I18N::translate('reset') ?>
</a>
</div>
</div>
diff --git a/resources/views/modules/pedigree-chart/chart.phtml b/resources/views/modules/pedigree-chart/chart.phtml
index 7df9160b78..b297ca79af 100644
--- a/resources/views/modules/pedigree-chart/chart.phtml
+++ b/resources/views/modules/pedigree-chart/chart.phtml
@@ -7,10 +7,10 @@ use Illuminate\Support\Collection;
* @var Collection|Individual[] $ancestors
* @var int $generations
* @var Collection|string[] $links
- * @var string $orientation
+ * @var string $style
*/
?>
-<div class="wt-chart-pedigree-<?= e($orientation) ?>">
- <?= view('modules/pedigree-chart/chart-' . $orientation, ['ancestors' => $ancestors, 'sosa' => 1, 'generation' => 1, 'generations' => $generations, 'links' => $links]) ?>
+<div class="wt-chart-pedigree-<?= e($style) ?>">
+ <?= view('modules/pedigree-chart/chart-' . $style, ['ancestors' => $ancestors, 'sosa' => 1, 'generation' => 1, 'generations' => $generations, 'links' => $links]) ?>
</div>
diff --git a/resources/views/modules/pedigree-chart/page.phtml b/resources/views/modules/pedigree-chart/page.phtml
index 954eae964c..8c213381aa 100644
--- a/resources/views/modules/pedigree-chart/page.phtml
+++ b/resources/views/modules/pedigree-chart/page.phtml
@@ -1,14 +1,15 @@
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php
+
+use Fisharebest\Webtrees\I18N;
+
+?>
<h2 class="wt-page-title">
<?= $title ?>
</h2>
-<form method="get" action="<?= e(route('module')) ?>" class="wt-page-options wt-page-options-pedigree-chart d-print-none">
- <input type="hidden" name="route" value="module">
- <input type="hidden" name="module" value="<?= e($module_name) ?>">
- <input type="hidden" name="action" value="Chart">
- <input type="hidden" name="ged" value="<?= e($tree->name()) ?>">
+<form method="post" class="wt-page-options wt-page-options-pedigree-chart d-print-none">
+ <?= csrf_field() ?>
<div class="row form-group">
<label class="col-sm-3 col-form-label wt-page-options-label" for="xref">
@@ -29,18 +30,19 @@
</div>
<div class="row form-group">
- <label class="col-sm-3 col-form-label wt-page-options-label" for="orientation">
+ <label class="col-sm-3 col-form-label wt-page-options-label" for="style">
<?= I18N::translate('Layout') ?>
</label>
<div class="col-sm-9 wt-page-options-value">
- <?= view('components/radios-inline', ['name' => 'orientation', 'options' => ['left' => view('icons/pedigree-left') . I18N::translate('left'), 'right' => view('icons/pedigree-right') . I18N::translate('right'), 'up' => view('icons/pedigree-up') . I18N::translate('up'), 'down' => view('icons/pedigree-down') . I18N::translate('down'), ], 'selected' => $orientation]) ?>
+ <?= view('components/radios-inline', ['name' => 'style', 'options' => ['left' => view('icons/pedigree-left') . I18N::translate('left'), 'right' => view('icons/pedigree-right') . I18N::translate('right'), 'up' => view('icons/pedigree-up') . I18N::translate('up'), 'down' => view('icons/pedigree-down') . I18N::translate('down'),], 'selected' => $style]) ?>
</div>
</div>
<div class="row form-group">
<div class="col-sm-3 wt-page-options-label"></div>
<div class="col-sm-9 wt-page-options-value">
- <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>">
+ <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */
+ I18N::translate('view') ?>">
</div>
</div>
</form>
diff --git a/resources/views/modules/pedigree-map/chart.phtml b/resources/views/modules/pedigree-map/chart.phtml
index 3868e4eee8..a3029a676d 100644
--- a/resources/views/modules/pedigree-map/chart.phtml
+++ b/resources/views/modules/pedigree-map/chart.phtml
@@ -127,7 +127,7 @@
reference: reference,
type: mapType,
generations: Generations,
- ged: <?= json_encode($tree->name()) ?>
+ ged: <?= json_encode($individual->tree()->name()) ?>
})
.done(function (data, textStatus, jqXHR) {
if (jqXHR.status === 200 && data.features.length === 1) {
@@ -264,6 +264,6 @@
};
})();
- WT_OSM.drawMap(<?= json_encode($ref) ?>, <?= json_encode($type) ?>, <?= json_encode($generations ?? null) ?>);
+ WT_OSM.drawMap(<?= json_encode($individual->xref()) ?>, <?= json_encode($type) ?>, <?= json_encode($generations ?? null) ?>);
</script>
<?php View::endpush() ?>
diff --git a/resources/views/modules/pedigree-map/page.phtml b/resources/views/modules/pedigree-map/page.phtml
index 45930237bd..e664c46645 100644
--- a/resources/views/modules/pedigree-map/page.phtml
+++ b/resources/views/modules/pedigree-map/page.phtml
@@ -1,13 +1,14 @@
-<?php use Fisharebest\Webtrees\I18N; ?>
-<?php use Fisharebest\Webtrees\Functions\FunctionsEdit; ?>
+<?php
+
+use Fisharebest\Webtrees\Functions\FunctionsEdit;
+use Fisharebest\Webtrees\I18N;
+
+?>
<h2 class="wt-page-title"><?= $title ?></h2>
-<form method="get" action="<?= e(route('module')) ?>" class="wt-page-options wt-page-options-pedigreemap-chart d-print-none">
- <input type="hidden" name="route" value="module">
- <input type="hidden" name="module" value="<?= e($module_name) ?>">
- <input type="hidden" name="action" value="PedigreeMap">
- <input type="hidden" name="ged" value="<?= e($tree->name()) ?>">
+<form method="post" class="wt-page-options wt-page-options-pedigreemap-chart d-print-none">
+ <?= csrf_field() ?>
<div class="form-group row">
<label class="col-sm-3 col-form-label wt-page-options-label" for="xref">
diff --git a/resources/views/modules/relationships-chart/page.phtml b/resources/views/modules/relationships-chart/page.phtml
index e0fb662ad2..cb04e3be88 100644
--- a/resources/views/modules/relationships-chart/page.phtml
+++ b/resources/views/modules/relationships-chart/page.phtml
@@ -1,15 +1,15 @@
-<?php use Fisharebest\Webtrees\I18N; ?>
-<?php use Fisharebest\Webtrees\View; ?>
+<?php
+use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
+use Fisharebest\Webtrees\I18N;
+use Fisharebest\Webtrees\View;
+?>
<h2 class="wt-page-title">
<?= $title ?>
</h2>
-<form method="get" action="<?= e(route('module')) ?>" class="wt-page-options wt-page-options-relationships-chart d-print-none">
- <input type="hidden" name="route" value="module">
- <input type="hidden" name="module" value="<?= e($module_name) ?>">
- <input type="hidden" name="action" value="Chart">
- <input type="hidden" name="ged" value="<?= e($tree->name()) ?>">
+<form method="post" class="wt-page-options wt-page-options-relationships-chart d-print-none">
+ <?= csrf_field() ?>
<div class="row form-group">
<label class="col-sm-3 col-form-label wt-page-options-label" for="xref">
diff --git a/resources/views/modules/sitemap/config.phtml b/resources/views/modules/sitemap/config.phtml
index c06be760dd..0677ac2bb7 100644
--- a/resources/views/modules/sitemap/config.phtml
+++ b/resources/views/modules/sitemap/config.phtml
@@ -1,4 +1,9 @@
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php
+
+use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
+use Fisharebest\Webtrees\I18N;
+
+?>
<?= view('components/breadcrumbs', ['links' => [route('admin-control-panel') => I18N::translate('Control panel'), route('modules') => I18N::translate('Modules'), $title]]) ?>
diff --git a/resources/views/modules/sitemap/sitemap-index.xml.phtml b/resources/views/modules/sitemap/sitemap-index.xml.phtml
index bc3bc5f77f..d5456fa659 100644
--- a/resources/views/modules/sitemap/sitemap-index.xml.phtml
+++ b/resources/views/modules/sitemap/sitemap-index.xml.phtml
@@ -1,3 +1,6 @@
+<?php
+ use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
+?>
<<?php /* Beware short open tags in PHP <8.0 */ ?>?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
diff --git a/resources/views/modules/statistics-chart/custom.phtml b/resources/views/modules/statistics-chart/custom.phtml
index c2c039ca93..3d01411975 100644
--- a/resources/views/modules/statistics-chart/custom.phtml
+++ b/resources/views/modules/statistics-chart/custom.phtml
@@ -10,10 +10,8 @@ use Fisharebest\Webtrees\View;
<?= I18N::translate('Create your own chart') ?>
</h4>
- <form method="get" action="<?= e(route('module')) ?>" action="index.php" id="own-stats-form" class="wt-page-options wt-page-options-statistics">
- <input type="hidden" name="route" value="module">
- <input type="hidden" name="module" value="<?= e($module->name()) ?>">
- <input type="hidden" name="action" value="CustomChart">
+ <form method="get" action="<?= e(route('module', ['module' => $module->name(), 'action' => 'CustomChart'])) ?>" id="own-stats-form" class="wt-page-options wt-page-options-statistics">
+ <input type="hidden" name="route" value="<?= e('/module/' . $module->name() . '/Custom//§Chart') ?>">
<input type="hidden" name="ged" value="<?= e($tree->name()) ?>">
<div class="form-group row">
<div class="col-sm-2 wt-page-options-label">
@@ -24,37 +22,43 @@ use Fisharebest\Webtrees\View;
<fieldset>
<legend><?= I18N::translate('Individual') ?></legend>
- <?= view('components/radios', ['name' => 'x-as', 'selected' => $module::X_AXIS_BIRTH_MONTH, 'options' => [
- $module::X_AXIS_BIRTH_MONTH => I18N::translate('Month of birth'),
- $module::X_AXIS_DEATH_MONTH => I18N::translate('Month of death'),
- $module::X_AXIS_FIRST_CHILD_MONTH => I18N::translate('Month of birth of first child in a relation'),
- $module::X_AXIS_AGE_AT_DEATH => I18N::translate('Average age at death'),
- $module::X_AXIS_AGE_AT_MARRIAGE => I18N::translate('Age in year of marriage'),
- $module::X_AXIS_AGE_AT_FIRST_MARRIAGE => I18N::translate('Age in year of first marriage'),
+ <?= view('components/radios', [
+ 'name' => 'x-as', 'selected' => $module::X_AXIS_BIRTH_MONTH, 'options' => [
+ $module::X_AXIS_BIRTH_MONTH => I18N::translate('Month of birth'),
+ $module::X_AXIS_DEATH_MONTH => I18N::translate('Month of death'),
+ $module::X_AXIS_FIRST_CHILD_MONTH => I18N::translate('Month of birth of first child in a relation'),
+ $module::X_AXIS_AGE_AT_DEATH => I18N::translate('Average age at death'),
+ $module::X_AXIS_AGE_AT_MARRIAGE => I18N::translate('Age in year of marriage'),
+ $module::X_AXIS_AGE_AT_FIRST_MARRIAGE => I18N::translate('Age in year of first marriage'),
- ]]) ?>
+ ],
+ ]) ?>
</fieldset>
<fieldset>
<legend><?= I18N::translate('Family') ?></legend>
- <?= view('components/radios', ['name' => 'x-as', 'selected' => $module::X_AXIS_BIRTH_MONTH, 'options' => [
- $module::X_AXIS_MARRIAGE_MONTH => I18N::translate('Month of marriage'),
- $module::X_AXIS_FIRST_MARRIAGE_MONTH => I18N::translate('Month of first marriage'),
- $module::X_AXIS_NUMBER_OF_CHILDREN => I18N::translate('Number of children'),
+ <?= view('components/radios', [
+ 'name' => 'x-as', 'selected' => $module::X_AXIS_BIRTH_MONTH, 'options' => [
+ $module::X_AXIS_MARRIAGE_MONTH => I18N::translate('Month of marriage'),
+ $module::X_AXIS_FIRST_MARRIAGE_MONTH => I18N::translate('Month of first marriage'),
+ $module::X_AXIS_NUMBER_OF_CHILDREN => I18N::translate('Number of children'),
- ]]) ?>
+ ],
+ ]) ?>
</fieldset>
<fieldset>
<legend><?= I18N::translate('Map') ?></legend>
- <?= view('components/radios', ['name' => 'x-as', 'selected' => $module::X_AXIS_BIRTH_MONTH, 'options' => [
- $module::X_AXIS_INDIVIDUAL_MAP => I18N::translate('Individuals'),
- $module::X_AXIS_BIRTH_MAP => I18N::translate('Births'),
- $module::X_AXIS_MARRIAGE_MAP => I18N::translate('Marriages'),
- $module::X_AXIS_DEATH_MAP => I18N::translate('Deaths'),
- ]]) ?>
+ <?= view('components/radios', [
+ 'name' => 'x-as', 'selected' => $module::X_AXIS_BIRTH_MONTH, 'options' => [
+ $module::X_AXIS_INDIVIDUAL_MAP => I18N::translate('Individuals'),
+ $module::X_AXIS_BIRTH_MAP => I18N::translate('Births'),
+ $module::X_AXIS_MARRIAGE_MAP => I18N::translate('Marriages'),
+ $module::X_AXIS_DEATH_MAP => I18N::translate('Deaths'),
+ ],
+ ]) ?>
</fieldset>
</div>
@@ -281,7 +285,7 @@ use Fisharebest\Webtrees\View;
return false;
}
- $("[name='x-as']").change(function() {
+ $("[name='x-as']").change(function () {
var x_axis = document.querySelector("[name='x-as']:checked").value;
switch (x_axis) {
@@ -324,7 +328,8 @@ use Fisharebest\Webtrees\View;
case "<?= e($module::X_AXIS_BIRTH_MAP) ?>":
case "<?= e($module::X_AXIS_MARRIAGE_MAP) ?>":
case "<?= e($module::X_AXIS_DEATH_MAP) ?>":
- statusHide("x_years"); statusShow("map_opt");
+ statusHide("x_years");
+ statusShow("map_opt");
statusHide("chart_type");
statusHide("surname_opt");
break;
diff --git a/resources/views/modules/stories/config.phtml b/resources/views/modules/stories/config.phtml
index 7e5180565b..4248950c7a 100644
--- a/resources/views/modules/stories/config.phtml
+++ b/resources/views/modules/stories/config.phtml
@@ -1,13 +1,12 @@
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
+use Fisharebest\Webtrees\I18N; ?>
<?= view('components/breadcrumbs', ['links' => [route('admin-control-panel') => I18N::translate('Control panel'), route('modules') => I18N::translate('Modules'), $title]]) ?>
<h1><?= $title ?></h1>
-<form method="get" action="<?= e(route('module')) ?>" class="form-inline mb-4">
- <input type="hidden" name="route" value="module">
- <input type="hidden" name="module" value="stories">
- <input type="hidden" name="action" value="Admin">
+<form method="get" action="<?= e(route('module', ['module' => $module->name(), 'action' => 'Admin'])) ?>" class="form-inline mb-4">
+ <input type="hidden" name="route" value="<?= e('/module/' . $module->name() . '/Admin') ?>">
<label for="ged" class="sr-only">
<?= I18N::translate('Family tree') ?>
diff --git a/resources/views/modules/stories/edit.phtml b/resources/views/modules/stories/edit.phtml
index 34018187cf..f091afad9b 100644
--- a/resources/views/modules/stories/edit.phtml
+++ b/resources/views/modules/stories/edit.phtml
@@ -1,5 +1,6 @@
<?php use Fisharebest\Webtrees\Functions\FunctionsEdit; ?>
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
+use Fisharebest\Webtrees\I18N; ?>
<?= view('components/breadcrumbs', ['links' => [route('admin-control-panel') => I18N::translate('Control panel'), route('modules') => I18N::translate('Modules'), route('module', ['module' => 'stories', 'action' => 'Admin', 'ged' => $tree->name()]) => I18N::translate('Stories'), $title]]) ?>
diff --git a/resources/views/modules/stories/tab.phtml b/resources/views/modules/stories/tab.phtml
index 559d2e0bc3..e21a8b62c1 100644
--- a/resources/views/modules/stories/tab.phtml
+++ b/resources/views/modules/stories/tab.phtml
@@ -1,4 +1,9 @@
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php
+
+use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
+use Fisharebest\Webtrees\I18N;
+
+?>
<div class="wt-tab-stories py-4">
<?php foreach ($stories as $story) : ?>
diff --git a/resources/views/modules/timeline-chart/page.phtml b/resources/views/modules/timeline-chart/page.phtml
index e434f885f0..e69bfc232e 100644
--- a/resources/views/modules/timeline-chart/page.phtml
+++ b/resources/views/modules/timeline-chart/page.phtml
@@ -1,26 +1,20 @@
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php use Fisharebest\Webtrees\I18N;
+
+?>
<h2 class="wt-page-title">
<?= $title ?>
</h2>
-<form method="get" action="<?= e(route('module')) ?>" class="wt-page-options wt-page-options-timeline-chart d-print-none">
- <input type="hidden" name="route" value="module">
- <input type="hidden" name="module" value="<?= e($module_name) ?>">
- <input type="hidden" name="action" value="Chart">
- <input type="hidden" name="ged" value="<?= e($tree->name()) ?>">
- <input type="hidden" name="scale" value="<?= e($scale) ?>">
-
- <?php foreach ($individuals as $individual) : ?>
- <input name="xrefs[]" type="hidden" value="<?= e($individual->xref()) ?>">
- <?php endforeach ?>
+<form method="post" class="wt-page-options wt-page-options-timeline-chart d-print-none">
+ <?= csrf_field() ?>
<div class="row form-group">
<label class="col-sm-3 col-form-label wt-page-options-label" for="xref-add">
<?= I18N::translate('Individual') ?>
</label>
<div class="col-sm-9 wt-page-options-value">
- <?= view('components/select-individual', ['name' => 'xrefs[]', 'id' => 'xref-add', 'tree' => $tree]) ?>
+ <?= view('components/select-individual', ['name' => 'xref-add', 'id' => 'xref-add', 'tree' => $tree]) ?>
</div>
</div>
@@ -30,7 +24,8 @@
<input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */
I18N::translate('add') ?>">
<a class="btn btn-secondary" href="<?= e($reset_url) ?>">
- <?= /* I18N: A button label. */ I18N::translate('reset') ?>
+ <?= /* I18N: A button label. */
+ I18N::translate('reset') ?>
</a>
</div>
</div>
@@ -50,26 +45,27 @@
<div class="row my-4">
<?php foreach ($individuals as $n => $individual) : ?>
- <div class="col-md-6 col-lg-4 col-xl-3 person<?= $n % 6 ?>">
- <?= view('icons/sex-' . $individual->sex()) ?>
- <a href="<?= e($individual->url()) ?>">
- <?= $individual->fullName() ?>
- <?php if ($individual->alternateName() !== '') : ?>
+ <div class="col-md-6 col-lg-4 col-xl-3 person<?= $n % 6 ?>">
+ <?= view('icons/sex-' . $individual->sex()) ?>
+ <a href="<?= e($individual->url()) ?>">
+ <?= $individual->fullName() ?>
+ <?php if ($individual->alternateName() !== '') : ?>
+ <br>
+ <?= $individual->alternateName() ?>
+ <?php endif ?>
+ </a>
+ <a href="<?= e($remove_urls[$individual->xref()]) ?>">
+ <?= I18N::translate('Remove individual') ?>
+ </a>
+ <?php if ($individual->getBirthDate()->isOK()) : ?>
<br>
- <?= $individual->alternateName() ?>
+ <label>
+ <input type="checkbox" name="agebar<?= $n ?>" value="ON" onclick="$('#agebox<?= $n ?>').toggle();">
+ <?= /* I18N: an age indicator, which can be dragged around the screen */
+ I18N::translate('Show an age cursor') ?>
+ </label>
<?php endif ?>
- </a>
- <a href="<?= e($remove_urls[$individual->xref()]) ?>">
- <?= I18N::translate('Remove individual') ?>
- </a>
- <?php if ($individual->getBirthDate()->isOK()) : ?>
- <br>
- <label>
- <input type="checkbox" name="agebar<?= $n ?>" value="ON" onclick="$('#agebox<?= $n ?>').toggle();">
- <?= /* I18N: an age indicator, which can be dragged around the screen */ I18N::translate('Show an age cursor') ?>
- </label>
- <?php endif ?>
- </div>
+ </div>
<?php endforeach ?>
</div>
diff --git a/resources/views/modules/user_blog/list.phtml b/resources/views/modules/user_blog/list.phtml
index aa5419164f..73595e4b89 100644
--- a/resources/views/modules/user_blog/list.phtml
+++ b/resources/views/modules/user_blog/list.phtml
@@ -1,5 +1,10 @@
-<?php use Fisharebest\Webtrees\Auth; ?>
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php
+
+use Fisharebest\Webtrees\Auth;
+use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
+use Fisharebest\Webtrees\I18N;
+
+?>
<?php if (empty($articles)) : ?>
<?= I18N::translate('No news articles have been submitted.') ?>
diff --git a/resources/views/places-page.phtml b/resources/views/places-page.phtml
index 2e01062394..0cbda910b4 100644
--- a/resources/views/places-page.phtml
+++ b/resources/views/places-page.phtml
@@ -1,4 +1,5 @@
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
+use Fisharebest\Webtrees\I18N; ?>
<div id="place-hierarchy">
<div class="container">