Commit c772725e by Félicie

first commit

parent 2e87daab
......@@ -59,7 +59,7 @@
font-weight: bold;
}
#existing_member_choice, #new_member_choice{
.member_choice{
border: 1px solid black;
width: 40%;
cursor: pointer;
......@@ -69,7 +69,8 @@
color: black;
padding: 1rem 1.5rem;
}
#existing_member_choice:hover, #new_member_choice:hover{
.member_choice:hover, .member_choice:hover{
background-color: #ccc;
}
......@@ -89,6 +90,10 @@
margin-bottom: 10px;
}
.choice_button_area input[type=radio] {
display: none;
}
#associate_area{
margin-bottom: 15px;
}
......
......@@ -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();
......@@ -611,8 +612,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 +623,16 @@ $('#add_binome').click(function() {
delete current_coop.is_associated_people;
delete current_coop.shift_template;
}
} else {
});
$('#add_binome').click(function() {
$('#associate_area').show();
$('input[name="choose_binome"]').prop('required',true);
$('.member_choice').removeClass('choice_active');
$('#existing_member_choice_action').hide();
$('#new_member_choice_action').hide();
associated_old_choice = null;
}
});
$('.member_choice').on('click', function() {
......
......@@ -80,16 +80,29 @@
{% 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 binome avec un.e membre existant.e
</div>
<label class="member_choice" id="existing_member_choice">
<input type="radio" name="choose_binome">
À mettre en binôme avec un.e membre existant.e
</label>
{% if ASSOCIATE_MEMBER_SHIFT %}
<div id="new_member_choice" class="member_choice">
A mettre en binome avec un.e nouveau membre
</div>
<label class="member_choice" id="new_member_choice">
<input type="radio" name="choose_binome">
À mettre en binôme avec un nouveau membre
</label>
{% endif %}
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment