modules/admin-full: readd atm bridge config
[project/luci.git] / modules / admin-full / luasrc / view / admin_network / wifi_join.htm
index 3963a5a..af5f5e1 100644 (file)
@@ -52,12 +52,12 @@ $Id$
        function format_wifi_encryption(info)
                if info.wep == true and not info.wpa_version then
                        return "WEP"
-               elseif info.wpa_version then
+               elseif info.wpa then
                        return "<abbr title='Pairwise: %s / Group: %s'>%s - %s</abbr>" % {
                                table.concat(info.pair_ciphers, ", "),
                                table.concat(info.group_ciphers, ", "),
-                               (info.wpa_version == 3) and "mixed WPA/WPA2"
-                                       or (info.wpa_version == 2 and "WPA2" or "WPA"),
+                               (info.wpa == 3) and "mixed WPA/WPA2"
+                                       or (info.wpa == 2 and "WPA2" or "WPA"),
                                table.concat(info.auth_suites, ", ")
                        }
                else
@@ -71,13 +71,13 @@ $Id$
 
 <%+header%>
 
-<h2><a id="content" name="content"><%:a_s_iw_scan Wireless Scan%></a></h2>
+<h2><a id="content" name="content"><%:Join Network: Wireless Scan%></a></h2>
 
 <div class="cbi-map">
        <fieldset class="cbi-section">
                <table class="cbi-section-table" style="empty-cells:hide">
                        <!-- scan list -->
-                       <% for i, net in ipairs(iw.scanlist) do %>
+                       <% for i, net in ipairs(iw.scanlist) do net.encryption = net.encryption or { } %>
                        <tr class="cbi-section-table-row cbi-rowstyle-<%=1 + ((i-1) % 2)%>">
                                <td class="cbi-value-field" style="width:16px; padding:3px">
                                        <abbr title="Signal: <%=net.signal%> dB / Quality: <%=net.quality%>/<%=net.quality_max%>">
@@ -90,7 +90,7 @@ $Id$
                                        <strong>Channel:</strong> <%=net.channel%> |
                                        <strong>Mode:</strong> <%=net.mode%> |
                                        <strong>BSSID:</strong> <%=net.bssid%> |
-                                       <strong>Encryption:</strong> <%=format_wifi_encryption(net)%>
+                                       <strong>Encryption:</strong> <%=net.encryption.description or translate("Open")%>
                                </td>
                                <td class="cbi-value-field" style="width:40px">
                                        <form action="<%=REQUEST_URI%>" method="post">
@@ -99,14 +99,16 @@ $Id$
                                                <input type="hidden" name="mode" value="<%=net.mode%>" />
                                                <input type="hidden" name="bssid" value="<%=net.bssid%>" />
                                                <input type="hidden" name="channel" value="<%=net.channel%>" />
-                                               <input type="hidden" name="wep" value="<%=net.wep and 1 or 0%>" />
-                                               <% if net.wpa_version then %>
-                                               <input type="hidden" name="wpa_version" value="<%=net.wpa_version%>" />
-                                               <% for _, v in ipairs(net.auth_suites) do %><input type="hidden" name="wpa_suites" value="<%=v%>" />
-                                               <% end; for _, v in ipairs(net.group_ciphers) do %><input type="hidden" name="wpa_group" value="<%=v%>" />
-                                               <% end; for _, v in ipairs(net.pair_ciphers) do %><input type="hidden" name="wpa_pairwise" value="<%=v%>" />
+                                               <input type="hidden" name="wep" value="<%=net.encryption.wep and 1 or 0%>" />
+                                               <% if net.encryption.wpa then %>
+                                               <input type="hidden" name="wpa_version" value="<%=net.encryption.wpa%>" />
+                                               <% for _, v in ipairs(net.encryption.auth_suites) do %><input type="hidden" name="wpa_suites" value="<%=v%>" />
+                                               <% end; for _, v in ipairs(net.encryption.group_ciphers) do %><input type="hidden" name="wpa_group" value="<%=v%>" />
+                                               <% end; for _, v in ipairs(net.encryption.pair_ciphers) do %><input type="hidden" name="wpa_pairwise" value="<%=v%>" />
                                                <% end; end %>
 
+                                               <input type="hidden" name="clbridge" value="<%=iw.type == "wl" and 1 or 0%>" />
+
                                                <input class="cbi-button-apply" type="submit" value="Join Network" />
                                        </form>
                                </td>
@@ -118,11 +120,11 @@ $Id$
 </div>
 <div class="cbi-page-actions right">
        <form class="inline" action="<%=luci.dispatcher.build_url("admin/network/wireless")%>" method="get">
-               <input class="cbi-button-reset" type="submit" value="<%:a_s_iw_back_overview Back to overview%>" />
+               <input class="cbi-button-reset" type="submit" value="<%:Back to overview%>" />
        </form>
        <form class="inline" action="<%=REQUEST_URI%>" method="get">
                <input type="hidden" name="device" value="<%=utl.pcdata(dev)%>" />
-               <input class="cbi-input-find" type="submit" value="<%:a_s_iw_scan_repeat Repeat scan%>" />
+               <input class="cbi-input-find" type="submit" value="<%:Repeat scan%>" />
        </form>
 </div>