svn-support: Add js on click handler to trigger Apache config genreation.
Th on click handler sends a POST to trigger the config file generation. On succes it displays a notification to the user.
This commit is contained in:
parent
6734ebac75
commit
30f00dc9fd
1 changed files with 13 additions and 1 deletions
|
|
@ -50,5 +50,17 @@ ${h.end_form()}
|
|||
if ($('.locked_input').children().hasClass('error-message')) {
|
||||
unlockpath();
|
||||
}
|
||||
})
|
||||
|
||||
/* On click handler for the `Generate Apache Config` button. It sends a
|
||||
POST request to trigger the (re)generation of the mod_dav_svn config. */
|
||||
$('#vcs_svn_generate_cfg').on('click', function(event) {
|
||||
event.preventDefault();
|
||||
var url = "${h.route_path('admin_settings_vcs_svn_generate_cfg')}";
|
||||
var jqxhr = $.post(url, {'csrf_token': CSRF_TOKEN});
|
||||
jqxhr.done(function(data) {
|
||||
$.Topic('/notifications').publish(data);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue