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
71e4b8bb
Commit
71e4b8bb
authored
Oct 07, 2022
by
Damien Moulard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '3867-ratio-button-binome-option' into 'dev_cooperatic'
3867-ratio-button-binome-option See merge request
!201
parents
39cc880f
862824e7
Pipeline
#2418
passed with stage
in 1 minute 24 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
7 deletions
+37
-7
inscriptions.js
members/static/js/inscriptions.js
+24
-4
inscriptions.html
templates/members/inscriptions.html
+13
-3
No files found.
members/static/js/inscriptions.js
View file @
71e4b8bb
...
...
@@ -127,6 +127,7 @@ function create_new_coop() {
$
(
'.chosen_associate_area'
).
hide
();
$
(
'.member_choice'
).
removeClass
(
'choice_active'
);
$
(
".remove_binome_icon"
).
on
(
"click"
,
hide_chosen_associate
);
$
(
'input[name="binome"]'
).
prop
(
'checked'
,
false
);
local_in_process
=
getLocalInProcess
();
if
(
getLocalInProcess
().
length
>
0
)
{
empty_waiting_local_processes
();
...
...
@@ -268,6 +269,21 @@ function store_new_coop(event) {
}
}
if
(
$
(
'#associate_area'
).
is
(
':visible'
))
{
// If user choose yes for binome, a type of association must be selected
let
associated_data_selected
=
false
;
if
(
(
$
(
active_asso_area
[
0
]).
attr
(
'id'
)
===
"new_member_choice"
)
||
(
$
(
active_asso_area
[
0
]).
attr
(
'id'
)
===
"existing_member_choice"
)
)
{
associated_data_selected
=
true
;
}
if
(
associated_data_selected
===
false
)
errors
.
push
(
"Un des deux choix concernant la mise en binôme doit être sélectionné"
);
}
if
(
active_asso_area
.
length
>
0
)
{
// If user click as if a "binôme" is beeing created, data about parent member must exist
let
associated_data_ok
=
false
;
...
...
@@ -279,6 +295,9 @@ function store_new_coop(event) {
(
$
(
active_asso_area
[
0
]).
attr
(
'id'
)
===
"existing_member_choice"
&&
$
(
'#existing_member_choice_action .chosen_associate div.member'
).
length
>
0
)
)
{
associated_data_ok
=
true
;
}
else
if
(
$
(
active_asso_area
[
0
]).
attr
(
'id'
)
===
""
)
{
associated_data_ok
=
false
;
errors
.
push
(
"Un des deux choix doit être sélectionné"
);
}
if
(
associated_data_ok
===
false
)
errors
.
push
(
"Le membre 'titulaire' du binôme n'est pas défini"
);
}
...
...
@@ -611,8 +630,7 @@ $('#coop_create').submit(store_new_coop);
$
(
'#generate_email'
).
click
(
generate_email
);
$
(
'#odoo_user_connect'
).
click
();
$
(
'#add_binome'
).
click
(
function
()
{
if
(
$
(
'#associate_area'
).
is
(
':visible'
))
{
$
(
'#no_binome'
).
click
(
function
()
{
$
(
'#associate_area'
).
hide
();
$
(
'#new_member_input'
).
val
(
''
);
$
(
'#associate_area .choice_active'
).
removeClass
(
"choice_active"
);
...
...
@@ -623,13 +641,15 @@ $('#add_binome').click(function() {
delete
current_coop
.
is_associated_people
;
delete
current_coop
.
shift_template
;
}
}
else
{
});
$
(
'#add_binome'
).
click
(
function
()
{
$
(
'#associate_area'
).
show
();
$
(
'.member_choice'
).
removeClass
(
'choice_active'
);
$
(
'#existing_member_choice_action'
).
hide
();
$
(
'#new_member_choice_action'
).
hide
();
associated_old_choice
=
null
;
}
});
$
(
'.member_choice'
).
on
(
'click'
,
function
()
{
...
...
templates/members/inscriptions.html
View file @
71e4b8bb
...
...
@@ -80,15 +80,25 @@
{% endif %}
{% if can_create_binome %}
<p
id=
"add_binome"
>
+ Binomes (facultatif)
</p>
<div>
Voulez-vous mettre la personne en binôme ?
</div>
<label>
<input
type=
"radio"
name=
"binome"
id=
"no_binome"
required
>
Non
</label><br>
<label>
<input
type=
"radio"
name=
"binome"
id=
"add_binome"
required
>
Oui
</label><br>
<div
id=
"associate_area"
style=
"display:none;"
>
<div
class=
"choice_button_area d-flex"
>
<div
id=
"existing_member_choice"
class=
"member_choice"
>
A mettre en bin
o
me avec un.e membre existant.e
A mettre en bin
ô
me avec un.e membre existant.e
</div>
{% if ASSOCIATE_MEMBER_SHIFT %}
<div
id=
"new_member_choice"
class=
"member_choice"
>
A mettre en bin
ome avec un.e
nouveau membre
A mettre en bin
ôme avec un
nouveau membre
</div>
{% endif %}
</div>
...
...
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