]> _ Git - fluidbook-html5.git/commitdiff
wip #2208 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 28 Sep 2018 13:23:09 +0000 (15:23 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 28 Sep 2018 13:23:09 +0000 (15:23 +0200)
js/libs/fluidbook/fluidbook.l10n.js
js/libs/fluidbook/forms/fluidbook.form.avery.js

index 1d683c9f8978083934e89b56f90f06680317ce8a..99f4639528a97d1410ec553b96353c2feb941109 100644 (file)
@@ -3,6 +3,7 @@ function FluidbookL10N(fluidbook, lang) {
     this.multilang = [];
     this.multilangEnabled = false;
     this.fluidbook = fluidbook;
+    this.currentLang;
     this.init(lang);
     this.initMultilang();
     this.load();
@@ -14,6 +15,11 @@ FluidbookL10N.prototype = {
             lang = 'default';
         }
         this.lang = lang;
+        if (this.lang === "default") {
+            this.currentLang = this.fluidbook.datas.defaultLang;
+        } else {
+            this.currentLang = this.lang;
+        }
     },
 
     load: function () {
index 08950ecd76412e949ab81e8971c17c11c770c75d..28ac83b9d681a59bc4f711b4eaf358f9943ffac9 100644 (file)
@@ -86,7 +86,7 @@ FluidbookAveryForm.prototype = {
         var view = '<div class="caption">' + $this.fluidbook.menu.closeButton() + '<h2>' + $this.locale.title + '</h2></div>';
         view += '<div class="content">';
         view += '<form class="avery-form" action="https://workshop.fluidbook.com/services/subscribe" method="post">';
-        view += '<div><input type="hidden" value="avery" name="form"><input type="hidden" value="' + this.fluidbook.l10n.lang + '" name="locale">';
+        view += '<div><input type="hidden" value="avery" name="form"><input type="hidden" value="' + this.fluidbook.l10n.currentLang + '" name="locale">';
         view += '<h3>' + this.locale.subtitle + '</h3>';
         view += '<div class="line">';
         view += '<label>' + $this.locale.company;
@@ -116,8 +116,8 @@ FluidbookAveryForm.prototype = {
         view += '<div class="line">';
         view += $this.locale.receive;
         view += '<div class="radios">';
-        view += '<label class="radio"><input type="radio" name="subscribe" value="0" required>' + $this.locale.yes + '</label>';
-        view += '<label class="radio"><input type="radio" name="subscribe" value="1" required>' + $this.locale.no + '</label>';
+        view += '<label class="radio"><input type="radio" name="subscribe" value="1" required>' + $this.locale.yes + '</label>';
+        view += '<label class="radio"><input type="radio" name="subscribe" value="0" required>' + $this.locale.no + '</label>';
         view += '</div>';
         view += '</div>';
         view += '<div class="line">';