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

(-)a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss (+7 lines)
Lines 146-151 textarea { Link Here
146
    width: 50%;
146
    width: 50%;
147
}
147
}
148
148
149
.help-block {
150
    display: block;
151
    margin-top: 5px;
152
    margin-bottom: 10px;
153
    color: #737373;
154
}
155
149
legend {
156
legend {
150
    color: #727272;
157
    color: #727272;
151
    font-size: 110%;
158
    font-size: 110%;
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/modals/catalog_concern.inc (+28 lines)
Line 0 Link Here
1
<!-- Add concern modal -->
2
<div class="modal" id="addConcernModal" tabindex="-1" role="dialog" aria-labelledby="addConcernModalLabel" aria-hidden="true">
3
    <div class="modal-dialog">
4
        <div class="modal-content">
5
            <div class="modal-header">
6
                <h3 class="modal-title" id="addConcernModalLabel">Report a concern</h3>
7
                <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close">
8
                    <span aria-hidden="true">&times;</span>
9
                </button>
10
            </div>
11
            <div class="modal-body">
12
                <fieldset id="concern_fieldset">
13
                    <div class="form-group">
14
                        <label for="message">Please decribe your concerns: </label>
15
                        <textarea class="form-control" name="message" id="message_add" aria-describedby="helpBlock" required="required"></textarea>
16
                        <p id="helpBlock" class="help-block">A short summary of what the library policy is for dealing with such concerns and what constitutes a valid concern</p>
17
                    </div>
18
                </fieldset>
19
            </div>
20
            <div class="modal-footer">
21
                <input type="hidden" name="biblio_id" id="biblio_add" value="[% biblio.biblionumber | html %]">
22
                <input type="hidden" name="reporter_id" id="reporter_add" value="[% borrowernumber | html %]">
23
                <button type="submit" id="addConfirm" class="btn btn-primary">Submit</button>
24
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
25
            </div>
26
        </div>
27
    </div>
28
</div>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc (+4 lines)
Lines 42-47 Link Here
42
        <li><a class="suggest_for_purchase btn btn-link btn-lg" href="/cgi-bin/koha/opac-suggestions.pl?op=add&biblionumber=[% biblio.biblionumber | url %]"><i class="fa fa-fw fa-gift" aria-hidden="true"></i> Suggest for purchase</a></li>
42
        <li><a class="suggest_for_purchase btn btn-link btn-lg" href="/cgi-bin/koha/opac-suggestions.pl?op=add&biblionumber=[% biblio.biblionumber | url %]"><i class="fa fa-fw fa-gift" aria-hidden="true"></i> Suggest for purchase</a></li>
43
    [% END %]
43
    [% END %]
44
44
45
    [% IF Koha.Preference('OpacCatalogConcerns') %]
46
        <li><a class="report_a_concern btn btn-link btn-lg" href="#" data-toggle="modal" data-target="#addConcernModal"><i class="fa fa-fw fa-warning" aria-hidden="true"></i> Report a concern</a></li>
47
    [% END %]
48
45
    [% IF ( OpacHighlightedWords && query_desc ) %]
49
    [% IF ( OpacHighlightedWords && query_desc ) %]
46
    <li>
50
    <li>
47
        <a href="#" class="highlight_toggle btn btn-link btn-lg" id="highlight_toggle_off"><i class="fa fa-fw fa-pencil" aria-hidden="true"></i> Unhighlight</a>
51
        <a href="#" class="highlight_toggle btn btn-link btn-lg" id="highlight_toggle_off"><i class="fa fa-fw fa-pencil" aria-hidden="true"></i> Unhighlight</a>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (+7 lines)
Lines 1434-1440 Link Here
1434
    </div> <!-- /.modal-dialog -->
1434
    </div> <!-- /.modal-dialog -->
1435
</div> <!-- /.modal -->
1435
</div> <!-- /.modal -->
1436
1436
1437
[% IF Koha.Preference('OpacCatalogConcerns') %]
1438
    [% INCLUDE 'modals/catalog_concern.inc' %]
1439
[% END %]
1440
1437
[% BLOCK jsinclude %]
1441
[% BLOCK jsinclude %]
1442
    [% IF Koha.Preference('OpacCatalogConcerns') %]
1443
        [% Asset.js("js/modals/catalog_concern.js") | $raw %]
1444
    [% END %]
1438
    [% INCLUDE 'datatables.inc' %]
1445
    [% INCLUDE 'datatables.inc' %]
1439
    [% INCLUDE 'columns_settings.inc' %]
1446
    [% INCLUDE 'columns_settings.inc' %]
1440
    [% INCLUDE greybox.inc %]
1447
    [% INCLUDE greybox.inc %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/modals/catalog_concern.js (-1 / +23 lines)
Line 0 Link Here
0
- 
1
$(document).ready(function() {
2
    $('#addConcernModal').on('click', '#addConfirm', function(e) {
3
        let reporter_id = $('#reporter_add').val();
4
        let biblio_id = $('#biblio_add').val();
5
        let message = $('#message_add').val();
6
7
        params = {
8
            message: message,
9
            biblio_id: biblio_id,
10
            reporter_id: reporter_id,
11
        };
12
13
        $.ajax({
14
            url: '/api/v1/public/catalog/concerns',
15
            type: 'POST',
16
            data: JSON.stringify(params),
17
            success: function(data) {
18
                $('#addConcernModal').modal('hide');
19
            },
20
            contentType: "json"
21
        });
22
    });
23
});

Return to bug 31028