diff --git a/app/vars/var_edit.php b/app/vars/var_edit.php
index a0904ccafe..d0777bafc9 100644
--- a/app/vars/var_edit.php
+++ b/app/vars/var_edit.php
@@ -194,10 +194,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "
\n";
if ($action == "add") {
- echo "".$text['header-var_add']." \n";
+ echo "".$text['header-variable_add']." \n";
}
if ($action == "update") {
- echo "".$text['header-var_edit']." \n";
+ echo "".$text['header-variable_edit']." \n";
}
echo "";
echo " ";
@@ -245,7 +245,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " \n";
echo "\n";
echo " \n";
- echo " \n";
if ($var_enabled == "true") {
echo " ".$text['option-true']." \n";
}
@@ -269,27 +268,23 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " ".$text['label-order'].":\n";
echo " \n";
echo "\n";
- echo " \n";
- if (strlen(htmlspecialchars($var_order ))> 0) {
- echo " ".htmlspecialchars($var_order )." \n";
- }
+ echo " \n";
$i=0;
while($i<=999) {
- if (strlen($i) == 1) {
- echo " 00$i \n";
- }
- if (strlen($i) == 2) {
- echo " 0$i \n";
- }
- if (strlen($i) == 3) {
- echo " $i \n";
- }
-
- $i++;
+ $selected = ($var_order == $i) ? "selected" : null;
+ if (strlen($i) == 1) {
+ echo " 00$i \n";
+ }
+ if (strlen($i) == 2) {
+ echo " 0$i \n";
+ }
+ if (strlen($i) == 3) {
+ echo " $i \n";
+ }
+ $i++;
}
- echo " \n";
- echo " \n";
- echo "\n";
+ echo " \n";
+ echo " \n";
echo " \n";
echo " \n";
diff --git a/resources/functions.php b/resources/functions.php
index 8d3baa4636..03e0b5a44d 100644
--- a/resources/functions.php
+++ b/resources/functions.php
@@ -220,11 +220,11 @@
//html select other : build a select box from distinct items in db with option for other
global $domain_uuid;
- $html = "