1 <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML
4.0//EN'
>
4 Copyright (C) 2006-2010 Jonathan Zarate
5 http://www.polarcloud.com/tomato/
7 For use with Tomato Firmware only.
8 No part of this file may be used without permission.
12 <meta http-equiv='content-type' content='text/html;charset=utf-
8'
>
13 <meta name='robots' content='noindex,nofollow'
>
14 <title>[<%
ident(); %>] <% translate(
"Admin"); %
>: <% translate(
"Buttons"); %
></title>
15 <link rel='stylesheet' type='text/css' href='tomato.css'
>
16 <link rel='stylesheet' type='text/css' href='color.css'
>
17 <script type='text/javascript' src='tomato.js'
></script>
21 <style type='text/css'
>
28 <script type='text/javascript' src='debug.js'
></script>
30 <script type='text/javascript'
>
31 // <% nvram("sesx_led,sesx_b0,sesx_b1,sesx_b2,sesx_b3,sesx_script,script_brau,t_model,t_features"); %>
33 var ses
= features('ses');
34 var brau
= features('brau');
35 var aoss
= features('aoss');
36 var wham
= features('wham');
38 function verifyFields(focused
, quiet
)
50 if (fom
._led0
.checked
) n
|= 1;
51 if (fom
._led1
.checked
) n
|= 2;
52 if (fom
._led2
.checked
) n
|= 4;
53 if (fom
._led3
.checked
) n
|= 8;
54 fom
.sesx_led
.value
= n
;
60 if ((!brau
) && (!ses
)) {
61 E('save-button').disabled
= 1;
65 if (brau
) E('braudiv').style
.display
= '';
66 E('sesdiv').style
.display
= '';
67 if ((wham
) || (aoss
) || (brau
)) E('leddiv').style
.display
= '';
72 <form id='_fom' method='post' action='tomato.cgi'
>
73 <table id='container' cellspacing=
0>
74 <tr><td colspan=
2 id='header'
>
75 <div class='title'
>Tomato
</div>
76 <div class='version'
><%
translate("Version"); %> <% version(); %
></div>
78 <tr id='body'
><td id='navi'
><script type='text/javascript'
>navi()</script></td>
80 <div id='ident'
><%
ident(); %></div>
84 <input type='hidden' name='_nextpage' value='admin-buttons.asp'
>
85 <input type='hidden' name='sesx_led' value='
0'
>
87 <div id='sesdiv' style='display:none'
>
88 <div class='section-title'
><%
translate("SES/WPS/AOSS Button"); %></div>
90 <script type='text/javascript'
>
91 a
= [[0,'<% translate("Do Nothing"); %>'],[1,'<% translate("Toggle Wireless"); %>'],[2,'<% translate("Reboot"); %>'],[3,'<% translate("Shutdown"); %>'],
93 [5,'<% translate("Unmount all USB Drives"); %>'],
95 [4,'<% translate("Run Custom Script"); %>']];
96 createFieldTable('', [
97 { title
: "<% translate("When Pushed For
"); %>..." },
98 { title
: '0-2 <% translate("Seconds"); %>', indent
: 2, name
: 'sesx_b0', type
: 'select', options
: a
, value
: nvram
.sesx_b0
|| 0 },
99 { title
: '4-6 <% translate("Seconds"); %>', indent
: 2, name
: 'sesx_b1', type
: 'select', options
: a
, value
: nvram
.sesx_b1
|| 0 },
100 { title
: '8-10 <% translate("Seconds"); %>', indent
: 2, name
: 'sesx_b2', type
: 'select', options
: a
, value
: nvram
.sesx_b2
|| 0 },
101 { title
: '12+ <% translate("Seconds"); %>', indent
: 2, name
: 'sesx_b3', type
: 'select', options
: a
, value
: nvram
.sesx_b3
|| 0 },
102 { title
: '<% translate("Custom Script"); %>', indent
: 2, name
: 'sesx_script', type
: 'textarea', value
: nvram
.sesx_script
}
108 <div id='braudiv' style='display:none'
>
109 <div class='section-title'
><%
translate("Bridge/Auto Switch"); %></div>
110 <div class='section'
>
111 <script type='text/javascript'
>
112 createFieldTable('', [
113 { title
: '<% translate("Custom Script"); %>', indent
: 2, name
: 'script_brau', type
: 'textarea', value
: nvram
.script_brau
}
119 <div id='leddiv' style='display:none'
>
120 <div class='section-title'
><%
translate("Startup LED"); %></div>
121 <div class='section'
>
122 <script type='text/javascript'
>
123 createFieldTable('', [
124 { title
: 'Amber SES', name
: '_led0', type
: 'checkbox', value
: nvram
.sesx_led
& 1, hidden
: !wham
},
125 { title
: 'White SES', name
: '_led1', type
: 'checkbox', value
: nvram
.sesx_led
& 2, hidden
: !wham
},
126 { title
: 'AOSS', name
: '_led2', type
: 'checkbox', value
: nvram
.sesx_led
& 4, hidden
: !aoss
},
127 { title
: 'Bridge', name
: '_led3', type
: 'checkbox', value
: nvram
.sesx_led
& 8, hidden
: !brau
}
133 <script type='text/javascript'
>
134 if ((!ses
) && (!brau
)) W('<i><% translate("This feature is not supported on this route"); %>.</i>');
140 <tr><td id='footer' colspan=
2>
141 <span id='footer-msg'
></span>
142 <input type='button' value='<%
translate("Save"); %>' id='save-button' onclick='save()'
>
143 <input type='button' value='<%
translate("Cancel"); %>' id='cancel-button' onclick='javascript:reloadPage();'
>
147 <script type='text/javascript'
>earlyInit()</script>