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

(-)a/installer/data/mysql/updatedatabase.pl (-8 / +11 lines)
Lines 9673-9694 if ( CheckVersion($DBversion) ) { Link Here
9673
$DBversion = "3.19.00.XXX";
9673
$DBversion = "3.19.00.XXX";
9674
if(CheckVersion($DBversion)) {
9674
if(CheckVersion($DBversion)) {
9675
    $dbh->do(q{
9675
    $dbh->do(q{
9676
        ALTER TABLE borrowers ADD privacy_guarantor_checkouts BOOLEAN NOT NULL DEFAULT '0'
9676
        ALTER TABLE borrowers ADD privacy_guarantor_checkouts BOOLEAN NOT NULL DEFAULT '0' AFTER privacy
9677
    });
9677
    });
9678
9678
    $dbh->do(q{
9679
    $dbh->do(q{
9679
        ALTER TABLE deletedborrowers ADD privacy_guarantor_checkouts BOOLEAN NOT NULL DEFAULT '0'
9680
        ALTER TABLE deletedborrowers ADD privacy_guarantor_checkouts BOOLEAN NOT NULL DEFAULT '0' AFTER privacy
9680
    });
9681
    });
9682
9681
    $dbh->do(q{
9683
    $dbh->do(q{
9682
        ALTER TABLE old_issues ADD issue_id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST
9684
        ALTER TABLE old_issues ADD issue_id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST
9683
    });
9685
    });
9686
9684
    $dbh->do(q{
9687
    $dbh->do(q{
9685
        ALTER TABLE issues ADD issue_id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST
9688
        ALTER TABLE old_issues CHANGE issue_id issue_id INT( 11 ) NOT NULL
9686
    });
9689
    });
9690
9687
    $dbh->do(q{
9691
    $dbh->do(q{
9688
        ALTER TABLE issues
9692
        ALTER TABLE issues ADD issue_id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST
9689
            DROP INDEX itemnumber_idx,
9690
            ADD UNIQUE itemnumber_idx ( itemnumber )
9691
    });
9693
    });
9694
9692
    $dbh->do(qq{
9695
    $dbh->do(qq{
9693
        UPDATE issues SET issue_id = issue_id + ( SELECT COUNT(*) FROM old_issues ) ORDER BY issue_id DESC
9696
        UPDATE issues SET issue_id = issue_id + ( SELECT COUNT(*) FROM old_issues ) ORDER BY issue_id DESC
9694
    });
9697
    });
Lines 9703-9709 if(CheckVersion($DBversion)) { Link Here
9703
    });
9706
    });
9704
9707
9705
    $dbh->do(q{
9708
    $dbh->do(q{
9706
        INSERT INTO systempreferences (variable, value, options, explanation, type )
9709
        INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type )
9707
        VALUES (
9710
        VALUES (
9708
            'AllowStaffToSetCheckoutsVisibilityForGuarantor',  '0', NULL,
9711
            'AllowStaffToSetCheckoutsVisibilityForGuarantor',  '0', NULL,
9709
            'If enabled, library staff can set a patron''s checkouts to be visible to linked patrons from the opac.',  'YesNo'
9712
            'If enabled, library staff can set a patron''s checkouts to be visible to linked patrons from the opac.',  'YesNo'
Lines 9711-9717 if(CheckVersion($DBversion)) { Link Here
9711
    });
9714
    });
9712
9715
9713
    $dbh->do(q{
9716
    $dbh->do(q{
9714
        INSERT INTO systempreferences (variable, value, options, explanation, type )
9717
        INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type )
9715
        VALUES (
9718
        VALUES (
9716
            'AllowPatronToSetCheckoutsVisibilityForGuarantor',  '0', NULL,
9719
            'AllowPatronToSetCheckoutsVisibilityForGuarantor',  '0', NULL,
9717
            'If enabled, the patron can set checkouts to be visible to  his or her guarantor',  'YesNo'
9720
            '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