From a59adf2436e9a20981b66bd57764e23e66b98804 Mon Sep 17 00:00:00 2001
From: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
Date: Thu, 7 Apr 2016 18:29:38 +0100
Subject: [PATCH] Add editing message to upload form

---
 build/index.php            | 5 +++--
 module_index.json          | 2 +-
 modules/feature-upload.php | 3 ++-
 settings.fragment.php      | 2 +-
 4 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/build/index.php b/build/index.php
index 47648c6..2a956ef 100644
--- a/build/index.php
+++ b/build/index.php
@@ -71,7 +71,7 @@ $settings->footer_message = "All content is under <a href='?page=License' target
 // A message that will appear just before the submit button on the editing
 // page. May contain HTML.
 $settings->editing_message = "<a href='?action=help#20-parser-default' target='_blank'>Formatting help</a> (<a href='https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet'>Markdown Cheatsheet</a>)<br />
-By submitting your edit, you are agreeing to release your changes under <a href='?action=view&page=License' target='_blank'>this license</a>. Also note that if you don't want your work to be edited by other users of this site, please don't submit it here!";
+By submitting your edit or uploading your file, you are agreeing to release your changes under <a href='?action=view&page=License' target='_blank'>this license</a>. Also note that if you don't want your work to be edited by other users of this site, please don't submit it here!";
 
 // The string that is prepended before an admin's name on the nav bar. Defaults
 // to a diamond shape (&#9670;).
@@ -2460,7 +2460,7 @@ register_module([
 			<br />
 			<label for='description'>Description:</label>
 			<textarea name='description'></textarea>
-			<br />
+			<p class='editing_message'>$settings->editing_message</p>
 			<input type='submit' value='Upload' />
 		</form>"));
 					
@@ -2675,6 +2675,7 @@ register_module([
 				
 				case "video":
 				case "audio":
+					// TODO: Add support for ranges here.
 					// Get the file size
 					$filesize = filesize($filepath);
 					
diff --git a/module_index.json b/module_index.json
index 542ba0d..c8d3f00 100644
--- a/module_index.json
+++ b/module_index.json
@@ -68,7 +68,7 @@
         "author": "Starbeamrainbowlabs",
         "description": "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File:' prefix.",
         "id": "feature-upload",
-        "lastupdate": 1460047934,
+        "lastupdate": 1460050114,
         "optional": false
     },
     {
diff --git a/modules/feature-upload.php b/modules/feature-upload.php
index 636c35d..5b26ac4 100644
--- a/modules/feature-upload.php
+++ b/modules/feature-upload.php
@@ -40,7 +40,7 @@ register_module([
 			<br />
 			<label for='description'>Description:</label>
 			<textarea name='description'></textarea>
-			<br />
+			<p class='editing_message'>$settings->editing_message</p>
 			<input type='submit' value='Upload' />
 		</form>"));
 					
@@ -255,6 +255,7 @@ register_module([
 				
 				case "video":
 				case "audio":
+					// TODO: Add support for ranges here.
 					// Get the file size
 					$filesize = filesize($filepath);
 					
diff --git a/settings.fragment.php b/settings.fragment.php
index eca00ae..e7e08cb 100644
--- a/settings.fragment.php
+++ b/settings.fragment.php
@@ -68,7 +68,7 @@ $settings->footer_message = "All content is under <a href='?page=License' target
 // A message that will appear just before the submit button on the editing
 // page. May contain HTML.
 $settings->editing_message = "<a href='?action=help#20-parser-default' target='_blank'>Formatting help</a> (<a href='https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet'>Markdown Cheatsheet</a>)<br />
-By submitting your edit, you are agreeing to release your changes under <a href='?action=view&page=License' target='_blank'>this license</a>. Also note that if you don't want your work to be edited by other users of this site, please don't submit it here!";
+By submitting your edit or uploading your file, you are agreeing to release your changes under <a href='?action=view&page=License' target='_blank'>this license</a>. Also note that if you don't want your work to be edited by other users of this site, please don't submit it here!";
 
 // The string that is prepended before an admin's name on the nav bar. Defaults
 // to a diamond shape (&#9670;).
