tazpanel diff network.cgi @ rev 481
Tiny edits
author | Paul Issott <paul@slitaz.org> |
---|---|
date | Sun May 10 11:51:03 2015 +0100 (2015-05-10) |
parents | de34ca9d1417 |
children | 62d49bf26410 |
line diff
1.1 --- a/network.cgi Fri May 01 23:56:00 2015 +0200 1.2 +++ b/network.cgi Sun May 10 11:51:03 2015 +0100 1.3 @@ -132,7 +132,7 @@ 1.4 *\ dowakeup\ *) 1.5 mac="$(GET macwakup)" 1.6 unset pass 1.7 - [ "$(GET pass)" ] && pass="-p $(GET pass)" 1.8 + [ "$(GET macpass)" ] && pass="-p $(GET macpass)" 1.9 if [ "$mac" ]; then 1.10 ether-wake $(GET iface) $mac $pass 1.11 else 1.12 @@ -222,6 +222,7 @@ 1.13 stop_disabled='disabled' 1.14 fi 1.15 1.16 + [ -s /etc/ethers ] || echo "#01:02:03:04:05:06 mystation" > /etc/ethers 1.17 cat <<EOT 1.18 <h2>$(_ 'Ethernet connection')</h2> 1.19 EOT 1.20 @@ -231,6 +232,7 @@ 1.21 1.22 <section> 1.23 <header>$(_ 'Configuration')</header> 1.24 + <form action="index.cgi" id="indexform"></form> 1.25 <form id="conf"> 1.26 <input type="hidden" name="eth"/> 1.27 <div> 1.28 @@ -265,7 +267,12 @@ 1.29 </tr> 1.30 <tr id="wk1"><td>$(_ 'MAC address to wake up')</td> 1.31 <td><input type="text" name="macwakup" title="$(_ 'Leave empty for a general wakeup')" $PAR/><!-- 1.32 - <button name="ethers" value="/etc/ethers" data-icon="view">$(_ 'View')</button --> 1.33 + --><button form="indexform" name="file" value="/etc/ethers" data-icon="view">$(_ 'List')</button> 1.34 + </td> 1.35 + </tr> 1.36 + <tr id="wk2"><td>$(_ 'MAC/IP address password')</td> 1.37 + <td><input type="text" name="macpass" title="$(_ 'Leave empty for a general wakeup')" $PAR/><!-- 1.38 + --><button form="indexform" name="exec" value="ether-wake --help" data-icon="help">$(_ 'Help')</button> 1.39 </td> 1.40 </tr> 1.41 </table> 1.42 @@ -285,7 +292,7 @@ 1.43 document.getElementById('st' + i).style.display = enabled ? '' : 'none'; 1.44 } 1.45 enabled = document.getElementById('wakeup').checked; 1.46 - for (i = 1; i < 2; i++) { 1.47 + for (i = 1; i < 3; i++) { 1.48 document.getElementById('wk' + i).style.display = enabled ? '' : 'none'; 1.49 } 1.50 }