mirror of
https://github.com/cosmocode/dokuwiki-plugin-struct.git
synced 2025-08-13 13:37:20 +00:00
Confirm before deleting assignment
SPR-538
This commit is contained in:
@ -116,7 +116,7 @@ class admin_plugin_struct_assignments extends DokuWiki_Admin_Plugin {
|
|||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
echo '<td>' . hsc($assignee) . '</td>';
|
echo '<td>' . hsc($assignee) . '</td>';
|
||||||
echo '<td>' . hsc($schema) . '</td>';
|
echo '<td>' . hsc($schema) . '</td>';
|
||||||
echo '<td><a href="' . $link . '">'.$this->getLang('assign_del').'</a></td>';
|
echo '<td><a class="deleteSchema" href="' . $link . '">'.$this->getLang('assign_del').'</a></td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,4 +194,13 @@ jQuery(function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
jQuery('a.deleteSchema').click(function (event) {
|
||||||
|
var schema = jQuery(this).closest('tr').find('td:nth-child(2)').text();
|
||||||
|
var page = jQuery(this).closest('tr').find('td:nth-child(1)').text();
|
||||||
|
if(!window.confirm('Do you really want to delete the assignment of schema "' + schema + '" to page/namespace "' + page + '"?')) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user