mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
Added new reset button. bug #4123
This commit is contained in:
parent
0ae6a2cad5
commit
7be6fd6684
1 changed files with 13 additions and 3 deletions
|
@ -15,8 +15,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// get parameters
|
// get parameters
|
||||||
$params = new Object;
|
$param = new Object;
|
||||||
$param->filter = required_param( 'filter' );
|
$param->filter = required_param( 'filter' );
|
||||||
|
$param->submit = optional_param( 'submit','',PARAM_ALPHA );
|
||||||
|
$param->reset = optional_param( 'reset','',PARAM_ALPHA );
|
||||||
$filtername = substr( $param->filter, strpos( $param->filter, '/' )+1 ) ;
|
$filtername = substr( $param->filter, strpos( $param->filter, '/' )+1 ) ;
|
||||||
|
|
||||||
// get translated strings for use on page
|
// get translated strings for use on page
|
||||||
|
@ -25,11 +27,16 @@
|
||||||
$txt->administration = get_string( 'administration' );
|
$txt->administration = get_string( 'administration' );
|
||||||
$txt->configuration = get_string( 'configuration' );
|
$txt->configuration = get_string( 'configuration' );
|
||||||
|
|
||||||
|
|
||||||
//======================
|
//======================
|
||||||
// Process Actions
|
// Process Actions
|
||||||
//======================
|
//======================
|
||||||
|
|
||||||
|
// if reset pressed let filter config page handle it
|
||||||
|
$forcereset = false;
|
||||||
|
if (!empty($param->reset)) {
|
||||||
|
$forcereset = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
if ($config = data_submitted()) {
|
if ($config = data_submitted()) {
|
||||||
|
|
||||||
// check session key
|
// check session key
|
||||||
|
@ -80,7 +87,10 @@
|
||||||
|
|
||||||
<?php include "$CFG->dirroot/$param->filter/filterconfig.html"; ?>
|
<?php include "$CFG->dirroot/$param->filter/filterconfig.html"; ?>
|
||||||
|
|
||||||
<center><input type="submit" value="<?php print_string('savechanges'); ?>" /></center>
|
<center>
|
||||||
|
<input type="submit" name="submit" value="<?php print_string('savechanges'); ?>" />
|
||||||
|
<input type="submit" name="reset" value="<?php echo print_string('resettodefaults'); ?>" />
|
||||||
|
</center>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue