View | Details | Raw Unified | Return to bug 9303
Collapse All | Expand All

(-)a/installer/data/mysql/updatedatabase.pl (-8 / +11 lines)
Lines 9695-9716 if ( CheckVersion($DBversion) ) { Link Here
9695
$DBversion = "3.19.00.XXX";
9695
$DBversion = "3.19.00.XXX";
9696
if(CheckVersion($DBversion)) {
9696
if(CheckVersion($DBversion)) {
9697
    $dbh->do(q{
9697
    $dbh->do(q{
9698
        ALTER TABLE borrowers ADD privacy_guarantor_checkouts BOOLEAN NOT NULL DEFAULT '0'
9698
        ALTER TABLE borrowers ADD privacy_guarantor_checkouts BOOLEAN NOT NULL DEFAULT '0' AFTER privacy
9699
    });
9699
    });
9700
9700
    $dbh->do(q{
9701
    $dbh->do(q{
9701
        ALTER TABLE deletedborrowers ADD privacy_guarantor_checkouts BOOLEAN NOT NULL DEFAULT '0'
9702
        ALTER TABLE deletedborrowers ADD privacy_guarantor_checkouts BOOLEAN NOT NULL DEFAULT '0' AFTER privacy
9702
    });
9703
    });
9704
9703
    $dbh->do(q{
9705
    $dbh->do(q{
9704
        ALTER TABLE old_issues ADD issue_id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST
9706
        ALTER TABLE old_issues ADD issue_id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST
9705
    });
9707
    });
9708
9706
    $dbh->do(q{
9709
    $dbh->do(q{
9707
        ALTER TABLE issues ADD issue_id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST
9710
        ALTER TABLE old_issues CHANGE issue_id issue_id INT( 11 ) NOT NULL
9708
    });
9711
    });
9712
9709
    $dbh->do(q{
9713
    $dbh->do(q{
9710
        ALTER TABLE issues
9714
        ALTER TABLE issues ADD issue_id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST
9711
            DROP INDEX itemnumber_idx,
9712
            ADD UNIQUE itemnumber_idx ( itemnumber )
9713
    });
9715
    });
9716
9714
    $dbh->do(qq{
9717
    $dbh->do(qq{
9715
        UPDATE issues SET issue_id = issue_id + ( SELECT COUNT(*) FROM old_issues ) ORDER BY issue_id DESC
9718
        UPDATE issues SET issue_id = issue_id + ( SELECT COUNT(*) FROM old_issues ) ORDER BY issue_id DESC
9716
    });
9719
    });
Lines 9725-9731 if(CheckVersion($DBversion)) { Link Here
9725
    });
9728
    });
9726
9729
9727
    $dbh->do(q{
9730
    $dbh->do(q{
9728
        INSERT INTO systempreferences (variable, value, options, explanation, type )
9731
        INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type )
9729
        VALUES (
9732
        VALUES (
9730
            'AllowStaffToSetCheckoutsVisibilityForGuarantor',  '0', NULL,
9733
            'AllowStaffToSetCheckoutsVisibilityForGuarantor',  '0', NULL,
9731
            'If enabled, library staff can set a patron''s checkouts to be visible to linked patrons from the opac.',  'YesNo'
9734
            'If enabled, library staff can set a patron''s checkouts to be visible to linked patrons from the opac.',  'YesNo'
Lines 9733-9739 if(CheckVersion($DBversion)) { Link Here
9733
    });
9736
    });
9734
9737
9735
    $dbh->do(q{
9738
    $dbh->do(q{
9736
        INSERT INTO systempreferences (variable, value, options, explanation, type )
9739
        INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type )
9737
        VALUES (
9740
        VALUES (
9738
            'AllowPatronToSetCheckoutsVisibilityForGuarantor',  '0', NULL,
9741
            'AllowPatronToSetCheckoutsVisibilityForGuarantor',  '0', NULL,
9739
            'If enabled, the patron can set checkouts to be visible to  his or her guarantor',  'YesNo'
9742
            'If enabled, the patron can set checkouts to be visible to  his or her guarantor',  'YesNo'
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-16 / +15 lines)
Lines 442-447 Link Here
442
            [% END %]
442
            [% END %]
443
            <input id="guarantordelete" type="button" value="Delete" />
443
            <input id="guarantordelete" type="button" value="Delete" />
444
        </li>
444
        </li>
445
    [% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
446
        <li>
447
            <label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label>
448
            <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
449
                [% IF privacy_guarantor_checkouts %]
450
                    <option value="0">No</option>
451
                    <option value="1" selected>Yes</option>
452
                [% ELSE %]
453
                    <option value="0" selected>No</option>
454
                    <option value="1">Yes</option>
455
                [% END %]
456
            </select>
457
            <div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div>
458
        </li>
459
    [% END %]
445
        </ol>
460
        </ol>
446
    </fieldset>
461
    </fieldset>
447
462
Lines 1186-1206 Link Here
1186
			[% END %]
1201
			[% END %]
1187
	  [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
1202
	  [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
1188
		</li>
1203
		</li>
1189
        [% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
1190
            <li>
1191
                <label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label>
1192
                <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
1193
                    [% IF privacy_guarantor_checkouts %]
1194
                        <option value="0">No</option>
1195
                        <option value="1" selected>Yes</option>
1196
                    [% ELSE %]
1197
                        <option value="0" selected>No</option>
1198
                        <option value="1">Yes</option>
1199
                    [% END %]
1200
                </select>
1201
                <div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div>
1202
            </li>
1203
        [% END %]
1204
		</ol>
1204
		</ol>
1205
		</fieldset>
1205
		</fieldset>
1206
        [% END # hide fieldset %][% END %]
1206
        [% END # hide fieldset %][% END %]
1207
- 

Return to bug 9303