From: <var...@us...> - 2021-08-04 16:36:07
|
Revision: 10434 http://sourceforge.net/p/phpwiki/code/10434 Author: vargenau Date: 2021-08-04 16:36:04 +0000 (Wed, 04 Aug 2021) Log Message: ----------- configurator.php: use CSS for green and red color Modified Paths: -------------- trunk/configurator.php Modified: trunk/configurator.php =================================================================== --- trunk/configurator.php 2021-08-04 16:16:58 UTC (rev 10433) +++ trunk/configurator.php 2021-08-04 16:36:04 UTC (rev 10434) @@ -230,6 +230,13 @@ color: inherit; } + .green { + color: green; + } + + .red { + color: red; + } --> </style> <script type="text/javascript"> @@ -238,7 +245,7 @@ var msg = document.getElementById(output); if (accepted) { if (msg && msg.innerHTML) { - msg.innerHTML = "<span color=\"green\">Input accepted.</span>"; + msg.innerHTML = "<span class=\"green\">Input accepted.</span>"; } } else { var index; @@ -246,7 +253,7 @@ error = error.substring(0, index) + value + error.substring(index + 2); } if (msg) { - msg.innerHTML = "<span color=\"red\">" + error + "</span>"; + msg.innerHTML = "<span class=\"red\">" + error + "</span>"; } } var submit; @@ -1657,7 +1664,7 @@ $size = strlen($this->default_value) > 45 ? 90 : 50; return $this->get_config_item_header() . "<input type=\"text\" size=\"50\" name=\"" . $this->get_config_item_name() . "\" value=\"" . htmlspecialchars($this->default_value) . "\" " . - $this->jscheck . " />" . "<p id=\"" . $this->get_config_item_id() . "\" style=\"color: green\">Input accepted.</p>"; + $this->jscheck . " />" . "<p id=\"" . $this->get_config_item_id() . "\" class=\"green\">Input accepted.</p>"; } } @@ -1778,7 +1785,7 @@ return $this->get_config_item_header() . "<input type=\"text\" size=\"$size\" name=\"" . htmlentities($this->get_config_item_name()) . "\" value=\"" . htmlentities($this->default_value) . "\" {$this->jscheck} />" - . "<p id=\"" . $this->get_config_item_id() . "\" style=\"color: green\">Input accepted.</p>"; + . "<p id=\"" . $this->get_config_item_id() . "\" class=\"green\">Input accepted.</p>"; } } @@ -1823,9 +1830,9 @@ . "<input type=\"text\" size=\"50\" name=\"" . $this->get_config_item_name() . "\" value=\"" . $this->default_value . "\" {$this->jscheck} />"; if (empty($this->default_value)) - return $s . "<p id=\"" . $this->get_config_item_id() . "\" style=\"color: red\">Cannot be empty.</p>"; + return $s . "<p id=\"" . $this->get_config_item_id() . "\" class=\"red\">Cannot be empty.</p>"; else - return $s . "<p id=\"" . $this->get_config_item_id() . "\" style=\"color: green\">Input accepted.</p>"; + return $s . "<p id=\"" . $this->get_config_item_id() . "\" class=\"green\">Input accepted.</p>"; } } @@ -2030,10 +2037,11 @@ . "\" value=\"" . $value . "\" {$this->jscheck} />" . " <input type=\"submit\" name=\"create\" value=\"Create Random Password\" />"; if (empty($value)) - $s .= "<p id=\"" . $this->get_config_item_id() . "\" style=\"color: red\">Cannot be empty.</p>"; + $s .= "<p id=\"" . $this->get_config_item_id() . "\" class=\"red\">Cannot be empty.</p>"; elseif (strlen($this->default_value) < 4) - $s .= "<p id=\"" . $this->get_config_item_id() . "\" style=\"color: red\">Must be longer than 4 chars.</p>"; else - $s .= "<p id=\"" . $this->get_config_item_id() . "\" style=\"color: green\">Input accepted.</p>"; + $s .= "<p id=\"" . $this->get_config_item_id() . "\" class=\"red\">Must be longer than 4 chars.</p>"; + else + $s .= "<p id=\"" . $this->get_config_item_id() . "\" class=\"green\">Input accepted.</p>"; return $s; } } @@ -2058,7 +2066,7 @@ $ta = $this->get_config_item_header(); $ta .= "<textarea cols=\"18\" rows=\"" . $rows . "\" name=\"" . $this->get_config_item_name() . "\" {$this->jscheck}>"; $ta .= $list_values . "</textarea>"; - $ta .= "<p id=\"" . $this->get_config_item_id() . "\" style=\"color: green\">Input accepted.</p>"; + $ta .= "<p id=\"" . $this->get_config_item_id() . "\" class=\"green\">Input accepted.</p>"; return $ta; } } @@ -2097,7 +2105,7 @@ $ta = $this->get_config_item_header(); $ta .= "<textarea cols=\"18\" rows=\"" . $rows . "\" name=\"" . $this->get_config_item_name() . "\" {$this->jscheck}>"; $ta .= $list_values . "</textarea>"; - $ta .= "<p id=\"" . $this->get_config_item_id() . "\" style=\"color: green\">Input accepted.</p>"; + $ta .= "<p id=\"" . $this->get_config_item_id() . "\" class=\"green\">Input accepted.</p>"; return $ta; } } @@ -2134,7 +2142,7 @@ $ta = $this->get_config_item_header(); $ta .= "<textarea cols=\"18\" rows=\"" . $rows . "\" name=\"" . $this->get_config_item_name() . "\" {$this->jscheck}>"; $ta .= $list_values . "</textarea>"; - $ta .= "<p id=\"" . $this->get_config_item_id() . "\" style=\"color: green\">Input accepted.</p>"; + $ta .= "<p id=\"" . $this->get_config_item_id() . "\" class=\"green\">Input accepted.</p>"; return $ta; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |