diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-11-08 02:38:22 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-11-08 02:38:22 +0000 |
commit | a50452e3e37bd3c79b4e69447420c8cd4cc2388b (patch) | |
tree | 3798bf3939762980cc6826671e1ec21cadbe7de2 /modules/admin-full/luasrc/view | |
parent | 6090617a9b97e386070f6f70b7c23aa404cc4149 (diff) |
modules/admin-full: rewrite wifi join wizzard
Diffstat (limited to 'modules/admin-full/luasrc/view')
-rw-r--r-- | modules/admin-full/luasrc/view/admin_network/wifi_join.htm | 2 | ||||
-rw-r--r-- | modules/admin-full/luasrc/view/admin_network/wifi_join_settings.htm | 126 |
2 files changed, 1 insertions, 127 deletions
diff --git a/modules/admin-full/luasrc/view/admin_network/wifi_join.htm b/modules/admin-full/luasrc/view/admin_network/wifi_join.htm index 43ba40bf15..6ed4627dc0 100644 --- a/modules/admin-full/luasrc/view/admin_network/wifi_join.htm +++ b/modules/admin-full/luasrc/view/admin_network/wifi_join.htm @@ -71,7 +71,7 @@ $Id$ <%+header%> -<h2><a id="content" name="content"><%:Wireless Scan%></a></h2> +<h2><a id="content" name="content"><%:Join Network: Wireless Scan%></a></h2> <div class="cbi-map"> <fieldset class="cbi-section"> diff --git a/modules/admin-full/luasrc/view/admin_network/wifi_join_settings.htm b/modules/admin-full/luasrc/view/admin_network/wifi_join_settings.htm deleted file mode 100644 index b29de61a0c..0000000000 --- a/modules/admin-full/luasrc/view/admin_network/wifi_join_settings.htm +++ /dev/null @@ -1,126 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2009 Jo-Philipp Wich <xm@subsignal.org> - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -$Id$ - --%> - -<%- - - local sys = require "luci.sys" - local utl = require "luci.util" - local uci = require "luci.model.uci".cursor_state() - - local ifaces = { } - uci:foreach("network", "interface", function(i) - if i.ifname ~= "lo" then - ifaces[#ifaces+1] = { i['.name'], i.ifname, i.ipaddr } - end - end) - - local dev = luci.http.formvalue("device") - local iw = luci.sys.wifi.getiwinfo(dev) - - local requirement - - if iwinfo.type(dev) == "broadcom" and not nixio.fs.access("/usr/sbin/nas") then - requirement = luci.i18n.translatef("You need to install the <a href='%s'>Broadcom <em>nas</em> supplicant</a> to use WPA!" - % luci.dispatcher.build_url("admin/system/packages?url=nas&submit=1")) - elseif not nixio.fs.access("/usr/sbin/wpa_supplicant") then - requirement = luci.i18n.translatef("You need to install <a href='%s'><em>wpa-supplicant</em></a> to use WPA!" - % luci.dispatcher.build_url("admin/system/packages?url=wpa-supplicant&submit=1")) - end - --%> - -<%+header%> - -<h2><a id="content" name="content"><%:Join Network%></a></h2> - -<form method="post" action="<%=REQUEST_URI%>"> - <div class="cbi-map"> - <div class="cbi-map-descr"> - <%=luci.i18n.translatef("You are about to join the wireless network <em><strong>%s</strong></em>. " .. - "In order to complete the process, you need to provide some additional details.", - utl.pcdata(luci.http.formvalue("join") or "(hidden)") - )%> - </div> - - <fieldset class="cbi-section"> - <input type="hidden" name="confirm" value="1" /> - <input type="hidden" name="join" value="<%=utl.pcdata(luci.http.formvalue("join"))%>" /> - <input type="hidden" name="device" value="<%=utl.pcdata(luci.http.formvalue("device"))%>" /> - <input type="hidden" name="mode" value="<%=luci.http.formvalue("mode")%>" /> - <input type="hidden" name="bssid" value="<%=luci.http.formvalue("bssid")%>" /> - <input type="hidden" name="channel" value="<%=luci.http.formvalue("channel")%>" /> - <input type="hidden" name="wep" value="<%=luci.http.formvalue("wep")%>" /> - <input type="hidden" name="wpa_version" value="<%=luci.http.formvalue("wpa_version")%>" /> - - <% if luci.http.formvalue("wep") == "1" then %> - <label for="pw_key">WEP passphrase</label><br /> - <input class="cbi-input-password" type="password" name="key" id="pw_key" /> - <br /><br /> - <% elseif tonumber(luci.http.formvalue("wpa_version") or 0) > 0 and luci.http.formvalue("wpa_suites") == "PSK" then %> - <label for="pw_key">WPA passphrase</label><br /> - <input class="cbi-input-password" type="password" name="key" id="pw_key" /> - - <% if tonumber(luci.http.formvalue("wpa_version") or 0) == 3 then %> - <select name="wpa_suite"> - <option value="psk">WPA-PSK</option> - <option value="psk2" selected="selected">WPA2-PSK</option> - <option value="psk+psk2">WPA/WPA2-PSK mixed mode</option> - </select> - <% else %> - <input type="hidden" name="wpa_suite" value="psk<%=tonumber(luci.http.formvalue("wpa_version") or 0) == 2 and 2%>" /> - <% end %> - - <% if requirement then %> - <strong class="error"> <%=requirement%></strong> - <% end %> - - <br /><br /> - <% end %> - - <label for="sel_attach_intf">Attach wireless to</label><br /> - <select name="attach_intf" id="sel_attach_intf"> - <% for _, i in ipairs(ifaces) do %> - <option<% if i[1] == "wan" then %> selected="selected"<% end %> value="<%=i[1]%>"><%=i[1]%> (<%=i[2]%><% if i[3] then %> - <%=i[3]%><% end %>)</option> - <% end %> - <option value="">-- no interface --</option> - </select> - - <br/><br /> - <hr /><br /> - - <% if luci.http.formvalue("mode") == "Ad-Hoc" then %> - <input type="checkbox" name="fixed_bssid" value="1" id="cb_fixed_bssid" checked="checked" /> - <label for="cb_fixed_bssid">Lock BSSID to <%=luci.http.formvalue("bssid")%></label> - <br /> - <% end %> - - <% if iw.mbssid_support then %> - <input type="checkbox" name="replace_net" value="1" id="cb_replace_net" checked="checked" /> - <label for="cb_replace_net">Overwrite existing wireless configuration</label> - <br /> - <% else %> - <input type="hidden" name="replace_net" value="1" /> - <% end %> - - <input type="checkbox" name="autoconnect" value="1" id="cb_autoconnect" checked="checked" /> - <label for="cb_autoconnect">Automatically connect</label> - </fieldset> - </div> - <div class="cbi-page-actions"> - <input class="cbi-button-apply" type="submit" value="<%:Join Network%>" /> - <input class="cbi-button-reset" type="submit" name="cancel" value="<%:Back to scan results%>" /> - </div> -</form> - -<%+footer%> |