0001-dossiers-notification-displayed-when-updates-done-on.patch
calebasse/dossiers/views.py | ||
---|---|---|
99 | 99 |
template_name = 'dossiers/patientcontact_new.html' |
100 | 100 |
success_url = '../../view#tab=2' |
101 | 101 | |
102 |
def form_valid(self, form): |
|
103 |
valid = super(UpdatePatientContactView, self).form_valid(form) |
|
104 |
messages.info(self.request, u'Modification enregistrée avec succès') |
|
105 |
return valid |
|
106 | ||
102 | 107 |
update_patient_contact = UpdatePatientContactView.as_view() |
103 | 108 | |
104 | 109 |
class DeletePatientContactView(cbv.DeleteView): |
calebasse/static/js/calebasse.dialog.js | ||
---|---|---|
17 | 17 |
$button.removeAttr('disabled'); |
18 | 18 |
} |
19 | 19 | |
20 |
function generic_ajaxform_dialog(url, title, id, width, btn_submit_name, redirectToUrl, on_load_callback, height, extra_button) { |
|
20 |
function generic_ajaxform_dialog(url, title, id, width, btn_submit_name, redirectToUrl, on_load_callback, height, extra_button, replace_content) {
|
|
21 | 21 |
if (! height) |
22 | 22 |
height = 'auto'; |
23 | 23 |
$(id).load(url, |
... | ... | |
33 | 33 |
$(id + ' form').ajaxForm({ |
34 | 34 |
success: onsuccess, |
35 | 35 |
}); |
36 |
} else if(replace_content) { |
|
37 |
$('body').html(parse); |
|
36 | 38 |
} else { |
37 | 39 |
if (redirectToUrl) { |
38 | 40 |
if (redirectToUrl.indexOf('#') == 0) { |
calebasse/static/js/calebasse.dossiers.js | ||
---|---|---|
227 | 227 |
}); |
228 | 228 |
$('.update-contact-btn').click(function() { |
229 | 229 |
generic_ajaxform_dialog('contact/' + $(this).data('id') + '/update', 'Modifier un contact', |
230 |
'#ajax-dlg', '800px', 'Modifier', null, nir_check); |
|
230 |
'#ajax-dlg', '800px', 'Modifier', null, nir_check, null, null, true);
|
|
231 | 231 |
}); |
232 | 232 |
$('.del-contact').click(function() { |
233 | 233 |
generic_ajaxform_dialog('contact/' + $(this).data('id') + '/del?address=' + $(this).data('address-id'), |
... | ... | |
239 | 239 |
}); |
240 | 240 |
$('.update-address-btn').click(function() { |
241 | 241 |
generic_ajaxform_dialog('address/' + $(this).data('id') + '/update', 'Modifier une adresse', |
242 |
'#ajax-dlg', '600px', 'Modifier'); |
|
242 |
'#ajax-dlg', '600px', 'Modifier', null, null, null, null, true);
|
|
243 | 243 |
}); |
244 | 244 |
$('.del-address').click(function() { |
245 | 245 |
generic_ajaxform_dialog('address/' + $(this).data('id') + '/del', 'Supprimer une addresse', |
246 |
- |