Julien VAUBOURG 10 years ago
parent
commit
4913908ce8
2 changed files with 10 additions and 6 deletions
  1. 5 1
      sources/controller.php
  2. 5 5
      sources/views/layout.html.php

+ 5 - 1
sources/controller.php

@@ -66,7 +66,11 @@ dispatch('/', function() {
       $wifi_ssid = htmlentities($ssids[$i]);
     }
 
-    $wifi_ssid_list .= "<li $active data-device-id='$i'><a href='#'>".htmlentities($ssids[$i]).'</a></li>';
+    $wifi_ssid_list .= "<li $active data-device-id='$i'><a href='javascript:;'>".htmlentities($ssids[$i]).'</a></li>';
+  }
+
+  if(empty($wifi_ssid)) {
+    $wifi_ssid = '<em>'.T_("None").'</em>';
   }
 
   set('faststatus', service_faststatus() == 0);

+ 5 - 5
sources/views/layout.html.php

@@ -24,7 +24,7 @@
 <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
 <!--[if gt IE 8]><!--> <html class="no-js" lang="<?= $locale ?>"> <!--<![endif]-->
 <head>
-  <title>PirateBox <? echo (isset($title)) ? "| ".$title : "" ?></title>
+  <title>PirateBox <?= isset($title) ? "| $title" : '' ?></title>
 
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width">
@@ -43,22 +43,22 @@
 
 <body>
   <div class="container">
-    <? if(isset($flash['error'])): ?>
+    <?php if(isset($flash['error'])): ?>
       <div class="alert alert-dismissible alert-danger fade in" style="margin-top: 20px" role="alert">
         <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
         <strong><?= T_('Error') ?>:</strong> <?= $flash['error'] ?>
       </div>
-    <? elseif(isset($flash['notice'])): ?>
+    <?php elseif(isset($flash['notice'])): ?>
       <div class="alert alert-dismissible alert-info fade in" style="margin-top: 20px" role="alert">
         <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
         <strong><?= T_('Notice') ?>:</strong> <?= $flash['notice'] ?>
       </div>
-    <? elseif(isset($flash['success'])): ?>
+    <?php elseif(isset($flash['success'])): ?>
       <div class="alert alert-dismissible alert-success fade in" style="margin-top: 20px" role="alert">
         <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
         <?= $flash['success'] ?>
       </div>
-    <? endif; ?>
+    <?php endif; ?>
 
     <?= $content ?>