]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tpl/default/configure.html
Merge pull request #830 from ArthurHoaro/theme/timezone
[github/shaarli/Shaarli.git] / tpl / default / configure.html
index 2f54a0851157ff01d37903fbf8878924936a0cff..7469ab597a69ab4cb468a43e0b8fb6e7d6a0cb98 100644 (file)
@@ -55,7 +55,7 @@
         </div>
         <div class="pure-u-lg-{$ratioInput} pure-u-1">
           <div class="form-input">
-            <select name="theme" id="theme">
+            <select name="theme" id="theme" class="align">
               {loop="$theme_available"}
                 <option value="{$value}"
                   {if="$value===$theme"}
         <div class="pure-u-lg-{$ratioLabel} pure-u-1 ">
           <div class="form-label">
             <label>
-              <span class="label-name">{'Timezone'|t}</span>
+              <span class="label-name">{'Timezone'|t}</span><br>
+              <span class="label-desc">{'Continent'|t} &middot; {'City'|t}</span>
             </label>
           </div>
         </div>
         <div class="pure-u-lg-{$ratioInput} pure-u-1 ">
           <div class="form-input">
-            {ignore}FIXME! too hackish, needs to be fixed upstream{/ignore}
-            <div class="timezone" id="timezone-remove">{$timezone_form}</div>
-            <div class="timezone" id="timezone-add"></div>
+            <div class="timezone">
+              <select id="continent" name="continent">
+                {loop="$continents"}
+                  {if="$key !== 'selected'"}
+                    <option value="{$value}" {if="$continents.selected === $value"}selected{/if}>
+                      {$value}
+                    </option>
+                  {/if}
+                {/loop}
+              </select>
+              <select id="city" name="city">
+                {loop="$cities"}
+                  {if="$key !== 'selected'"}
+                    <option value="{$value.city}"
+                            {if="$cities.selected === $value.city"}selected{/if}
+                            data-continent="{$value.continent}">
+                      {$value.city}
+                    </option>
+                  {/if}
+                {/loop}
+              </select>
+            </div>
           </div>
         </div>
       </div>
       <div class="pure-g">
         <div class="pure-u-lg-{$ratioLabel} pure-u-{$ratioLabelMobile}">
           <div class="form-label">
-            <label for="apiEnabled">
+            <label for="enableApi">
               <span class="label-name">{'Enable REST API'|t}</span><br>
               <span class="label-desc">{'Allow third party software to use Shaarli such as mobile application'|t}</span>
             </label>
         </div>
         <div class="pure-u-lg-{$ratioInput} pure-u-{$ratioInputMobile}">
           <div class="form-input">
-            <input type="checkbox" name="apiEnabled" id="apiEnabled"
+            <input type="checkbox" name="enableApi" id="enableApi"
                  {if="$api_enabled"}checked{/if}/>
           </div>
         </div>
 </form>
 
 {include="page.footer"}
-
-<script>
-  (function (window, document) {
-    var toRemove = document.getElementById('timezone-remove');
-    var firstSelect = toRemove.getElementsByTagName('select')[0];
-    var secondSelect = toRemove.getElementsByTagName('select')[1];
-    toRemove.parentNode.removeChild(toRemove);
-    var toAdd = document.getElementById('timezone-add');
-    var newTimezone = '<span class="timezone-continent">Continent ' + firstSelect.outerHTML + '</span>';
-    newTimezone += ' <span class="timezone-country">Country ' + secondSelect.outerHTML + '</span>';
-    toAdd.innerHTML = newTimezone;
-  })(this, this.document);
-</script>
 </body>
 </html>