mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
administration MDL-21392 add hidesavebutton() for admin_settingpage class
This commit is contained in:
parent
0aed347fd1
commit
721312bd2c
2 changed files with 15 additions and 2 deletions
|
@ -126,7 +126,9 @@ if (empty($SITE->fullname)) {
|
|||
|
||||
echo $settingspage->output_html();
|
||||
|
||||
if ($settingspage->displaysavebutton) {
|
||||
echo '<div class="form-buttons"><input class="form-submit" type="submit" value="'.get_string('savechanges','admin').'" /></div>';
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
|
|
|
@ -1005,6 +1005,9 @@ class admin_settingpage implements part_of_admin_tree {
|
|||
public $path;
|
||||
public $visiblepath;
|
||||
|
||||
/** display the save changes button **/
|
||||
public $displaysavebutton;
|
||||
|
||||
/**
|
||||
* see admin_settingpage for details of this function
|
||||
*
|
||||
|
@ -1026,6 +1029,7 @@ class admin_settingpage implements part_of_admin_tree {
|
|||
}
|
||||
$this->hidden = $hidden;
|
||||
$this->context = $context;
|
||||
$this->displaysavebutton = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1048,6 +1052,13 @@ class admin_settingpage implements part_of_admin_tree {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide the Save Changes button
|
||||
*/
|
||||
public function hidesavebutton() {
|
||||
$this->displaysavebutton = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Search string in settings page.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue