1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-25 17:23:00 +00:00

Add tab indexing to file upload form. Fixes #120

This commit is contained in:
Starbeamrainbowlabs 2016-11-20 09:41:23 +00:00
parent f07cd96691
commit 312de4b341
3 changed files with 12 additions and 12 deletions

View file

@ -2969,7 +2969,7 @@ class search
register_module([ register_module([
"name" => "Uploader", "name" => "Uploader",
"version" => "0.5.7", "version" => "0.5.8",
"author" => "Starbeamrainbowlabs", "author" => "Starbeamrainbowlabs",
"description" => "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File/' prefix.", "description" => "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File/' prefix.",
"id" => "feature-upload", "id" => "feature-upload",
@ -3027,15 +3027,15 @@ register_module([
<p>$settings->sitename currently supports uploading of the following file types: " . implode(", ", $settings->upload_allowed_file_types) . ".</p> <p>$settings->sitename currently supports uploading of the following file types: " . implode(", ", $settings->upload_allowed_file_types) . ".</p>
<form method='post' action='?action=upload' enctype='multipart/form-data'> <form method='post' action='?action=upload' enctype='multipart/form-data'>
<label for='file'>Select a file to upload.</label> <label for='file'>Select a file to upload.</label>
<input type='file' name='file' id='file-upload-selector' /> <input type='file' name='file' id='file-upload-selector' tabindex='1' />
<br /> <br />
<label for='name'>Name:</label> <label for='name'>Name:</label>
<input type='text' name='name' id='file-upload-name' /> <input type='text' name='name' id='file-upload-name' tabindex='5' />
<br /> <br />
<label for='description'>Description:</label> <label for='description'>Description:</label>
<textarea name='description'></textarea> <textarea name='description' tabindex='10'></textarea>
<p class='editing_message'>$settings->editing_message</p> <p class='editing_message'>$settings->editing_message</p>
<input type='submit' value='Upload' /> <input type='submit' value='Upload' tabindex='20' />
</form> </form>
<script> <script>
document.getElementById('file-upload-selector').addEventListener('change', function() { document.getElementById('file-upload-selector').addEventListener('change', function() {

View file

@ -82,11 +82,11 @@
}, },
{ {
"name": "Uploader", "name": "Uploader",
"version": "0.5.7", "version": "0.5.8",
"author": "Starbeamrainbowlabs", "author": "Starbeamrainbowlabs",
"description": "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File\/' prefix.", "description": "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File\/' prefix.",
"id": "feature-upload", "id": "feature-upload",
"lastupdate": 1476906745, "lastupdate": 1479634619,
"optional": false "optional": false
}, },
{ {

View file

@ -1,7 +1,7 @@
<?php <?php
register_module([ register_module([
"name" => "Uploader", "name" => "Uploader",
"version" => "0.5.7", "version" => "0.5.8",
"author" => "Starbeamrainbowlabs", "author" => "Starbeamrainbowlabs",
"description" => "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File/' prefix.", "description" => "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File/' prefix.",
"id" => "feature-upload", "id" => "feature-upload",
@ -59,15 +59,15 @@ register_module([
<p>$settings->sitename currently supports uploading of the following file types: " . implode(", ", $settings->upload_allowed_file_types) . ".</p> <p>$settings->sitename currently supports uploading of the following file types: " . implode(", ", $settings->upload_allowed_file_types) . ".</p>
<form method='post' action='?action=upload' enctype='multipart/form-data'> <form method='post' action='?action=upload' enctype='multipart/form-data'>
<label for='file'>Select a file to upload.</label> <label for='file'>Select a file to upload.</label>
<input type='file' name='file' id='file-upload-selector' /> <input type='file' name='file' id='file-upload-selector' tabindex='1' />
<br /> <br />
<label for='name'>Name:</label> <label for='name'>Name:</label>
<input type='text' name='name' id='file-upload-name' /> <input type='text' name='name' id='file-upload-name' tabindex='5' />
<br /> <br />
<label for='description'>Description:</label> <label for='description'>Description:</label>
<textarea name='description'></textarea> <textarea name='description' tabindex='10'></textarea>
<p class='editing_message'>$settings->editing_message</p> <p class='editing_message'>$settings->editing_message</p>
<input type='submit' value='Upload' /> <input type='submit' value='Upload' tabindex='20' />
</form> </form>
<script> <script>
document.getElementById('file-upload-selector').addEventListener('change', function() { document.getElementById('file-upload-selector').addEventListener('change', function() {