Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Projet ISIS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MARQUE Pierre
Projet ISIS
Commits
d8e392df
Commit
d8e392df
authored
Mar 28, 2022
by
Okthane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fonction-cancel-image
parent
0dfd5937
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
7 deletions
+31
-7
settings.json
.vscode/settings.json
+3
-0
pierremarque.jpg
img/pierremarque.jpg
+0
-0
pierremarqueNO-BG.png
img_bg/pierremarqueNO-BG.png
+0
-0
severinedemarqueNO-BG.png
img_bg/severinedemarqueNO-BG.png
+0
-0
index.php
index.php
+1
-0
script.js
script.js
+27
-7
No files found.
.vscode/settings.json
0 → 100644
View file @
d8e392df
{
"editor.mouseWheelZoom"
:
true
}
\ No newline at end of file
img/pierremarque.jpg
deleted
100644 → 0
View file @
0dfd5937
19.3 KB
img_bg/pierremarqueNO-BG.png
deleted
100644 → 0
View file @
0dfd5937
192 KB
img_bg/severinedemarqueNO-BG.png
deleted
100644 → 0
View file @
0dfd5937
166 KB
index.php
View file @
d8e392df
...
@@ -50,6 +50,7 @@
...
@@ -50,6 +50,7 @@
<input
id=
"btnSubmit"
type=
"submit"
name=
"submit"
value=
"Vérifier"
class=
"btn-form"
>
<input
id=
"btnSubmit"
type=
"submit"
name=
"submit"
value=
"Vérifier"
class=
"btn-form"
>
</div>
</div>
</form>
</form>
<button
id =
"cancel"
type=
"button"
>
Annuler
</button>
<script>
<script>
const
inpFile
=
document
.
getElementById
(
"fileUpload"
);
const
inpFile
=
document
.
getElementById
(
"fileUpload"
);
...
...
script.js
View file @
d8e392df
...
@@ -8,7 +8,8 @@ const URL_END = 'byebye.html';
...
@@ -8,7 +8,8 @@ const URL_END = 'byebye.html';
const
timeout
=
5000
;
const
timeout
=
5000
;
const
ID
=
"img-ID"
;
const
ID
=
"img-ID"
;
var
Img
;
const
ID_bg
=
"img-ID2"
;
var
ImgBG
const
canva
=
"canvas"
;
const
canva
=
"canvas"
;
// console.log($("#"+ID).attr('src'));
// console.log($("#"+ID).attr('src'));
...
@@ -20,6 +21,9 @@ const idBtnSubmit = 'btnSubmit';var btnSubmit;
...
@@ -20,6 +21,9 @@ const idBtnSubmit = 'btnSubmit';var btnSubmit;
const
idStatut
=
"span-status"
;
const
idStatut
=
"span-status"
;
//Variables concernant le bouton "Annuler"
const
idCancel
=
"cancel"
;
var
btnCancel
;
var
errorFormat
=
true
;
var
errorFormat
=
true
;
var
errorRemoveBackGround
=
true
;
var
errorRemoveBackGround
=
true
;
...
@@ -27,6 +31,8 @@ var unSeulVisage = false;
...
@@ -27,6 +31,8 @@ var unSeulVisage = false;
var
format_correct
=
false
;
var
format_correct
=
false
;
// SCRIPT ====================================================================================
// SCRIPT ====================================================================================
$
(
document
).
ready
(
function
(){
$
(
document
).
ready
(
function
(){
...
@@ -34,11 +40,16 @@ $(document).ready(function(){
...
@@ -34,11 +40,16 @@ $(document).ready(function(){
// console.log(inputFileUpload.val());
// console.log(inputFileUpload.val());
console
.
log
(
getParameter
(
window
.
location
.
href
));
console
.
log
(
getParameter
(
window
.
location
.
href
));
btnCustomFileUpload
=
$
(
"#"
+
idCustomFileUpload
);
btnCustomFileUpload
=
$
(
"#"
+
idCustomFileUpload
);
Img
=
$
(
"#"
+
ID
);
ImgBG
=
$
(
"#"
+
ID_bg
);
btnSubmit
=
$
(
"#"
+
idBtnSubmit
);
btnSubmit
=
$
(
"#"
+
idBtnSubmit
);
btnCancel
=
$
(
"#"
+
idCancel
);
Console
=
$
(
"#"
+
idConsole
);
Console
=
$
(
"#"
+
idConsole
);
//empêcher de valider si la photo n'est pas valide
//empêcher de valider si la photo n'est pas valide
inputFileUpload
.
change
(
function
(){
unSeulVisage
=
false
;
format_correct
=
false
});
inputFileUpload
.
change
(
function
(){
unSeulVisage
=
false
;
format_correct
=
false
});
//
requête pour les vérifications de sécurité
//
Requête pour les vérifications de sécurité & de format
$
(
"#form"
).
on
(
"submit"
,
function
(
event
)
{
$
(
"#form"
).
on
(
"submit"
,
function
(
event
)
{
event
.
preventDefault
();
event
.
preventDefault
();
var
formData
=
new
FormData
(
this
);
var
formData
=
new
FormData
(
this
);
...
@@ -94,15 +105,15 @@ $(document).ready(function(){
...
@@ -94,15 +105,15 @@ $(document).ready(function(){
});
});
//
Etape du choix de l'addresse
mail.
//
Récupération des données concernant l'étudiant & proposition des différentes addresses
mail.
studentId
=
getParameter
(
window
.
location
.
href
);
studentId
=
getParameter
(
window
.
location
.
href
);
$
.
ajax
({
$
.
ajax
({
url
:
URL_WEB_API
,
url
:
URL_WEB_API
,
method
:
'POST'
,
method
:
'POST'
,
data
:
'studentId='
+
studentId
,
data
:
'studentId='
+
studentId
,
dataType
:
"json"
dataType
:
"json"
})
})
.
done
(
function
(
response
){
.
done
(
function
(
response
){
// let data = JSON.stringify(response);
// let data = JSON.stringify(response);
// $("div#res").append(data);
// $("div#res").append(data);
let
data
=
response
;
let
data
=
response
;
...
@@ -139,6 +150,15 @@ $(document).ready(function(){
...
@@ -139,6 +150,15 @@ $(document).ready(function(){
$
(
"body"
).
append
(
`<h3>Votre adresse électronique sera
${
mail
}
, vous recevrez votre mot de passe dans les 24 heures.</h3>`
);
$
(
"body"
).
append
(
`<h3>Votre adresse électronique sera
${
mail
}
, vous recevrez votre mot de passe dans les 24 heures.</h3>`
);
}
}
})
})
//Lorsque l'utilisateur souhaite changer d'image
btnCancel
.
on
(
'click'
,
function
(){
unSeulVisage
=
false
;
format_correct
=
false
;
ImgBG
.
attr
(
'src'
,
""
);
Img
.
attr
(
'src'
,
""
);
$
(
"#li-oneface"
).
css
(
'color'
,
'black'
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment