minetest-modinstaller-web/submit.html

188 lines
7.5 KiB
HTML

<html>
<head>
<title>Submit Mod</title>
<link rel="stylesheet" href="main.css"/>
<link rel="stylesheet" href="form.css"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="notify.js"></script>
<script>
function sendMessage() {
var send = true;
if (document.getElementById('name').value === '') {
send = false;
document.getElementById('name').style.borderColor = '#FF4444';
} else {
document.getElementById('name').style.borderColor = '#000000';
}
if (document.getElementById('email').value === '') {
send = false;
document.getElementById('email').style.borderColor = '#FF4444';
} else {
document.getElementById('email').style.borderColor = '#000000';
}
if (document.getElementById('title').value === '') {
send = false;
document.getElementById('title').style.borderColor = '#FF4444';
} else {
document.getElementById('title').style.borderColor = '#000000';
}
if (document.getElementById('description').value === '') {
send = false;
document.getElementById('description').style.borderColor = '#FF4444';
} else {
document.getElementById('description').style.borderColor = '#000000';
}
// if (document.getElementById('imagelink').value === '') {
// send = false;
// document.getElementById('imagelink').style.borderColor = '#FF4444';
// } else {
// document.getElementById('imagelink').style.borderColor = '#000000';
// }
if (document.getElementById('ziplink').value === '') {
send = false;
document.getElementById('ziplink').style.borderColor = '#FF4444';
} else {
document.getElementById('ziplink').style.borderColor = '#000000';
}
// if (document.getElementById('folder').value === '') {
// send = false;
// document.getElementById('folder').style.borderColor = '#FF4444';
// } else {
// document.getElementById('folder').style.borderColor = '#000000';
// }
if (document.getElementById('robot-check').checksum != 'stfh1tr8fh6srtf56hnbrtsfxhb1rtx81fh5tr1xf6gh15xnrtf51hgnft') {
send = false;
}
if (send) {
var name = document.getElementById('name').value;
var email = document.getElementById('email').value;
var title = document.getElementById('title').value;
var description = document.getElementById('description').value;
var imagelink = document.getElementById('imagelink').value;
var ziplink = document.getElementById('ziplink').value;
var folder = document.getElementById('folder').value;
var library = '0';
if (document.getElementById('library').checked) {
library = '1';
}
var other = document.getElementById('other').value;
var pack = document.getElementById('package').value;
window.location = 'send.php?subject=Modinstaller ' + title + '&message=Hello dear modinstaller admin.|There is a new request to add a mod to the list:'
+ '||Author: ' + name
+ '|E-Mail: ' + email
+ '|Title: ' + title
+ '|Description: ' + description
+ '|Link to image: ' + imagelink
+ '|Link to zip: ' + ziplink
+ '|Foldername in zip: ' + folder
+ '|As library: ' + library
+ '|Other: ' + other
+ '|Package: ' + pack
+ '||Here is the line that will be added to the index list in the Github repository:|'
+ title + ':::' + ziplink + ':::' + folder + ':::' + library + ':::' + name + ':::' + imagelink + ':::' + description
+ '||Here is a link to this file: https://github.com/DevsWithoutHobbies/minetest-modinstaller-data/blob/master/index'
+ '||If everything seems fine, you can add it.||Sincerly yours|TOTALLY NOT A BOT';
}
}
function robot() {
if (document.getElementById('robot-check').checked) {
document.getElementById('robot-check').checksum='stfh1tr8fh6srtf56hnbrtsfxhb1rtx81fh5tr1xf6gh15xnrtf51hgnft'
} else {
document.getElementById('robot-check').checksum='k3jabsd2asd3uibash3dva9skjhd5uzf6gcvkehj1wdhqwz7qvusjdh8b'
}
}
</script>
</head>
<body>
<div class="header">
<h1>Minetest Modinstaller</h1>
</div>
<div class="menu_bar">
<a href="index.html"><div class="menu_item">Home</div></a>
<a href="download.html"><div class="menu_item">Download</div></a>
<a href="submit.html"><div class="menu_item">Submit Mod</div></a>
<a href="contact.html"><div class="menu_item">Contact</div></a>
</div>
<div class="content">
<h2>Submit a new mod</h2>
<table class="form">
<tr>
<td class="first">Author/-s</td>
<td class="second"><input type="text" id="name" placeholder="Comma separated list of names"></td>
</tr>
<tr>
<td class="first">E-Mail (Not public)</td>
<td class="second"><input type="mail" id="email" placeholder="Contact e-mail"/></td>
</tr>
<tr>
<td class="first">Mod title</td>
<td class="second"><input type="text" id="title" placeholder="Will be the name in the list in the modinstaller"/></td>
</tr>
<tr>
<td class="first">Description</td>
<td class="second"><textarea type="text" id="description" placeholder="Describe your mod as good as possible and as short as possible"></textarea></td>
</tr>
<tr>
<td class="first">Link to image</td>
<td class="second"><input type="url" id="imagelink" placeholder="Image that depicts your mod well"/></td>
</tr>
<tr>
<td class="first">Link to .zip</td>
<td class="second"><input type="url" id="ziplink" placeholder="URL to latest stable version"/></td>
</tr>
<tr>
<td class="first">Foldername in zip</td>
<td class="second"><input type="text" id="folder" placeholder="Relative path in the zip file"/></td>
</tr>
<tr>
<td class="first">As library</td>
<td class="second">
<input type="checkbox" id="library"/>
<label for="library">
<span class="checkmark">
<div class="checkmark_stem"></div>
<div class="checkmark_kick"></div>
</span>
<box></box>
<a>Won't be show in list. Will only be installed as dependency.</a>
</label>
</td>
</tr>
<tr>
<td class="first">Other information (optional)<br>(Not public)</td>
<td class="second"><textarea type="text" id="other" placeholder="Private message to the modinstaller admins"></textarea></td>
</tr>
<tr>
<td class="first">Package name (optional)</td>
<td class="second"><input type="text" id="package" placeholder="Leave blank for simple mod"></td>
</tr>
<tr>
<td class="first"></td>
<td class="second">
<div class="no-robot" onclick="robot();">
<input type="checkbox" class="robot-check" id="robot-check" checksum="k3jabsd2asd3uibash3dva9skjhd5uzf6gcvkehj1wdhqwz7qvusjdh8b">
<label for="robot-check">
<span class="checkmark">
<div class="checkmark_stem"></div>
<div class="checkmark_kick"></div>
</span>
<box></box>
<a>I'm not a robot</a>
</label>
</div>
</td>
</tr>
<tr>
<td/>
<td><input type="submit" value="Send" onclick="sendMessage();"/></td>
</tr>
</table>
</div>
</body>
</html>