From d1b36557e3d5174cdd1bede3f1456b84713906a2 Mon Sep 17 00:00:00 2001
From: Kevin XU <kevin-xu@hotmail.fr>
Date: Thu, 22 Nov 2018 21:07:46 +0100
Subject: [PATCH] =?UTF-8?q?Ajout=20d'un=20message=20d'erreur=20lorsqu'aucu?=
 =?UTF-8?q?n=20r=C3=A9seau=20n'est=20choisi?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 js/recherche.js        |  5 +++++
 page_welcome/index.php | 13 +++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/js/recherche.js b/js/recherche.js
index b499c54..eace6c1 100644
--- a/js/recherche.js
+++ b/js/recherche.js
@@ -36,6 +36,11 @@
         else if (document.getElementById("radio_2").checked == true) {
             API = "youtube-api"
         }
+        else {
+            document.getElementById("erreur").innerHTML = "Please select a social network.";
+            return 0;
+        }
+        document.getElementById("erreur").innerHTML = "";
         xhttp.open("GET", "../"+API+"/userSuggestions.php?w="+keyword, true);
         xhttp.send();
     }
diff --git a/page_welcome/index.php b/page_welcome/index.php
index ac2cbb1..87d4d04 100644
--- a/page_welcome/index.php
+++ b/page_welcome/index.php
@@ -33,11 +33,10 @@ session_start();
 							</h3>
 							<div class="search-agile">
 								<div>
-
 									<!-- <input type="submit" value="Search"> -->
 									<div style="display: inline-flex;">
-									    <input class="img" type="radio" id="radio_1" name="radio[]" value="1" onchange="showSuggestions();"/>
-									    <label for="radio_1"><img src="../images/ins.png" width="50" height="50"/></label>
+									    <!-- <input class="img" type="radio" id="radio_1" name="radio[]" value="1" onchange="showSuggestions();"/>
+									    <label for="radio_1"><img src="../images/ins.png" width="50" height="50"/></label>-->
 
 									    <input class="img" type="radio" id="radio_2" name="radio[]" value="2" onchange="showSuggestions();"/>
 									    <label for="radio_2"><img src="../images/youtube.jpeg" width="50" height="50"/></label>
@@ -45,8 +44,8 @@ session_start();
 									    <input class="img" type="radio" id="radio_3" name="radio[]" value="3" onchange="showSuggestions();"/>
 									    <label for="radio_3"><img src="../images/twitter.png" width="50" height="50"/></label>
 
-									    <input class="img" type="radio" id="radio_4" name="radio[]" value="4" onchange="showSuggestions();"/>
-									    <label for="radio_4"><img src="../images/facebook.png" width="50" height="50"/></label>
+									    <!-- <input class="img" type="radio" id="radio_4" name="radio[]" value="4" onchange="showSuggestions();"/>
+									    <label for="radio_4"><img src="../images/facebook.png" width="50" height="50"/></label>-->
 									</div>
 									<input id="searchField" style="height: 50px; font-size: 20px;" list="usernames" name="username" type="text" size="40" maxlength="100" autocomplete="off" placeholder="Search here..." onkeyup="
 										if (this.value === '') {
@@ -59,7 +58,7 @@ session_start();
 
 
 						            </datalist>
-									<div class="clearfix"> </div>
+									
 								</div>
 							</div>
 
@@ -68,6 +67,8 @@ session_start();
 
 								<div id="suggestionButtons">
 								</div>
+								<div id="erreur" style="height: 50px; font-size: 20px; color: white;width: 255px; margin:auto; "> </div>
+
 					</div>
 				</div>
 			</li>
-- 
GitLab