Form:Location: Difference between revisions
From Seven Sages of Rome
No edit summary |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
{{{for template|Location}}} | {{{for template|Location}}} | ||
{| class="formtable" | {| class="formtable" | ||
! Display Title: {{#info: Title used for display only}} | |||
| {{{field|Has Display Title|input type=text}}} | |||
|- | |||
! Coordinates: {{#info:Coordinates of the location}} | ! Coordinates: {{#info:Coordinates of the location}} | ||
| {{{field|Has Coordinates|input type=leaflet}}} | | {{{field|Has Coordinates|input type=leaflet}}} | ||
Line 26: | Line 29: | ||
|} | |} | ||
{{{end template}}} | {{{end template}}} | ||
= Add a region outline to the database = | |||
<html> | |||
<form id="redirectForm"> | |||
<input type="text" id="pageName" placeholder="Enter name"> | |||
<input type="button" value="Go to Page" onclick="redirectToPage()"> | |||
</form> | |||
<script> | |||
function redirectToPage() { | |||
var pageName = document.getElementById('pageName').value; | |||
if (pageName) { | |||
var url = mw.util.getUrl('GeoJson:' + pageName); | |||
window.location.href = url; | |||
} else { | |||
alert('Please enter a name'); | |||
} | |||
} | |||
</script> | |||
</html> | |||
== General Notes (External) == | == General Notes (External) == |
Latest revision as of 06:58, 11 October 2024
Add a location to the database