Bug 7878 - When duplicating a patron too many fields carrying over
When duplicating a patron the resulting entry form contains the data from the original patron in the following fields: Other names, Initials, Gender, OPAC note, Staff note, and expiration date. These should be blank for a new duplicated patron. This patch corrects this. To test, locate or create a patron record which contains data in the fields listed above. Duplicate that patron and confirm that those fields are blank in the resulting patron entry form. Confirm also that editing an existing patron with data in those fields works correctly. Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
0f92fbbb0c
commit
f9c4d6a596
1 changed files with 29 additions and 22 deletions
|
@ -317,7 +317,7 @@
|
|||
<label for="initials">
|
||||
[% END %]
|
||||
Initials: </label>
|
||||
<input type="text" id="initials" name="initials" size="20" value="[% initials %]" class="[% focusAction %]" />
|
||||
<input type="text" id="initials" name="initials" size="20" value="[% IF ( opduplicate ) %][% ELSE %][% initials %][% END %]" class="[% focusAction %]" />
|
||||
[% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
|
||||
</li>
|
||||
[% END %]
|
||||
|
@ -330,7 +330,7 @@
|
|||
<label for="othernames">
|
||||
[% END %]
|
||||
Other name: </label>
|
||||
<input type="text" id="othernames" name="othernames" size="20" value="[% othernames %]" class="[% focusAction %]" />
|
||||
<input type="text" id="othernames" name="othernames" size="20" value="[% IF ( opduplicate ) %][% ELSE %][% othernames %][% END %]" class="[% focusAction %]" />
|
||||
[% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
|
||||
[% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
|
||||
</li>
|
||||
|
@ -338,22 +338,29 @@
|
|||
[% UNLESS ( I ) %]
|
||||
[% UNLESS nosex %]
|
||||
<li class="radio">
|
||||
|
||||
[% IF ( female ) %]
|
||||
<label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" checked="checked" />
|
||||
[% ELSE %]
|
||||
<label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
|
||||
[% END %]
|
||||
[% IF ( male ) %]
|
||||
<label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" checked="checked" />
|
||||
[% ELSE %]
|
||||
<label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
|
||||
[% END %]
|
||||
[% IF ( none ) %]
|
||||
<label for="sex-none">N/A </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
|
||||
[% ELSE %]
|
||||
<label for="sex-none">N/A </label><input type="radio" name="sex" id="sex-none" value="" />
|
||||
[% END %]
|
||||
|
||||
[% UNLESS ( opduplicate ) %]
|
||||
[% IF ( female ) %]
|
||||
<label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" checked="checked" />
|
||||
[% ELSE %]
|
||||
<label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
|
||||
[% END %]
|
||||
[% IF ( male ) %]
|
||||
<label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" checked="checked" />
|
||||
[% ELSE %]
|
||||
<label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
|
||||
[% END %]
|
||||
[% IF ( none ) %]
|
||||
<label for="sex-none">N/A </label><input type="radio" name="sex" id="sex-none" value="" checked="checked" />
|
||||
[% ELSE %]
|
||||
<label for="sex-none">N/A </label><input type="radio" name="sex" id="sex-none" value="" />
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
<label for="sex-female">Female </label><input type="radio" name="sex" id="sex-female" value="F" />
|
||||
<label for="sex-male">Male </label><input type="radio" name="sex" id="sex-male" value="M" />
|
||||
<label for="sex-none">N/A </label><input type="radio" name="sex" id="sex-none" value="" />
|
||||
[% END %]
|
||||
|
||||
</li>
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
@ -1022,13 +1029,13 @@
|
|||
Expiry date (leave blank for auto calc) </label>
|
||||
[% IF ( dateformat == "metric" ) %]
|
||||
[% UNLESS ( opadd ) %]
|
||||
<input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" value="[% dateexpiry %]" class="datepickerto" />
|
||||
<input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" value="[% IF ( opduplicate ) %][% ELSE %][% dateexpiry %][% END %]" class="datepickerto" />
|
||||
[% ELSE %]
|
||||
<input type="text" id="to" name="dateexpiry" maxlength="10" size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" class="datepickerto" />
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
[% UNLESS ( opadd ) %]
|
||||
<input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry %]" class="datepickerto" />
|
||||
<input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% IF ( opduplicate ) %][% ELSE %][% dateexpiry %][% END %]" class="datepickerto" />
|
||||
[% ELSE %]
|
||||
<input type="text" id="to" name="dateexpiry" maxlength="10" size="10" class="datepickerto" />
|
||||
[% END %]
|
||||
|
@ -1045,7 +1052,7 @@
|
|||
<label for="opacnote">
|
||||
[% END %]
|
||||
OPAC note: </label>
|
||||
<textarea id="opacnote" name="opacnote" cols="55" rows="5">[% opacnote %]</textarea>
|
||||
<textarea id="opacnote" name="opacnote" cols="55" rows="5">[% IF ( opduplicate ) %][% ELSE %][% opacnote %][% END %]</textarea>
|
||||
<div class="hint">This message appears on this patron's user page in the OPAC</div>
|
||||
[% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
|
||||
</li>
|
||||
|
@ -1058,7 +1065,7 @@
|
|||
<label for="borrowernotes">
|
||||
[% END %]
|
||||
Circulation note: </label>
|
||||
<textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% borrowernotes %]</textarea>
|
||||
<textarea id="borrowernotes" name="borrowernotes" cols="55" rows="5">[% IF ( opduplicate ) %][% ELSE %][% borrowernotes %][% END %]</textarea>
|
||||
<div class="hint">This message displays when checking out to this patron</div>
|
||||
[% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
|
||||
</li>
|
||||
|
|
Loading…
Reference in a new issue