diff --git a/module/story/js/create.ui.js b/module/story/js/create.ui.js index a9d0b3b391..f906938be2 100644 --- a/module/story/js/create.ui.js +++ b/module/story/js/create.ui.js @@ -77,3 +77,23 @@ window.setLane = function(e) $('#myPicker').picker(JSON.parse(lane)); }); }; + +let formSettingLabelClicked = false; +$(document).on('click', 'form.form-setting-form .row label.state', function() +{ + console.log(formSettingLabelClicked); + if(formSettingLabelClicked) return; + formSettingLabelClicked = true; + + let text = $(this).find('.text-clip').text(); + $('form.form-setting-form .row label.state').each(function() + { + if(text == langSource || text == langSourceNote) + { + $this = $(this); + if(text == langSource && langSourceNote == $this.find('.text-clip').text()) $this[0].click(); + if(text == langSourceNote && langSource == $this.find('.text-clip').text()) $this[0].click(); + } + }) + formSettingLabelClicked = false; +}); diff --git a/module/story/ui/create.html.php b/module/story/ui/create.html.php index c70bfa1bd1..b57ea26fea 100644 --- a/module/story/ui/create.html.php +++ b/module/story/ui/create.html.php @@ -108,6 +108,8 @@ $params = $app->getParams(); array_shift($params); jsVar('createParams', http_build_query($params)); jsVar('storyType', $type); +jsVar('langSource', $lang->story->source); +jsVar('langSourceNote', $lang->story->sourceNote); jsVar('feedbackSource', $config->story->feedbackSource); formGridPanel