Allow to generate random slugs

This commit is contained in:
Raphael Michel
2017-06-28 18:20:06 +02:00
parent 4bd0b96a2d
commit ea970be6f2
6 changed files with 38 additions and 2 deletions

View File

@@ -102,6 +102,15 @@ $(function () {
question_page_toggle_view();
}
// Event wizard
$("#event-slug-random-generate").click(function () {
var url = $(this).attr("data-rng-url");
$("#id_basics-slug").val("Generating...");
$.getJSON(url, function (data) {
$("#id_basics-slug").val(data.slug);
});
});
// Vouchers
$("#voucher-bulk-codes-generate").click(function () {
var num = $("#voucher-bulk-codes-num").val();

View File

@@ -151,3 +151,6 @@ pre.mail-preview {
width: 1% !important;
}
}
.input-group-btn .btn {
padding-bottom: 7px;
}