Commit 961169e3 authored by Robert Lyon's avatar Robert Lyon Committed by Jono Mingard
Browse files

Bug 1508204: Can remove tagged blog options in modal

Stops the modal from being closed when clicking on the 'x' on the tag

behatnotneeded: will add behat test is subpatch as there needs to be a
new step added

Change-Id: I8c1589fb708e654ca3200e1893ed25def19a5a3d
Signed-off-by: Robert Lyon's avatarRobert Lyon <>
(cherry picked from commit 6cfee3c6)
parent d09ba0a1
......@@ -392,6 +392,32 @@ EOF;
public static function get_instance_config_javascript(BlockInstance $instance) {
return <<<EOF
jQuery(function($) {
$('#instconf_tagselect').on('change', function() {
function updatetagbuttons() {
$('#instconf_tagselect_container ul button').on('click', function(e) {
var li = $(this).parent();
var val = $('#instconf_tagselect').select2('val');
var index = val.indexOf(li[0].title);
if (index > -1) {
val.splice(index, 1);
$('#instconf_tagselect').select2('val', val);
public static function instance_config_validate($form, $values) {
if (empty($values['tagselect'])) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment