diff --git a/libraries/Util.php b/libraries/Util.php
index 64eda190a4..ca6589ae75 100644
--- a/libraries/Util.php
+++ b/libraries/Util.php
@@ -2604,40 +2604,31 @@ class Util
foreach ($choices as $choice_value => $choice_label) {
- if (! empty($class)) {
- $radio_html .= '
';
- }
-
if (! $id_prefix) {
$id_prefix = $html_field_name;
}
$html_field_id = $id_prefix . '_' . $choice_value;
- $radio_html .= ''
- . ($escape_label
- ? htmlspecialchars($choice_label)
- : $choice_label)
- . '';
-
- if ($line_break) {
- $radio_html .= '
';
+ else{
+ $checked = 0;
}
-
- if (! empty($class)) {
- $radio_html .= '
';
- }
- $radio_html .= "\n";
+ $radio_html .= Template::get('radio_fields')->render([
+ 'class' => $class,
+ 'html_field_name' => $html_field_name,
+ 'html_field_id' => $html_field_id,
+ 'choice_value' => $choice_value,
+ 'is_line_break' => $line_break,
+ 'choice_label' => $choice_label,
+ 'escape_label' => $escape_label,
+ 'checked' => $checked
+ ]);
}
return $radio_html;
+
}
/**
@@ -2660,38 +2651,27 @@ class Util
public static function getDropdown(
$select_name, $choices, $active_choice, $id, $class = '', $placeholder = null
) {
- $result = '| Inside tables: | '
. '',
$actualHtml
);
@@ -2559,9 +2564,10 @@ class PMA_ServerPrivileges_Test extends PHPUnit_Framework_TestCase
);
$this->assertEquals(
'',
+ . 'Native MySQL authentication'. "\n" .'',
$actualHtml
);
@@ -2574,9 +2580,11 @@ class PMA_ServerPrivileges_Test extends PHPUnit_Framework_TestCase
);
$this->assertEquals(
'',
+ . 'id="select_authentication_plugin_cp" >'
+ . "\n"
+ . ''
+ . "\n" . '',
$actualHtml
);
diff --git a/test/libraries/common/PMA_getDropdown_test.php b/test/libraries/common/PMA_getDropdown_test.php
index 40974f184b..107c1f686d 100644
--- a/test/libraries/common/PMA_getDropdown_test.php
+++ b/test/libraries/common/PMA_getDropdown_test.php
@@ -33,7 +33,7 @@ class PMA_GetDropdownTest extends PHPUnit_Framework_TestCase
$id = "test_<dropdown>_name";
$result = '';
+ . htmlspecialchars($id) . '" >' . "\n" . '';
$this->assertEquals(
$result,
@@ -56,15 +56,15 @@ class PMA_GetDropdownTest extends PHPUnit_Framework_TestCase
$id = "test_<dropdown>_name";
$result = '';
+ . htmlspecialchars($id) . '" >';
foreach ($choices as $one_choice_value => $one_choice_label) {
- $result .= '';
+ $result .= "\n" . '';
$this->assertEquals(
$result,
@@ -87,14 +87,16 @@ class PMA_GetDropdownTest extends PHPUnit_Framework_TestCase
$id = "test_<dropdown>_name";
$result = '';
+ . htmlspecialchars($id) . '" >';
foreach ($choices as $one_choice_value => $one_choice_label) {
+ $result .= "\n";
$result .= '';
$this->assertEquals(
diff --git a/test/libraries/common/PMA_getRadioFields_test.php b/test/libraries/common/PMA_getRadioFields_test.php
index 734cce495a..6e60d9d29d 100644
--- a/test/libraries/common/PMA_getRadioFields_test.php
+++ b/test/libraries/common/PMA_getRadioFields_test.php
@@ -54,6 +54,7 @@ class PMA_GetRadioFieldsTest extends PHPUnit_Framework_TestCase
$out .= ' />' . "\n";
$out .= '';
+ $out .= "\n";
$out .= ' ';
$out .= "\n";
}
@@ -86,6 +87,7 @@ class PMA_GetRadioFieldsTest extends PHPUnit_Framework_TestCase
$out .= ' />' . "\n";
$out .= '';
+ $out .= "\n";
$out .= ' ';
$out .= "\n";
}
@@ -114,6 +116,7 @@ class PMA_GetRadioFieldsTest extends PHPUnit_Framework_TestCase
foreach ($choices as $choice_value => $choice_label) {
$html_field_id = $name . '_' . $choice_value;
$out .= '';
+ $out .= "\n";
$out .= '' . $choice_label
. '';
+ $out .= "\n";
$out .= ' ';
+ $out .= "\n";
$out .= ' ';
$out .= "\n";
}
@@ -190,6 +195,7 @@ class PMA_GetRadioFieldsTest extends PHPUnit_Framework_TestCase
$out .= ' />' . "\n";
$out .= '';
+ $out .= "\n";
$out .= ' ';
$out .= "\n";
}
@@ -224,6 +230,7 @@ class PMA_GetRadioFieldsTest extends PHPUnit_Framework_TestCase
$out .= ' />' . "\n";
$out .= '';
+ $out .= "\n";
$out .= ' ';
$out .= "\n";
}
@@ -252,6 +259,7 @@ class PMA_GetRadioFieldsTest extends PHPUnit_Framework_TestCase
foreach ($choices as $choice_value => $choice_label) {
$html_field_id = $name . '_' . $choice_value;
$out .= '';
+ $out .= "\n";
$out .= ''
. htmlspecialchars($choice_label) . '';
+ $out .= "\n";
$out .= ' ';
+ $out .= "\n";
$out .= ' ';
$out .= "\n";
}
|