Customize add_contribution_modal title and submit button label on add/edit
This commit is contained in:
parent
936a009ced
commit
2eeb45c6a6
1 changed files with 4 additions and 0 deletions
|
@ -204,6 +204,8 @@ on_show_add_contribution_modal=function(e) {
|
||||||
on_click_add_contribution_btn=function() {
|
on_click_add_contribution_btn=function() {
|
||||||
$('#add_contribution_modal #group_name')[0].value=$('#view-group #group_name')[0].value;
|
$('#add_contribution_modal #group_name')[0].value=$('#view-group #group_name')[0].value;
|
||||||
$('#add_contribution_modal #edit_id')[0].value='-1';
|
$('#add_contribution_modal #edit_id')[0].value='-1';
|
||||||
|
$($('#add_contribution_modal h4')[0]).html('Ajouter une contribution');
|
||||||
|
$($('#add_contribution_modal #add_contribution_submit')[0]).html('Ajouter');
|
||||||
$('#add_contribution_modal').modal('show');
|
$('#add_contribution_modal').modal('show');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,6 +287,8 @@ on_confirm_contribution_delete=function(data) {
|
||||||
on_contribution_edit_btn_click=function(e) {
|
on_contribution_edit_btn_click=function(e) {
|
||||||
var group=groups[$('#view-group #group_name')[0].value];
|
var group=groups[$('#view-group #group_name')[0].value];
|
||||||
$('#add_contribution_modal #group_name')[0].value=$('#view-group #group_name')[0].value;
|
$('#add_contribution_modal #group_name')[0].value=$('#view-group #group_name')[0].value;
|
||||||
|
$($('#add_contribution_modal h4')[0]).html('Editer une contribution');
|
||||||
|
$($('#add_contribution_modal #add_contribution_submit')[0]).html('Valider');
|
||||||
contribution_id=$($(e.target).parents('div')[0]).data('id');
|
contribution_id=$($(e.target).parents('div')[0]).data('id');
|
||||||
contribution=group.contributions[contribution_id];
|
contribution=group.contributions[contribution_id];
|
||||||
$('#add_contribution_modal #add_contribution_contributor_name')[0].value=contribution.contributor.name;
|
$('#add_contribution_modal #add_contribution_contributor_name')[0].value=contribution.contributor.name;
|
||||||
|
|
Loading…
Reference in a new issue