@@ -, +, @@ - Enable an adult to have a guarantor; - Shows guarantees' fines in the guarantor's page; - Transfer some guarantor's information to the guarantee while creating a new patron or adding a guarantiee; - Transfer guarantor's alternate address/contact to the guarantee while creating a new patron or adding a guarantiee. - Enable an adult to have a guarantor: - Shows guarantees' fines in the guarantor's page: - Transfer some guarantor's information to the guarantee while adding a guarantiee: - Transfer some guarantor's information to the guarantee while creating a new patron - Transfer some guarantor's information to the guarantee while adding a guarantiee: - Transfer guarantor's alternate address/contact to the guarantee while creating a new patron: - Transfer guarantor's alternate address/contact to the guarantee while adding a guarantiee: --- installer/data/mysql/sysprefs.sql | 1 + .../prog/en/includes/members-toolbar.inc | 2 +- .../prog/en/modules/admin/preferences/patrons.pref | 5 ++++ .../prog/en/modules/members/guarantor_search.tt | 33 +++++++++++++++++++++- .../prog/en/modules/members/memberentrygen.tt | 7 ++--- .../prog/en/modules/members/moremember.tt | 17 +++++++++-- members/guarantor_search.pl | 23 +++++++++++++-- members/memberentry.pl | 14 +++++---- members/moremember.pl | 22 +++++++++------ 9 files changed, 100 insertions(+), 24 deletions(-) --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -5,6 +5,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'), ('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'), ('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'), +('AdditionalGuarantorField','',NULL,'Additional fields name to be transfer from guarantor to guarantee.','free'), ('AddPatronLists','categorycode','categorycode|category_type','Allow user to choose what list to pick up from when adding patrons','Choice'), ('advancedMARCeditor','0','','If ON, the MARC editor won\'t display field/subfield descriptions','YesNo'), ('AdvancedSearchLanguages','','','ISO 639-2 codes of languages you wish to see appear as an Advanced search option. Example: eng|fre|ita','Textarea'), --- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc @@ -110,7 +110,7 @@ function searchToHold(){ [% IF ( CAN_user_borrowers ) %] [% IF ( adultborrower AND activeBorrowerRelationship ) %] - Add child + Add guarantiee [% END %] [% IF ( CAN_user_borrowers ) %] Change password --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref @@ -138,3 +138,8 @@ Patrons: - pref: CardnumberLength - "characters long. The length can be a single number to specify an exact length, a range separated by a comma (i.e., 'Min,Max'), or a maximum with no minimum (i.e., ',Max')." - "If 'cardnumber' is included in the BorrowerMandatoryField list, the minimum length, if not specified here, defaults to one." + - + - "These additional following database columns will be transferred from guarantor to guarantee:" + - pref: AdditionalGuarantorField + class: multi + - (separate columns with |) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/guarantor_search.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/guarantor_search.tt @@ -18,6 +18,20 @@ var zipcode = $('#' + id + 'zipcode').text(); var country = $('#' + id + 'country').text(); var branchcode = $('#' + id + 'branchcode').text(); + var phone = $('#' + id + 'phone').text(); + var phonepro = $('#' + id + 'phonepro').text(); + var mobile = $('#' + id + 'mobile').text(); + var email = $('#' + id + 'email').text(); + var emailpro = $('#' + id + 'emailpro').text(); + var fax = $('#' + id + 'fax').text(); + + $('.' + id + 'extra_field').each(function() { + var spanId = $(this).attr('id'); + spanId = spanId.replace(id,''); + var spanElement = window.opener.document.getElementById(spanId); + if (spanElement) + window.opener.document.getElementById(spanId).value = $(this).text(); + }); var $ = window.opener.$; var form = $('#entryform').get(0); @@ -48,6 +62,12 @@ form.zipcode.value = zipcode; form.country.value = country; form.branchcode.value = branchcode; + form.phone.value = phone; + form.phonepro.value = phonepro; + form.mobile.value = mobile; + form.email.value = email; + form.emailpro.value = emailpro; + form.fax.value = fax; form.guarantorsearch.value = 'Change'; self.close(); @@ -103,7 +123,18 @@ [% zipcode %] [% country %] [% branchcode %] - + [% phone %] + [% phonepro %] + [% mobile %] + [% email %] + [% emailpro %] + [% fax %] + + [% FOREACH extrafield IN extrafields %] + [% extrafield.value %] + [% END %] + +
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -383,7 +383,6 @@ [% END %] [% ELSE %] - [% IF ( C ) %] [% IF ( guarantorid ) %]
  • [% ELSE %] @@ -401,9 +400,8 @@ [% END %]
  • - [% END %] - [% UNLESS nocontactfirstname %] -
  • + [% UNLESS nocontactfirstname %] +
  • [% IF ( guarantorid ) %] [% contactfirstname %] @@ -1275,6 +1273,7 @@
  • + [% IF ( patron_attribute.use_dropdown ) %]