Submit an Artifact

From Artifacts of Capitalism
Revision as of 17:27, 29 October 2025 by Abrano (talk | contribs)

<form id="submit-artifact" method="get" action="/index.php"

     style="font-family:serif; font-size:1rem; line-height:1.4; color:#000;">
 <input type="hidden" name="action" value="edit" />
 <input id="preload" type="hidden" name="preload" value="Template:ArtifactPreload/Tudor" />
   <label for="title" style="display:block; font-weight:600; margin-bottom:0.25rem;">
     Name your artifact
   </label>
   <input id="title"
          type="text"
          name="title"
          placeholder="Example: 'Grain Riots in Norwich, 1595' or 'Petition to Regulate Alehouses'"
          required
          style="width:100%; max-width:100%; box-sizing:border-box;
                 font-family:serif; font-size:1rem; line-height:1.4;
                 padding:8px 10px; border-radius:4px;
                 border:1px solid #7b6a3a; background-color:#fff;" />
     This phrase will become the page title.
   <label for="area" style="display:block; font-weight:600; margin-bottom:0.25rem;">
     Historical area
   </label>
   <select id="area"
           required
           style="width:100%; max-width:100%; box-sizing:border-box;
                  font-family:serif; font-size:1rem; line-height:1.4;
                  padding:8px 10px; border-radius:4px;
                  border:1px solid #7b6a3a; background-color:#fff;">
     <option value="Tudor">Tudor artifacts</option>
     <option value="Elizabethan">Elizabethan artifacts</option>
     <option value="Jacobean">Jacobean artifacts</option>
     <option value="Carolinian">Carolinian artifacts</option>
     <option value="Interregnum">Interregnum artifacts</option>
   </select>
     This selection helps route your draft to the appropriate curator.
   <input type="submit"
          value="Create Draft Page"
          style="background-color:#d9c59b; color:#000; cursor:pointer;
                 font-family:serif; font-weight:600; font-size:1rem; line-height:1.2;
                 padding:10px 16px; border-radius:6px; border:1px solid #7b6a3a;"
          onmouseover="this.style.backgroundColor='#e6d4aa';"
          onmouseout="this.style.backgroundColor='#d9c59b';"
   />
     Clicking “Create Draft Page” will open a new draft in the wiki editor. Nothing becomes public yet.

</form>

<script> document.addEventListener('DOMContentLoaded', function () {

 const form = document.getElementById('submit-artifact');
 const title = document.getElementById('title');
 const area  = document.getElementById('area');
 const preload = document.getElementById('preload');
 if (!form || !title || !area || !preload) {
   return;
 }
 form.addEventListener('submit', function () {
   // Strip an existing Draft: prefix if user typed it
   title.value = title.value.replace(/^Draft:/i, );
   // Add Draft: prefix so it lands in Draft namespace
   title.value = 'Draft:' + title.value;
   // Point preload to the correct template for the chosen era
   preload.value = 'Template:ArtifactPreload/' + area.value;
 });

}); </script>