mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
MDL-12756 print save button in admin search only when there are settings to save; merged from MOODLE_19_STABLE
This commit is contained in:
parent
64874c5aac
commit
8bbfc1e321
@ -51,7 +51,6 @@ echo '<fieldset>';
|
||||
echo '<div class="clearer"><!-- --></div>';
|
||||
if ($resultshtml != '') {
|
||||
echo $resultshtml;
|
||||
echo '<div class="form-buttons"><input class="form-submit" type="submit" value="'.get_string('savechanges','admin').'" /></div>';
|
||||
} else {
|
||||
echo get_string('noresults','admin');
|
||||
}
|
||||
|
@ -4177,6 +4177,7 @@ function admin_search_settings_html($query) {
|
||||
$adminroot =& admin_get_root();
|
||||
$findings = $adminroot->search($query);
|
||||
$return = '';
|
||||
$savebutton = false;
|
||||
|
||||
foreach ($findings as $found) {
|
||||
$page = $found->page;
|
||||
@ -4193,6 +4194,7 @@ function admin_search_settings_html($query) {
|
||||
continue;
|
||||
}
|
||||
if (!empty($settings)) {
|
||||
$savebutton = true;
|
||||
$return .= '<fieldset class="adminsettings">'."\n";
|
||||
foreach ($settings as $setting) {
|
||||
$return .= '<div class="clearer"><!-- --></div>'."\n";
|
||||
@ -4211,6 +4213,10 @@ function admin_search_settings_html($query) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($savebutton) {
|
||||
$return .= '<div class="form-buttons"><input class="form-submit" type="submit" value="'.get_string('savechanges','admin').'" /></div>';
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user