Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos-tav
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
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
agplv3
kohinos-tav
Commits
4e8f1b57
Commit
4e8f1b57
authored
Jul 21, 2023
by
Yvon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4719 - paiement pavé numérique - js WIP
parent
37ab7708
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
app.js
assets/js/app.js
+19
-0
No files found.
assets/js/app.js
View file @
4e8f1b57
...
@@ -511,6 +511,25 @@ $(function() {
...
@@ -511,6 +511,25 @@ $(function() {
$
(
"#code-visual"
).
text
(
"*"
.
repeat
(
code
.
length
));
$
(
"#code-visual"
).
text
(
"*"
.
repeat
(
code
.
length
));
});
});
$
(
"#code-digits-container"
).
addEventListener
(
'keydown'
,
function
(
e
)
{
// Get existing input
let
code
=
$
(
"#formEncaissement_payment_code"
).
val
();
if
((
e
.
key
>=
48
&&
e
.
key
<=
57
))
{
// Add button value
code
+=
e
.
key
-
48
;
}
else
if
(
e
.
key
>=
96
&&
e
.
key
<=
105
)
{
// Add button value
code
+=
e
.
key
-
96
;
}
else
if
(
e
.
key
==
8
)
{
// Remove last char of code
code
=
code
.
slice
(
0
,
-
1
);
}
$
(
"#formEncaissement_payment_code"
).
val
(
code
);
// Visual payment code representation
$
(
"#code-visual"
).
text
(
"*"
.
repeat
(
code
.
length
));
});
$
(
".payment-code-correction-button"
).
off
(
"click"
);
$
(
".payment-code-correction-button"
).
off
(
"click"
);
$
(
".payment-code-correction-button"
).
on
(
"click"
,
function
()
{
$
(
".payment-code-correction-button"
).
on
(
"click"
,
function
()
{
// Get existing input
// Get existing input
...
...
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