mirror of
https://github.com/Hopiu/wagtail-modeltranslation.git
synced 2026-05-15 02:33:17 +00:00
Merge pull request #164 from sylvainblot/patch-1
Fix slug auto-population for translation with dash
This commit is contained in:
commit
f8c3dd369f
1 changed files with 2 additions and 1 deletions
|
|
@ -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 () {
|
|||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue