Commit 9b015b89 authored by elisabeth kee's avatar elisabeth kee

Created matches, modify, and delete pages

parent 6ba16bca
......@@ -80,7 +80,7 @@ $(document).ready(function() {
}
});
});
*/
$('#seeModifications').click(function(){
let idProfile = $listeProfilesSelect2.val();
$.ajax({
......@@ -99,7 +99,7 @@ $(document).ready(function() {
});
return false;
});
*/
$('#modifyFirstname').click(function(){
let idProfile = $listeProfilesSelect2.val();
let newFirstname = $('#firstname-modify').val();
......@@ -231,13 +231,13 @@ $(document).ready(function() {
//$listeLovers.append(`<li id="lover-${lover.id}" class="list-group-item">${lover.partnerGender} - who likes ${lover.partnerPet} <button class="btn btn-danger btn-xs" data-title="Delete" data-toggle="modal" data-target="#delete" >X</button></li>`);
}
/* Ajoute un élément li dans la liste de lovers
/* Ajoute un élément li dans la liste de lovers*/
function showModifiedProfile(profile) {
liToAppend4 = `<li id="${profile.id}" class="list-group-item">You are: ${profile.firstname} - age: ${profile.age} - gender: ${profile.gender} - who likes: ${profile.pet} - contact info: ${profile.contact}`;
profile.lovers.forEach( lover => liToAppend4+= ` - interested in: ${lover.partnerGender} - who likes ${lover.partnerPet}`);
liToAppend4+= `</li>`;
$listModifiedProfile.append(liToAppend4);
}*/
}
/* Ajoute un élément li dans le select des lovers*/
function appendToSelects(lover) {
......
......@@ -21,40 +21,20 @@
</p>
<h2 style="color:crimson;">Ready to find love?</h2>
<p>Select your profile and search for matches by clicking on your green ";)" button : </p>
<ul class="list-group" id="listProfilesSelect">
</ul>
<p>Here are your matches : </p>
<ul class= "list-group" id="listMatches"></ul>
</p>
<div class="form-group">
<input type="button" id="searchForLove" name="searchbtn" value="Search For Love" class="btn btn-primary btn-sm" onclick="window.location.href='pageFindMatches.html'"/>
</div>
<p>
<h2 style="color:orangered;">Everyone changes at some point in their lives...</h2>
<div class="form-group">
<p>Select the profile you wish to modify : </p>
<p><select id="listProfilesSelect2"></select></p>
<p>Modify your profile info : </p>
<p>Firstname : <input type="text" name="firstname" id="firstname-modify"><input type="button" id="modifyFirstname" name="addbtn" value="Modify" class="btn btn-primary btn-sm"></p>
<p>Gender (Male/Female/Other): <input type="text" name="gender" id="gender-modify"><input type="button" id="modifyGender" name="addbtn" value="Modify" class="btn btn-primary btn-sm"></p>
<p>For a pet, what do you prefer (cats/dogs/other) ? : <input type="text" name="pet" id="pet-modify"><input type="button" id="modifyPet" name="addbtn" value="Modify" class="btn btn-primary btn-sm"></p>
<p>Contact information for potential lovers : <input type="text" name="contact" id="contact-modify"><input type="button" id="modifyContact" name="addbtn" value="Modify" class="btn btn-primary btn-sm"></p>
<p>Age : <input type="text" name="age" id="age-modify"><input type="button" id="modifyAge" name="addbtn" value="Modify" class="btn btn-primary btn-sm"></p>
<p>Want to choose a new love interest ?: </p>
<p><select id="selectLovers2"></select><input type="button" id="modifyLover" name="addbtn" value="Modify" class="btn btn-primary btn-sm"></p>
<p>See your new profile now that you have made all your modifications: </p>
<p><input type="button" id="seeModifications" name="addbtn" value="Modified" class="btn btn-primary btn-sm"></p>
<ul class="list-group" id="showModifiedProfile">
</ul>
<input type="button" id="ModifyProfile" name="modifybtn" value="Modify Your Profile" class="btn btn-primary btn-sm" onclick="window.location.href='pageModifyProfile.html'"/>
</div>
</p>
<p>
<h2>Are you now spoken for?</h2>
<h2 style="color:slategray;">No longer need to search for love?</h2>
<div class="form-group">
<label>Want to delete your profile ? Click on the red "X" button :</label>
<ul class= "list-group" id="listProfilesDelete">
</ul>
<input type="button" id="deleteProfile" name="deletebtn" value="Delete Your Profile" class="btn btn-primary btn-sm" onclick="window.location.href='pageDelete.html'"/>
</div>
</p>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
......
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Time to delete your profile!</title>
</head>
<body style="background-color:honeydew; margin-left:10cm; margin-right:10cm;">
<p><h1 style="color:deeppink; text-align: center;">Time to delete your profile!</h1></p>
<main>
<div class="form-group">
<label>Want to delete your profile ? Simply click on the red "X" button next to your profile :</label>
<ul class= "list-group" id="listProfilesDelete">
</ul>
<input type="button" id="goHome" name="homebtn" value="Go back to the home screen" class="btn btn-primary btn-sm" onclick="window.location.href='index.html'"/>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="hello1.js"></script>
</main>
<footer>
</footer>
</body>
</html>
\ No newline at end of file
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Time to find love!</title>
</head>
<body style="background-color:honeydew; margin-left:10cm; margin-right:10cm;">
<p><h1 style="color:deeppink; text-align: center;">Time to find the love you are searching for!</h1></p>
<main>
<p>Find your profile and search for matches by clicking on your green ";)" button : </p>
<ul class="list-group" id="listProfilesSelect">
</ul>
<p>Here are your matches : </p>
<ul class= "list-group" id="listMatches"></ul>
<p>Why not go ahead and contact them ? ;)</p>
</p>
<input type="button" id="goHome" name="homebtn" value="Go back to the home screen" class="btn btn-primary btn-sm" onclick="window.location.href='index.html'"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="hello1.js"></script>
</main>
<footer>
</footer>
</body>
</html>
\ No newline at end of file
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Time to modify your profile!</title>
</head>
<body style="background-color:honeydew; margin-left:10cm; margin-right:10cm;">
<p><h1 style="color:deeppink; text-align: center;">Time to modify your profile!</h1></p>
<main>
<div class="form-group">
<p>Select the profile you wish to modify : </p>
<p><select id="listProfilesSelect2"></select></p>
<p>Modify your profile info by entering in new info and then clicking on the "Modify" button : </p>
<p>Firstname : <input type="text" name="firstname" id="firstname-modify"><input type="button" id="modifyFirstname" name="addbtn" value="Modify" class="btn btn-primary btn-sm"></p>
<p>Gender (Male/Female/Other): <input type="text" name="gender" id="gender-modify"><input type="button" id="modifyGender" name="addbtn" value="Modify" class="btn btn-primary btn-sm"></p>
<p>For a pet, what do you prefer (cats/dogs/other) ? : <input type="text" name="pet" id="pet-modify"><input type="button" id="modifyPet" name="addbtn" value="Modify" class="btn btn-primary btn-sm"></p>
<p>Contact information for potential lovers : <input type="text" name="contact" id="contact-modify"><input type="button" id="modifyContact" name="addbtn" value="Modify" class="btn btn-primary btn-sm"></p>
<p>Age : <input type="text" name="age" id="age-modify"><input type="button" id="modifyAge" name="addbtn" value="Modify" class="btn btn-primary btn-sm"></p>
<p>Want to choose a new love interest ?: </p>
<p><select id="selectLovers2"></select><input type="button" id="modifyLover" name="addbtn" value="Modify" class="btn btn-primary btn-sm"></p>
</div>
<input type="button" id="goHome" name="homebtn" value="Go back to the home screen" class="btn btn-primary btn-sm" onclick="window.location.href='index.html'"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="hello1.js"></script>
</main>
<footer>
</footer>
</body>
</html>
\ No newline at end of file
......@@ -52,6 +52,9 @@
<ul class="list-group" id="listLovers">
</ul>
<input type="button" id="goHome" name="homebtn" value="Go back to the home screen" class="btn btn-primary btn-sm" onclick="window.location.href='index.html'"/>
</div>
<p>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
......
Markdown is supported
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