]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Added reboot notice
authorFlorian Bührle <flo@erdlof.org>
Sun, 19 May 2019 21:33:45 +0000 (23:33 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 20 May 2019 09:54:22 +0000 (10:54 +0100)
Added a reboot notice and made table rows more distinguishable by
alternating their background color. This improves usability.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/zoneconf.cgi
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl

index 9699b380879dfce662d203f202ba52c5c1a3fcf5..8480dad06bf726c5d0eca167cd8ceb7225f606da 100644 (file)
@@ -53,6 +53,10 @@ my $css = <<END
                border: 0.5px solid black;
        }
 
                border: 0.5px solid black;
        }
 
+    td.slightlygrey {
+        background-color: #F0F0F0;
+    }
+
        td.h {
                background-color: grey;
                color: white;
        td.h {
                background-color: grey;
                color: white;
@@ -93,6 +97,7 @@ my $css = <<END
                width: 100%;
         padding-top: 20px;
                text-align: right;
                width: 100%;
         padding-top: 20px;
                text-align: right;
+        color: red;
        }
 
        #submit-container.input {
        }
 
        #submit-container.input {
@@ -110,6 +115,8 @@ my %ethsettings = ();
 my %vlansettings = ();
 my %cgiparams = ();
 
 my %vlansettings = ();
 my %cgiparams = ();
 
+my $restart_notice = "";
+
 &General::readhash("${General::swroot}/ethernet/settings",\%ethsettings);
 &General::readhash("${General::swroot}/ethernet/vlans",\%vlansettings);
 
 &General::readhash("${General::swroot}/ethernet/settings",\%ethsettings);
 &General::readhash("${General::swroot}/ethernet/vlans",\%vlansettings);
 
@@ -288,6 +295,8 @@ if ($cgiparams{"ACTION"} eq $Lang::tr{"save"}) {
 
        &General::writehash("${General::swroot}/ethernet/settings",\%ethsettings);
        &General::writehash("${General::swroot}/ethernet/vlans",\%vlansettings);
 
        &General::writehash("${General::swroot}/ethernet/settings",\%ethsettings);
        &General::writehash("${General::swroot}/ethernet/vlans",\%vlansettings);
+
+    $restart_notice = $Lang::tr{'zoneconf notice reboot'};
 }
 
 &Header::openbox('100%', 'left', $Lang::tr{"zoneconf nic assignment"});
 }
 
 &Header::openbox('100%', 'left', $Lang::tr{"zoneconf nic assignment"});
@@ -348,6 +357,8 @@ END
 
 print "</tr>";
 
 
 print "</tr>";
 
+my $slightlygrey = "";
+
 foreach (@nics) {
     my $mac = $_->[0];
        my $nic = $_->[1];
 foreach (@nics) {
     my $mac = $_->[0];
        my $nic = $_->[1];
@@ -376,7 +387,7 @@ foreach (@nics) {
                                        $checked = "checked";
                                }
 
                                        $checked = "checked";
                                }
 
-                               print "<td class='textcenter'><input type='radio' id='PPPACCESS $mac' name='PPPACCESS' value='$mac' $checked></td>";
+                               print "<td class='textcenter $slightlygrey'><input type='radio' id='PPPACCESS $mac' name='PPPACCESS' value='$mac' $checked></td>";
                            next; # We're done here
                    }
            }
                            next; # We're done here
                    }
            }
@@ -415,7 +426,7 @@ foreach (@nics) {
                my $vlan_disabled = ($wlan) ? "disabled" : "";
 
         print <<END
                my $vlan_disabled = ($wlan) ? "disabled" : "";
 
         print <<END
-            <td class="textcenter">
+            <td class="textcenter $slightlygrey">
                 <select name="ACCESS $uc $mac" onchange="document.getElementById('TAG $uc $mac').disabled = (this.value === 'VLAN' ? false : true)">
                     <option value="NONE" $access_selected{"NONE"}>- $Lang::tr{"zoneconf access none"} -</option>
                     <option value="NATIVE" $access_selected{"NATIVE"}>$Lang::tr{"zoneconf access native"}</option>
                 <select name="ACCESS $uc $mac" onchange="document.getElementById('TAG $uc $mac').disabled = (this.value === 'VLAN' ? false : true)">
                     <option value="NONE" $access_selected{"NONE"}>- $Lang::tr{"zoneconf access none"} -</option>
                     <option value="NATIVE" $access_selected{"NATIVE"}>$Lang::tr{"zoneconf access native"}</option>
@@ -428,12 +439,19 @@ END
     }
 
     print "</tr>";
     }
 
     print "</tr>";
+
+    if ($slightlygrey) {
+        $slightlygrey = "";
+    } else {
+        $slightlygrey = "slightlygrey";
+    }
 }
 
 print <<END
        </table>
 
        <div id="submit-container">
 }
 
 print <<END
        </table>
 
        <div id="submit-container">
+        $restart_notice
                <input type="submit" name="ACTION" value="$Lang::tr{"save"}">
        </div>
 </form>
                <input type="submit" name="ACTION" value="$Lang::tr{"save"}">
        </div>
 </form>
index af61b82bc61b61cabdf63c8f1749be7b98532d23..fc87196508a63ae42b2b8b1f01833e00d18a1ad9 100644 (file)
 'zoneconf val vlan amount assignment error' => 'Pro Zone kann nur ein VLAN verwendet werden.',
 'zoneconf val vlan tag assignment error' => 'Pro Netzwerkkarte kann derselbe VLAN-Tag nur einmal verwendet werden.',
 'zoneconf val zoneslave amount error' => 'Wenn eine Zone nicht im Brückenmodus ist, kann ihr nur eine Netzwerkkarte zugewiesen werden.',
 'zoneconf val vlan amount assignment error' => 'Pro Zone kann nur ein VLAN verwendet werden.',
 'zoneconf val vlan tag assignment error' => 'Pro Netzwerkkarte kann derselbe VLAN-Tag nur einmal verwendet werden.',
 'zoneconf val zoneslave amount error' => 'Wenn eine Zone nicht im Brückenmodus ist, kann ihr nur eine Netzwerkkarte zugewiesen werden.',
+'zoneconf notice reboot' => 'Bitte einen Neustart durchführen, um die Änderungen zu übernehmen.',
 );
 
 #EOF
 );
 
 #EOF
index 46fc01c26fce13d4ccc34056f05a2b3cb52e5b63..9d0d69df82a4bcd10a1761692033cfd12c4340ab 100644 (file)
 'zoneconf val vlan amount assignment error' => 'A zone cannot have more than one VLAN assigned.',
 'zoneconf val vlan tag assignment error' => 'You cannot use the same VLAN tag more than once per NIC.',
 'zoneconf val zoneslave amount error' => 'A zone that is not in bridge mode can\'t have more than one NIC assigned',
 'zoneconf val vlan amount assignment error' => 'A zone cannot have more than one VLAN assigned.',
 'zoneconf val vlan tag assignment error' => 'You cannot use the same VLAN tag more than once per NIC.',
 'zoneconf val zoneslave amount error' => 'A zone that is not in bridge mode can\'t have more than one NIC assigned',
+'zoneconf notice reboot' => 'Please reboot to apply your changes.',
 );
 
 #EOF
 );
 
 #EOF