Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
third-party
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
2
Merge Requests
2
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
cooperatic-foodcoops
third-party
Commits
d5b889ca
Commit
d5b889ca
authored
Oct 13, 2022
by
Yvon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move html out of js and write default message and signature if none provided
parent
39e18e62
Pipeline
#2434
passed with stage
in 1 minute 23 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
14 deletions
+32
-14
manage_makeups.js
members/static/js/admin/manage_makeups.js
+15
-12
manage_makeups.html
templates/members/admin/manage_makeups.html
+17
-2
No files found.
members/static/js/admin/manage_makeups.js
View file @
d5b889ca
...
...
@@ -150,15 +150,17 @@ function display_makeups_members() {
const
member
=
makeups_members
.
find
(
m
=>
m
.
id
==
member_id
);
let
modal_template
=
$
(
"#modal_decr_makeup_counter"
);
modal_template
.
find
(
".member_name"
).
text
(
member
.
name
);
openModal
(
`Enlever un rattrapage à
${
member
.
name
}
?
<br><br><label>Explication : </label><input class="" type="text" id="decr-explanation">
<br><br><label>Signature : </label><input class="" type="text" id="decr-signature">`
,
modal_template
.
html
(),
()
=>
{
update_members_makeups
(
[
member_id
],
"decrement"
,
$
(
"#decr-signature"
)[
0
].
value
+
' : '
+
$
(
"#decr-explanation"
)[
0
].
value
(
$
(
"#decr-signature"
)[
0
].
value
||
"pas d'explication"
)
+
' : '
+
(
$
(
"#decr-explanation"
)[
0
].
value
||
"auteur inconnu"
)
);
},
"Confirmer"
,
...
...
@@ -173,15 +175,17 @@ function display_makeups_members() {
const
member
=
makeups_members
.
find
(
m
=>
m
.
id
==
member_id
);
let
modal_template
=
$
(
"#modal_incr_makeup_counter"
);
modal_template
.
find
(
".member_name"
).
text
(
member
.
name
);
openModal
(
`Ajouter un rattrapage à
${
member
.
name
}
?
<br><br><label>Explication : </label><input class="" type="text" id="incr-explanation">
<br><br><label>Signature : </label><input class="" type="text" id="incr-signature">`
,
modal_template
.
html
(),
()
=>
{
update_members_makeups
(
[
member_id
],
"increment"
,
$
(
"#incr-signature"
)[
0
].
value
+
' : '
+
$
(
"#incr-explanation"
)[
0
].
value
(
$
(
"#incr-signature"
)[
0
].
value
||
"pas d'explication"
)
+
' : '
+
(
$
(
"#incr-explanation"
)[
0
].
value
||
"auteur inconnu"
)
);
},
"Confirmer"
,
...
...
@@ -210,14 +214,12 @@ function display_makeups_members() {
if
(
first_select
)
{
$
(
"#decrement_selected_members_makeups"
).
on
(
"click"
,
()
=>
{
openModal
(
`Enlever un rattrapage aux membres sélectionnés ?
<br><br><label>Explication : </label><input class="" type="text" id="decr-explanation">
<br><br><label>Signature : </label><input class="" type="text" id="decr-signature">`
,
$
(
"#modal_decr_selected_makeup_counter"
).
html
(),
()
=>
{
update_members_makeups
(
selected_rows
,
"decrement"
,
$
(
"#decr-signature"
)[
0
].
value
+
' : '
+
$
(
"#decr-explanation"
)[
0
].
value
(
$
(
"#decr-signature-selected"
)[
0
].
value
||
"pas d'explication"
)
+
' : '
+
(
$
(
"#decr-explanation-selected"
)[
0
].
value
||
"auteur inconnu"
)
);
},
"Confirmer"
,
...
...
@@ -237,6 +239,7 @@ function display_makeups_members() {
*
* @param {Array} member_ids
* @param {String} action increment | decrement
* @param description
*/
function
update_members_makeups
(
member_ids
,
action
,
description
)
{
openModal
();
...
...
templates/members/admin/manage_makeups.html
View file @
d5b889ca
...
...
@@ -54,9 +54,24 @@
</div>
</div>
</div>
<div
id=
"templates"
style=
"display:none;"
></div>
<div
id=
"templates"
style=
"display:none;"
>
<div
id=
"modal_incr_makeup_counter"
>
<p>
Ajouter un rattrapage à
<span
class=
"member_name"
></span>
?
</p>
<br><label
for=
"incr-explanation"
>
Explication :
</label><input
class=
""
type=
"text"
id=
"incr-explanation"
>
<br><br><label
for=
"incr-signature"
>
Signature :
</label><input
class=
""
type=
"text"
id=
"incr-signature"
>
</div>
<div
id=
"modal_decr_makeup_counter"
>
<p>
Enlever un rattrapage à
<span
class=
"member_name"
></span>
?
</p>
<br><label
for=
"decr-explanation"
>
Explication :
</label><input
class=
""
type=
"text"
id=
"decr-explanation"
>
<br><br><label
for=
"decr-signature"
>
Signature :
</label><input
class=
""
type=
"text"
id=
"decr-signature"
>
</div>
<div
id=
"modal_decr_selected_makeup_counter"
>
<p>
Enlever un rattrapage aux membres sélectionnés ?
</p>
<br><label
for=
"decr-explanation-selected"
>
Explication :
</label><input
class=
""
type=
"text"
id=
"decr-explanation-selected"
>
<br><br><label
for=
"decr-signature-selected"
>
Signature :
</label><input
class=
""
type=
"text"
id=
"decr-signature-selected"
>
</div>
</div>
</div>
<script
src=
'{% static "js/all_common.js" %}?v=1651853225'
></script>
...
...
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