Fix slug auto-population for translation with dash

This commit is contained in:
Sylvain BLOT 2018-01-15 12:12:22 +01:00 committed by GitHub
parent b677f43dca
commit 4ed78783e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,6 +4,7 @@ $(document).ready(function () {
var slugFollowsTitle = false;
$.each(langs, function (idx, lang_code) {
lang_code = lang_code.replace("-", "_");
$('#id_title_' + lang_code).on('focus', function () {
/* slug should only follow the title field if its value matched the title's value at the time of focus */
var currentSlug = $('#id_slug_' + lang_code).val();
@ -19,4 +20,4 @@ $(document).ready(function () {
});
});
}
});
});