Changeset 14230


Ignore:
Timestamp:
04/12/10 23:09:39 (3 years ago)
Author:
BrainSlayer
Message:

changes for setupassistant

Location:
src/router/kromo/dd-wrt
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • src/router/kromo/dd-wrt/AOSS.asp

    r14013 r14230  
    33                //<![CDATA[ 
    44 
    5 function SelMode(varname,num,F) { 
    6         F.change_action.value="gozila_cgi"; 
    7         F.submit_type.value = "security"; 
    8         F.security_varname.value = varname; 
     5function startAOSS(F) { 
     6        F.submit_type.value = "start"; 
    97        F.submit(); 
    108} 
    119 
    12 function keyMode(F) { 
    13         F.change_action.value="gozila_cgi"; 
    14         F.submit_type.value = "keysize"; 
    15         F.submit(); 
    16 } 
    17  
    18 function generateKey(F,PREFIX) { 
    19         F.change_action.value="gozila_cgi"; 
    20         F.security_varname.value = PREFIX; 
    21         F.submit_type.value = "wep_key_generate"; 
    22         F.submit(); 
     10function toggleAOSS(button, show) { 
     11        show_layer_ext(button, 'aoss_button', show); 
     12        show_layer_ext(button, 'aoss_options', show); 
    2313} 
    2414 
     
    3626} 
    3727 
    38 function valid_radius(F) { 
    39         if(F.security_mode.value == "radius" || F.security_mode.value == "wpa" || F.security_mode.value == "wpa2" || F.security_mode.value == "wpa wpa2"){ 
    40                 if(F.wl_radius_key.value == "") { 
    41                         alert(errmsg.err38); 
    42                         F.wl_radius_key.focus(); 
    43                         return false; 
    44                 } 
    45         } 
    46  
    47         return true; 
    48 } 
    49  
    50 function valid_wpa_psk(F) { 
    51         if(F.security_mode.value == "psk" || F.security_mode.value == "psk2" || F.security_mode.value == "psk psk2"){ 
    52                 if(F.wl_wpa_psk.value.length == 64){ 
    53                         if(!isxdigit(F.wl_wpa_psk, F.wl_wpa_psk.value)) { 
    54                                 return false; 
    55                         } 
    56                 } else if(F.wl_wpa_psk.value.length >=8 && F.wl_wpa_psk.value.length <= 63 ){ 
    57                         if(!isascii(F.wl_wpa_psk,F.wl_wpa_psk.value)) { 
    58                                 return false; 
    59                         } 
    60                 } else{ 
    61                         alert(errmsg.err39); 
    62                         return false; 
    63                 } 
    64         } 
    65  
    66         return true; 
    67 } 
    68  
    69 function valid_wep(F) { 
    70         if(F.security_mode.value == "psk" || F.security_mode.value == "wpa" || F.security_mode.value == "psk2" || F.security_mode.value == "wpa2" || F.security_mode.value == "psk psk2" || F.security_mode.value == "wpa wpa2") 
    71                 return true; 
    72  
    73         if (ValidateKey(F.wl_key1, F.wl_wep_bit.options[F.wl_wep_bit.selectedIndex].value,1) == false) 
    74                 return false; 
    75  
    76         if (ValidateKey(F.wl_key2, F.wl_wep_bit.options[F.wl_wep_bit.selectedIndex].value,2) == false) 
    77                 return false; 
    78  
    79         if (ValidateKey(F.wl_key3, F.wl_wep_bit.options[F.wl_wep_bit.selectedIndex].value,3) == false) 
    80                 return false; 
    81  
    82         if (ValidateKey(F.wl_key4, F.wl_wep_bit.options[F.wl_wep_bit.selectedIndex].value,4) == false) 
    83                 return false; 
    84  
    85         for (var i=1; i <= 4; i++) { 
    86                 if(F.wl_key[i-1].checked) { 
    87                         aaa = eval("F.wl_key"+i).value; 
    88                         if(aaa == "") { 
    89                                 alert(errmsg.err40 + i); 
    90                                 return false; 
    91                         } 
    92                         break; 
    93                 } 
    94         } 
    95  
    96   return true; 
    97 } 
    98  
    99 function ValidateKey(key, bit, index) { 
    100         if(bit == 64) { 
    101                 switch(key.value.length) { 
    102                         case 0: 
    103                                 break; 
    104                         case 10: 
    105                                 if(!isxdigit(key,key.value)) { 
    106                                         return false; 
    107                                 } 
    108                                 break; 
    109                         default: 
    110                                 alert(errmsg.err41 + key.value); 
    111                                 return false; 
    112                 } 
    113         } else { 
    114                 switch(key.value.length) { 
    115                         case 0: 
    116                                 break; 
    117                         case 26: 
    118                                 if(!isxdigit(key,key.value)) { 
    119                                         return false; 
    120                                 } 
    121                                 break; 
    122                         default: 
    123                                 alert(errmsg.err41 + key.value); 
    124                                 return false; 
    125                 } 
    126         } 
    127  
    128         return true; 
    129 } 
    130 function enable_idttls(ifname) { 
    131         show_layer_ext(this, 'idttls' + ifname, true) 
    132         show_layer_ext(this, 'idtls'  + ifname, false) 
    133         show_layer_ext(this, 'idpeap' + ifname, false) 
    134         show_layer_ext(this, 'idleap' + ifname, false) 
    135 } 
    136  
    137 function enable_idpeap(ifname) { 
    138         show_layer_ext(this, 'idttls' + ifname, false) 
    139         show_layer_ext(this, 'idtls' + ifname, false) 
    140         show_layer_ext(this, 'idpeap' + ifname, true) 
    141         show_layer_ext(this, 'idleap' + ifname, false) 
    142 } 
    143 function enable_idleap(ifname) { 
    144         show_layer_ext(this, 'idttls' + ifname, false) 
    145         show_layer_ext(this, 'idtls' + ifname, false) 
    146         show_layer_ext(this, 'idpeap' + ifname, false) 
    147         show_layer_ext(this, 'idleap' + ifname, true) 
    148 } 
    149  
    150 function enable_idtls(ifname) { 
    151         show_layer_ext(this, 'idttls' + ifname, false) 
    152         show_layer_ext(this, 'idtls' + ifname, true) 
    153         show_layer_ext(this, 'idpeap' + ifname, false) 
    154         show_layer_ext(this, 'idleap' + ifname, false) 
    155 } 
    156  
    15728var update; 
    15829 
    15930addEvent(window, "load", function() { 
    16031 
    161          
    162         var F = document.forms[0]; 
    163         if(F.security_mode && F.wl_wep_bit) 
    164                 if(F.security_mode.value == "wep" || F.security_mode.value == "radius") { 
    165                         keyMode(F.wl_wep_bit.value, F); 
    166                 } 
    167                  
    16832        update = new StatusbarUpdate(); 
    16933        update.start(); 
     
    19054                <div id="main"> 
    19155                        <div id="contents"> 
    192                         <form name="wpa" action="apply.cgi" method="post"> 
    193                                 <input type="hidden" name="submit_button" value="WL_AOSS" /> 
     56                        <form name="aoss" action="apply.cgi" method="post"> 
     57                                <input type="hidden" name="submit_button" value="AOSS" /> 
    19458                                <input type="hidden" name="action" value="Apply" /> 
    19559                                <input type="hidden" name="change_action" value="gozila_cgi" /> 
     
    20872<div class="setting"> 
    20973<div class="label"><% tran("aoss.enable"); %></div> 
    210 <input class="spaceradio" type="radio" value="1" name="aoss_enable" <% nvram_checked("aoss_enable", "1"); %> /><% tran("share.enable"); %>&nbsp; 
    211 <input class="spaceradio" type="radio" value="0" name="aoss_enable" <% nvram_checked("aoss_enable", "0"); %> /><% tran("share.disable"); %> 
     74<input class="spaceradio" type="radio" value="1" name="aoss_enable" <% nvram_checked("aoss_enable", "1"); %> onClick="toggleAOSS(this, true);" /><% tran("share.enable"); %>&nbsp; 
     75<input class="spaceradio" type="radio" value="0" name="aoss_enable" <% nvram_checked("aoss_enable", "0"); %> onClick="toggleAOSS(this, false);" /><% tran("share.disable"); %> 
    21276</div> 
    213 <div class="setting"> 
     77<div id="aoss_button" class="setting" style="<% visible_css("aoss_enable", "1"); %>"> 
    21478<div class="label"><% tran("aoss.start"); %></div> 
    215 <input type="button" class="aoss_enable" value="" onclick="<!-- to be defined -->"> 
     79<input type="button" class="aoss_enable" value="" onclick="startAOSS(this.form)"> 
    21680</div> 
    21781</fieldset> 
    21882 
    21983<br /> 
    220  
     84<div id="aoss_options" style="<% visible_css("aoss_enable", "1"); %>"> 
    22185<fieldset> 
    22286<legend><% tran("aoss.securitymodes"); %></legend> 
    22387<div class="setting"> 
    22488<div class="label"><% tran("aoss.wpaaes"); %></div> 
    225 <input type="checkbox" name="aoss_aes" value="0" checked></input> 
     89<input type="checkbox" name="aoss_aes" value="1"<% isChecked("aoss_aes", "1"); %></input> 
    22690</div> 
    22791<div class="setting"> 
    22892<div class="label"><% tran("aoss.wpatkip"); %></div> 
    229 <input type="checkbox" name="aoss_tkip" value="0"></input> 
     93<input type="checkbox" name="aoss_tkip" value="1"<% isChecked("aoss_tkip", "1"); %>></input> 
    23094</div> 
    23195<div class="setting"> 
    23296<div class="label"><% tran("aoss.wep"); %></div> 
    233 <input type="checkbox" name="aoss_wep" value="0"></input> 
     97<input type="checkbox" name="aoss_wep" value="1"<% isChecked("aoss_wep", "1"); %>></input> 
    23498</div> 
    23599</fieldset> 
    236100 
    237101<br /> 
     102</div> 
    238103 
    239 <fieldset> 
     104<!--fieldset> 
    240105<legend><% tran("aoss.clients"); %></legend> 
    241106<table class="center table" cellspacing="5"> 
     
    277142</table> 
    278143</fieldset> 
     144<br /--> 
    279145<!-- AOSS end --> 
    280 <br /> 
    281146                                 
    282147                                <div class="submitFooter"> 
     
    294159                           <div><h2><% tran("share.help"); %></h2></div> 
    295160                           <dl> 
    296                                  <dt class="term"><% tran("wpa.secmode"); %>:</dt> 
    297                                  <dd class="definition"><% tran("hwpa.right2"); %></dd> 
     161                                 <dt class="term">AOSS:</dt> 
     162                                 <dd class="definition"><% tran("haoss.basic"); %></dd> 
    298163                           </dl><br /> 
    299                            <a href="javascript:openHelpWindow<% ifdef("EXTHELP","Ext"); %>('HWPA.asp')"><% tran("share.more"); %></a> 
     164                           <!--a href="javascript:openHelpWindow<% ifdef("EXTHELP","Ext"); %>('HWPA.asp')"><% tran("share.more"); %></a--> 
    300165                        </div> 
    301166                        </div> 
  • src/router/kromo/dd-wrt/Makefile

    r14174 r14230  
    551551        rm -f $(INSTALLDIR)/www/index_l2tp.asp 
    552552endif 
     553ifneq ($(CONFIG_AOSS),y) 
     554        rm -f $(INSTALLDIR)/www/AOSS.asp 
     555endif 
     556ifneq ($(CONFIG_BUFFALO),y) 
     557        rm -f $(INSTALLDIR)/www/SetupAssistant.asp 
     558endif 
    553559ifneq ($(CONFIG_3G),y) 
    554560        rm -f $(INSTALLDIR)/www/index_3g.asp 
     
    640646        ../../../../tools/strip $(INSTALLDIR)/www/*.htm 
    641647        ../../../../tools/strip $(INSTALLDIR)/www/help/*.asp 
    642         ../../../../tools/process_langfile $(INSTALLDIR)/www/lang_pack/english.js $(INSTALLDIR)/www/lang_pack/*.js 
     648#       ../../../../tools/process_langfile $(INSTALLDIR)/www/lang_pack/english.js $(INSTALLDIR)/www/lang_pack/*.js 
    643649         
    644650ifeq ($(CONFIG_SER),y)   
  • src/router/kromo/dd-wrt/Wireless_Basic.asp

    r11649 r14230  
    165165        F.submit_type.value = "remove_vifs"; 
    166166        F.submit(); 
     167} 
     168 
     169function toggle_layer(checkbox, label) { 
     170        if(checkbox.checked) { 
     171                show_layer_ext(this,label,true); 
     172        } else { 
     173                show_layer_ext(this,label,false); 
     174        } 
    167175} 
    168176 
  • src/router/kromo/dd-wrt/changepass.asp

    r13996 r14230  
    6565                                        <input type="hidden" name="submit_button" value="index" /> 
    6666                                        <input type="hidden" name="submit_type" /> 
    67                                         <input type="hidden" name="next_page" /> 
     67                                        <input type="hidden" name="next_page" value="SetupAssistan.asp" /> 
    6868                                        <input type="hidden" name="change_action" /> 
    6969                                        <input type="hidden" name="action" value="Apply" /> 
  • src/router/kromo/dd-wrt/index.asp

    r13850 r14230  
    295295                                                        <input type="hidden" name="ppp_mlppp" value="0" /> 
    296296                                                        <input type="hidden" name="lan_ipaddr" value="4" /> 
    297                                                          
     297                                                 
     298                                                        <% ifndef("HAVE_BUFFALO", "<!--"); %> 
     299                                                        <h2><script type="text/javascript">Capture(sas.title);</script></h2> 
     300                                                        <fieldset> 
     301                                                                <legend><script type="text/javascript">Capture(sas.title);</script></legend> 
     302                                                                <input type="button" name="start_sas" value="Start" class="button" onclick="document.location='SetupAssistant.asp'"> 
     303                                                        </fieldset> 
     304                                                        <br /> 
     305                                                        <% ifndef("HAVE_BUFFALO", "-->"); %>     
    298306                                                        <% ifdef("WET", "<!--"); %> 
    299307                                                        <% ifdef("STA", "<!--"); %> 
     
    448456                                                <div><h2><% tran("share.help"); %></h2></div> 
    449457                                                <dl> 
     458                                                        <% ifndef("HAVE_BUFFALO", "<!--"); %> 
     459                                                        <dt class="term"><% tran("sas.title"); %>:</dt> 
     460                                                        <dd class="definition"><% tran("hidx.sas"); %></dd> 
     461                                                        <% ifndef("HAVE_BUFFALO", "-->"); %> 
    450462                                                        <dt class="term"><% tran("idx.dhcp"); %>:</dt> 
    451463                                                        <dd class="definition"><% tran("hidx.right2"); %></dd> 
  • src/router/kromo/dd-wrt/lang_pack/english.js

    r14198 r14230  
    367367errmsg.err102="Upgrading firmware...<br/>Please, wait"; 
    368368 
     369var sas = new Object(); 
     370sas.internet_connection="Internet Connection"; 
     371sas.network_settings="Network Settings"; 
     372sas.wireless_settings="Wireless Settings"; 
     373sas.other_settings="Other Settings"; 
     374 
    369375// **  COMMON MENU ENTRIES  **// 
    370376var bmenu= new Object(); 
     
    20562062logout.message="You have successfully logged out.<br />Thank you for using DD-WRT !"; 
    20572063 
     2064// ** Setup Assistant **// 
     2065var sas = new Object(); 
     2066var hsas = new Object(); 
     2067sbutton.next = "Next &raquo;"; 
     2068sbutton.prev = "&laquo; Previous"; 
     2069sas.title = "Setup Assistant"; 
     2070hidx.sas = "The Setup Assistant guides you through the basic setup steps to configure your router."; 
     2071hsas.wan = 'The WAN interface connects your router to the Internet or other networks. If your network is connected to the internet and you only need an access point then set the WAN mode to "disabled".'; 
     2072 
     2073// ** AOSS **// 
     2074var haoss = new Object(); 
     2075haoss.basic = 'The "AirStation One-Touch Secure System" AOSS allows you to connect AOSS capable clients to your access point without requiring manual configuration.'; 
    20582076 
    20592077// ************         OLD PAGES               *******************************// 
  • src/router/kromo/dd-wrt/lang_pack/german.js

    r14201 r14230  
    317317errmsg.err61="Ungültiges Dateiformat."; 
    318318 
     319sas.internet_connection="Internet Verbindung"; 
     320sas.network_settings="Netzwerk Einstellungen"; 
     321sas.wireless_settings="Drahtlos Einstellungen"; 
     322sas.other_settings="Andere Einstellungen"; 
    319323 
    320324// **************************************************************  COMMON MENU ENTRIES  **********************************************************// 
Note: See TracChangeset for help on using the changeset viewer.