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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt (-1 / +26 lines)
Lines 302-307 Link Here
302
                    }
302
                    }
303
                });
303
                });
304
            });
304
            });
305
            $("#savedesc").click(function(event){
306
                var newdescription = $(this).siblings('input[name="description"]').val();
307
                var batch_id = $(this).data('batch_id');
308
                var ajaxData = {
309
                    'newdescription': newdescription,
310
                    'batch_id': batch_id,
311
                    'card_element': "batch",
312
                    'creator': "patroncard",
313
                };
314
315
                $.ajax({
316
                    url: '/cgi-bin/koha/svc/creator_batches',
317
                    type: 'POST',
318
                    dataType: 'json',
319
                    data: ajaxData,
320
                })
321
322
                .done(function(data){
323
                    if (data.status == 'success') {
324
                        $("input[name='description']").text(data.newdesc);
325
                        $("#change-status").text(_("Saved"));
326
                    } else {
327
                        $("#change-status").text(_("Unable to save description"));
328
                    }
329
                });
330
            });
305
        });
331
        });
306
    </script>
332
    </script>
307
[% END %]
333
[% END %]
308
- 

Return to bug 15766