MDL-62500 tag: Update checkbox label when updating tag
authorAndrew Nicols <andrew@nicols.co.uk>
Sun, 20 May 2018 07:14:50 +0000 (15:14 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Sun, 20 May 2018 07:14:50 +0000 (15:14 +0800)
lib/amd/build/tag.min.js
lib/amd/src/tag.js

index 586dcbc..ab06031 100644 (file)
Binary files a/lib/amd/build/tag.min.js and b/lib/amd/build/tag.min.js differ
index 8e546f5..1f1d3fb 100644 (file)
@@ -67,6 +67,11 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/notification', 'core/str'
 
             // Set cell 'time modified' to 'now' when any of the element is updated in this row.
             $('body').on('updated', '[data-inplaceeditable]', function(e) {
+                str.get_string('selecttag', 'core_tag', e.ajaxreturn.value)
+                    .then(function(s) {
+                        return $('label[for="tagselect' + e.ajaxreturn.itemid + '"]').html(s);
+                    })
+                    .fail(notification.exception);
                 str.get_string('now').done(function(s) {
                     $(e.target).closest('tr').find('td.col-timemodified').html(s);
                 });