diff --git a/WebContent/JavaScript/Administration.js b/WebContent/JavaScript/Administration.js index b2efe66..9d2b2cc 100644 --- a/WebContent/JavaScript/Administration.js +++ b/WebContent/JavaScript/Administration.js @@ -189,32 +189,3 @@ function listAllExercises(jsonString) { //exercise.image = exercise.image; }); } -/** - * Zur erstellung von neuen Exercises können hier Parameter ausgewählt werden, welche dann in die Datenbank übernommen werden. - * Dabei wir die FormData methode verwendet, welche in der lage ist verschiedene Input-Typen an den Server zu übermitteln. - */ -function createNewExercise() { - - let inputImage = document.querySelector("#image"); - let buttonSubmission = document.querySelector("#submitExercise"); - let inputName = document.querySelector(".nameExercise"); - let idListOfRadioBox = ['c1', 'c2', 'c3', 'c4', 'c5']; - idListOfRadioBox.forEach(listItem => { - let radioBox = document.getElementById(listItem); - if (!inputName) { - alert("keine gültige Eingaben"); - } - - if (!radioBox.value) { - let formData = new FormData(); - formData.append("exerciseName=", inputName.value); - formData.append("muscleGroup", radioBox.value); - formData.append("image", inputImage.files[0]); - fetch("ExerciseServlet", - { - method: "POST", - body: formData - }); - } - }); -} diff --git a/WebContent/JavaScript/TrainingSettings.js b/WebContent/JavaScript/TrainingSettings.js index 4b8022e..c126265 100644 --- a/WebContent/JavaScript/TrainingSettings.js +++ b/WebContent/JavaScript/TrainingSettings.js @@ -55,6 +55,7 @@ function onExerciseClick(exercise) { var check = document.getElementsByName(exercise.name); if (check.length === 0) { addExercise(exercise, false); // HTML DOM Manipulation + var headerElement = document.getElementsByTagName("header"); var trainingId = headerElement[0].id; console.log(trainingId); @@ -74,15 +75,6 @@ function onExerciseClick(exercise) { ); xmlhttpExerciseToTraining.send(); } - // var xmlhttp = new XMLHttpRequest(); - // xmlhttp.open("GET", "../ExerciseServlet?selectedExercise="+exercise.id, true); - // xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); - // xmlhttp.send(); - - // var insertableSearchbar = document.getElementById("searchBar"); - // insertableSearchbar.setAttribute("type", "hidden"); - // var searchItems = document.getElementById("searchResultContainer"); - // searchItems.style.display = "none"; } // Laden der zum Training hinterlegten Übungen zur Ansicht als json diff --git a/WebContent/html/accountSetting.jsp b/WebContent/html/accountSetting.jsp index cde10d7..3122a0e 100644 --- a/WebContent/html/accountSetting.jsp +++ b/WebContent/html/accountSetting.jsp @@ -40,7 +40,7 @@ method="post" accept-charset="utf-8">

Ihr aktueller Username ist:

${userData.username}

-
+
@@ -50,7 +50,7 @@ accept-charset="utf-8">

+ name="changeFirstName" maxlength="35" minlength="3" required>

@@ -59,7 +59,7 @@ accept-charset="utf-8">

+ name="changeLastName" maxlength="35" minlength="3" required>
@@ -69,7 +69,7 @@ accept-charset="utf-8">

+ maxlength="35" minlength="3" required>
@@ -80,7 +80,7 @@ accept-charset="utf-8">

+ maxlength="35" minlength="5" required>