")
diff --git a/static/css/create.css b/static/css/create.css
index 10f088f..f3713f1 100644
--- a/static/css/create.css
+++ b/static/css/create.css
@@ -98,6 +98,14 @@ body {
content: "*:";
}
+.has-error {
+ color: #a94442;
+}
+
+.has-success {
+ color: #3c763d;
+}
+
.detectedFiles {
max-height: 300px;
overflow: auto;
diff --git a/static/js/create.js b/static/js/create.js
index 421cbd3..f005fa2 100644
--- a/static/js/create.js
+++ b/static/js/create.js
@@ -126,7 +126,6 @@ function getOrCreate(root, foldername, displayname, type) {
content.hidden = true
element.appendChild(content)
}
- foobar = root
root = root.querySelector(".content")
root.appendChild(element)
return element
@@ -210,12 +209,20 @@ function validateForm() {
subcategory = document.querySelector("#subcategory")
torrentname = document.querySelector(".torrent-form .name input")
description = document.querySelector(".torrent-form .description textarea")
+ tracker = document.querySelector(".trackerGroup .detectedTracker").parentElement
file_label = document.querySelector(".torrent-form .file")
category_label = document.querySelector(".torrent-form .category")
name_label = document.querySelector(".torrent-form .name")
description_label = document.querySelector(".torrent-form .description")
+ if(validtracker.indexOf(torrentObject.announce) < 0) {
+ valid = false
+ setError(tracker)
+ } else {
+ setSuccess(tracker)
+ }
+
if(file.value.length <= 0) {
valid = false
setError(file_label)
diff --git a/templates/create.html b/templates/create.html
index c29f19a..8c7b7bb 100644
--- a/templates/create.html
+++ b/templates/create.html
@@ -7,6 +7,7 @@ vim: ts=2 noexpandtab
{% block content %}
+
{{ _("Create new torrent") }}
{% if errors %}