Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 5781deec authored by Deepak Khatri's avatar Deepak Khatri :dog:
Browse files

Fix feedback modal link issues

parent 5c46a8f5
Branches
Tags
2 merge requests!116Feedback mechanism, terms & condition modal, and BeagleY-AI updates,!113low-power-video-doorbell.rst: Add gstreamer related information
...@@ -43,17 +43,20 @@ ...@@ -43,17 +43,20 @@
document.body.appendChild(document.getElementById('feedbackModal')); document.body.appendChild(document.getElementById('feedbackModal'));
var link = document.getElementById("feedbacklink") var link = document.getElementById("feedbacklink")
var project = "{{gitlab_project}}" var gitlab_project = "{{gitlab_project}}"
var title = document.getElementById("feedbackModalTitle") var title = document.getElementById("feedbackModalTitle")
var description = document.getElementById("feedbackModalDescription") var description = document.getElementById("feedbackModalDescription")
var type = document.querySelector('input[name="feedbackType"]:checked')
function feedbackInputHandler() { function feedbackInputHandler() {
var type = document.querySelector('input[name="feedbackType"]:checked').value
if(title.value.length >= 4 && description.value.length >= 10) { if(title.value.length >= 4 && description.value.length >= 10) {
if (new URI(gitlab_project).scheme === null) {
gitlab_project = 'https://' + gitlab_project;
}
link.target="_blank" link.target="_blank"
link.classList.remove("disabled"); link.classList.remove("disabled");
link.href = project + "/-/issues/new?issue[title]=" + type.value + ": " + title.value + "&issue[description]=" + description.value + "%0A%0AGenerated from: " + "{{docs_url}}/{{pagename}}" link.href = gitlab_project + "/-/issues/new?issue[title]=" + type + ": " + title.value + "&issue[description]=" + description.value + "%0A%0AGenerated from: " + "{{docs_url}}/{{pagename}}"
} else { } else {
link.classList.add("disabled"); link.classList.add("disabled");
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment