Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

correction formulaire add_spending + nouvelle fonctionalité 'select all'

  • Loading branch information...
commit 3097764731f2206f410cf9a1161a023c35fef06e 1 parent 07b247c
@trecouvr authored
Showing with 11 additions and 2 deletions.
  1. +0 −1  res/header.css
  2. +11 −1 src/form/facture/form_new.opa
View
1  res/header.css
@@ -5,7 +5,6 @@
padding: 0;
width: 100%;
height: 128px;
- background-color: whiteSmoke;
}
#logo {
View
12 src/form/facture/form_new.opa
@@ -96,6 +96,15 @@ NewFactureForm = {{
)
/**
+ Select all group
+ */
+ select_all_group(users : list(User.ref)) : void =
+ List.iter(
+ user_ref -> Dom.set_value(#{id_implication(user_ref)}, "1"),
+ users
+ )
+
+ /**
Get form.
@param ref the reference of current group
@param edit a function to update a table of spendings
@@ -109,8 +118,9 @@ NewFactureForm = {{
{field_montant}
<br/>
{List.fold(user_ref,acc -> <>{acc}{field_implication(user_ref)}</>, users, <></>)}
- {WB.Button.make({button="Add" callback=process(ref, users, edit)}, [])}
</form>
+ {WB.Button.make({button="All Group" callback=(_e->select_all_group(users))}, [])}
+ {WB.Button.make({button="Add" callback=process(ref, users, edit)}, [])}
</>
)
}}
Please sign in to comment.
Something went wrong with that request. Please try again.