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

(-)a/api/v1/swagger/paths/items.yaml (+4 lines)
Lines 308-313 Link Here
308
        description: Bad parameter
308
        description: Bad parameter
309
        schema:
309
        schema:
310
          $ref: "../swagger.yaml#/definitions/error"
310
          $ref: "../swagger.yaml#/definitions/error"
311
      "409":
312
        description: Conflict in creating resource
313
        schema:
314
          $ref: "../swagger.yaml#/definitions/error"
311
      "401":
315
      "401":
312
        description: Authentication required
316
        description: Authentication required
313
        schema:
317
        schema:
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-2 / +5 lines)
Lines 1978-1983 Link Here
1978
                          var response = data.responseJSON;
1978
                          var response = data.responseJSON;
1979
                          if ( response.error_code === 'already_bundled' ) {
1979
                          if ( response.error_code === 'already_bundled' ) {
1980
                              $('#addResult').replaceWith('<div id="addResult" class="alert alert-warning">'+_("Warning: Item '%s' already attached").format(barcode)+'</div>');
1980
                              $('#addResult').replaceWith('<div id="addResult" class="alert alert-warning">'+_("Warning: Item '%s' already attached").format(barcode)+'</div>');
1981
                          } else if (response.error_code === 'bundle_checkout_out') {
1982
                              $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Bundle is currently checked out")+'</div>');
1981
                          } else if (response.error_code === 'checked_out') {
1983
                          } else if (response.error_code === 'checked_out') {
1982
                              const button = $('<button type="button">')
1984
                              const button = $('<button type="button">')
1983
                                .addClass('btn btn-xs')
1985
                                .addClass('btn btn-xs')
Lines 2091-2097 Link Here
2091
                            var barcode = $('#rm_external_id').val();
2093
                            var barcode = $('#rm_external_id').val();
2092
                            if ( data.status === 409 ) {
2094
                            if ( data.status === 409 ) {
2093
                                var response = data.responseJSON;
2095
                                var response = data.responseJSON;
2094
                                if ( response.key === "PRIMARY" ) {
2096
                                if (response.error_code === 'bundle_checkout_out') {
2097
                                    $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failure: Bundle is currently checked out")+'</div>');
2098
                                } else if ( response.key === "PRIMARY" ) {
2095
                                    $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-warning">'+_("Warning: Item '%s' already attached").format(barcode)+'</div>');
2099
                                    $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-warning">'+_("Warning: Item '%s' already attached").format(barcode)+'</div>');
2096
                                } else {
2100
                                } else {
2097
                                    $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'</div>');
2101
                                    $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'</div>');
2098
- 

Return to bug 33817