From 58248a252d61605e1305b546e87c87821d97bbae Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 21 Mar 2011 19:05:33 +0000 Subject: [PATCH] Add default 'Select...' option each time, make sure definition is cleared when changing definition list --- importexport/inc/class.importexport_schedule_ui.inc.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/importexport/inc/class.importexport_schedule_ui.inc.php b/importexport/inc/class.importexport_schedule_ui.inc.php index 05083db68c..c90a9a73cf 100644 --- a/importexport/inc/class.importexport_schedule_ui.inc.php +++ b/importexport/inc/class.importexport_schedule_ui.inc.php @@ -199,6 +199,7 @@ } $options = self::get_select_options(array('type' => $type, 'appname'=>$appname)); $response->addScript("clear_options('exec[plugin]');"); + $response->addScript("selectbox_add_option('exec[plugin]','".lang('Select...')."', '',false);"); if(is_array($options['plugin'])) { foreach ($options['plugin'] as $value => $title) { $response->addScript("selectbox_add_option('exec[plugin]','$title', '$value',false);"); @@ -215,11 +216,13 @@ $options = self::get_select_options(array('appname'=>$appname, 'plugin'=>$plugin)); $response = new xajaxResponse(); $response->addScript("clear_options('exec[definition]');"); + $response->addScript("selectbox_add_option('exec[definition]','".lang('Select...')."', '',false);"); if(is_array($options['definition'])) { foreach ($options['definition'] as $value => $title) { $response->addScript("selectbox_add_option('exec[definition]','$title', '$value',false);"); } } + $response->addScript("document.getElementById('exec[definition]').value = ''"); return $response->getXML(); }