Changeset 17792


Ignore:
Timestamp:
10/19/11 15:48:59 (19 months ago)
Author:
BrainSlayer
Message:

wps GUI adjustments

Location:
src/router
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/router/httpd/visuals/ejwps.c

    r16596 r17792  
    3030        return; 
    3131} 
     32 
     33void ej_get_wpsconfigure(webs_t wp, int argc, char_t ** argv) { 
     34        if (nvram_match("wps_status", "0"))  
     35                websWrite(wp, "<input class=\"button\" type=\"button\" value=\"%s\" onclick=\"to_configure(this.form);\" />", live_translate("aoss.configure")); 
     36        else 
     37                websWrite(wp, "<input class=\"button\" type=\"button\" value=\"%s\" onclick=\"to_forcerelease(this.form);\" />", live_translate("aoss.release")); 
     38} 
    3239#endif 
  • src/router/kromo/dd-wrt/AOSS.asp

    r17791 r17792  
    264264                                                <div class="label"><% tran("aoss.wpsstatus"); %></div> 
    265265                                                <span id="wpsstatus"><% get_wpsstatus(); %></span> 
    266                                                 <script type="text/javascript"> 
    267                                                 //<![CDATA[ 
    268                                                 if(!parseInt(<% nvram_get("wps_status"); %>)) 
    269                                                         document.write("<input class=\"button\" type=\"button\" value=\"" + aoss.configure + "\" onclick=\"to_configure(this.form);\" />"); 
    270                                                 else 
    271                                                         document.write("<input class=\"button\" type=\"button\" value=\"" + aoss.release + "\" onclick=\"to_forcerelease(this.form);\" />"); 
    272                                                 //]]> 
    273                                                 </script> 
     266                                                <span id="wpsconfigure"><% get_wpsconfigure(); %></span> 
    274267                                        </div> 
    275268                                </fieldset> 
  • src/router/kromo/dd-wrt/AOSS.live.asp

    r16594 r17792  
    22{uptime::<% get_uptime(); %>} 
    33{ipinfo::<% show_wanipinfo(); %>} 
     4{wpsconfigure::<% get_wpsconfigure(); %>} 
  • src/router/kromo/dd-wrt/lang_pack/english.js

    r17790 r17792  
    18581858aoss.wpsgenerate="Generate PIN"; 
    18591859aoss.pinnotvalid="Invalid PIN, checksum not correct!"; 
    1860 aoss.wpsenable="WPS Button"; 
     1860aoss.wpsenable="WPS Push Button"; 
    18611861aoss.wpsstatus="WPS Status"; 
    18621862aoss.externalregistrar="External Registrar"; 
  • src/router/services/networking/madwifi.c

    r17791 r17792  
    755755{ 
    756756#ifdef HAVE_WPS 
     757        char *config_methods = safe_malloc(sizeof("label display keypad") + 1); 
     758        memset(config_methods, 0, strlen(config_methods)); 
     759        strcpy(config_methods, "label display keypad"); 
    757760        fprintf(fp, "ctrl_interface=/var/run/hostapd\n");       // for cli 
    758761        if (!strcmp(prefix, "ath0") 
    759762            || !strcmp(prefix, "ath1")) { 
    760763                fprintf(fp, "eap_server=1\n"); 
    761  
     764                if (nvram_match("wps_enabled", "1")) { 
     765                        config_methods = (char *)realloc(config_methods, strlen(config_methods) + sizeof(" push_button") + 1); 
     766                        strcat(config_methods, " push_button"); 
     767                } 
    762768//# WPS configuration (AP configured, do not allow external WPS Registrars) 
    763769                if (nvram_match("wps_forcerelease", "1")) { 
     
    812818                fprintf(fp, "os_version=01020300\n"); 
    813819                fprintf(fp, "friendly_name=DD-WRT WPS Access Point\n"); 
    814                 fprintf(fp, 
    815                         "config_methods=label display push_button keypad\n"); 
    816         } 
     820                fprintf(fp, "config_methods=%s\n", config_methods); 
     821                //      "config_methods=label display push_button keypad\n"); 
     822        } 
     823        free(config_methods); 
    817824#endif 
    818825 
Note: See TracChangeset for help on using the changeset viewer.