dossiers: improve new contact form
This commit is contained in:
parent
789da8e4c6
commit
3a91ff5081
|
@ -206,6 +206,7 @@ class PatientContactForm(ModelForm):
|
|||
'twinning_rank': forms.TextInput(attrs={'size': 4}),
|
||||
'health_org': forms.TextInput(attrs={'size': 9}),
|
||||
'addresses': forms.CheckboxSelectMultiple(),
|
||||
'contact_comment': forms.Textarea(attrs={'rows': 2}),
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
|
|
@ -102,3 +102,9 @@ div#tabs-4 div div.buttons {
|
|||
#id_policyholder-contact_comment {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.ui-tabs .ui-tabs-nav li a {
|
||||
padding-left: 0.6em;
|
||||
padding-right: 0.6em;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,9 @@ function enable_button(button) {
|
|||
$button.removeAttr('disabled');
|
||||
}
|
||||
|
||||
function generic_ajaxform_dialog(url, title, id, width, btn_submit_name, redirectToUrl, on_load_callback) {
|
||||
function generic_ajaxform_dialog(url, title, id, width, btn_submit_name, redirectToUrl, on_load_callback, height) {
|
||||
if (! height)
|
||||
height = 'auto';
|
||||
$(id).load(url,
|
||||
function () {
|
||||
function onsuccess(response, status, xhr, form) {
|
||||
|
@ -54,6 +56,7 @@ function generic_ajaxform_dialog(url, title, id, width, btn_submit_name, redirec
|
|||
$(this).dialog({title: title,
|
||||
modal: true,
|
||||
width: width,
|
||||
height: height,
|
||||
buttons: [ { text: "Annuler",
|
||||
id: "close-btn",
|
||||
click: function() { $(this).dialog("close"); } },
|
||||
|
|
|
@ -164,7 +164,7 @@ function load_tab3_addresses() {
|
|||
});
|
||||
$('#new-contact-btn').click(function() {
|
||||
generic_ajaxform_dialog('contact/new', 'Ajouter un contact',
|
||||
'#ajax-dlg', '900px', 'Ajouter', null, nir_check);
|
||||
'#ajax-dlg', '900px', 'Ajouter', null, nir_check, 850);
|
||||
});
|
||||
$('.update-contact-btn').click(function() {
|
||||
generic_ajaxform_dialog('contact/' + $(this).data('id') + '/update', 'Modifier un contact',
|
||||
|
|
Reference in New Issue