From e1e9ccd8d3f8a0d773ed7af4fb886781fd45cb3a Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 15 Mar 2011 02:07:22 +0000 Subject: Fixes #3009 a bare bones developer tools settings git-svn-id: http://code.elgg.org/elgg/trunk@8713 36083f99-b078-4883-b0ff-0f9b5a30f544 --- .../views/default/forms/developers/settings.php | 37 +++++++++------------- 1 file changed, 15 insertions(+), 22 deletions(-) (limited to 'mod/developers/views/default/forms') diff --git a/mod/developers/views/default/forms/developers/settings.php b/mod/developers/views/default/forms/developers/settings.php index 2a3825500..371a2de2b 100644 --- a/mod/developers/views/default/forms/developers/settings.php +++ b/mod/developers/views/default/forms/developers/settings.php @@ -2,40 +2,33 @@ /** * Settings form body * - * @uses $vars['values'] Array of current values - * @uses $vars['options'] Array of possible options + * @uses $vars['values'] */ $form_body = '

' . elgg_echo('elgg_dev_tools:settings:explanation') . '

'; -$sections = array( - 'simple_cache' => 'checkbox', - 'views_cache' => 'checkbox', - //'display_errors' => 'checkbox', - 'debug_level' => 'pulldown', -); - -foreach ($sections as $name => $type) { - echo '

'; - if ($type == 'checkbox') { - echo elgg_view("input/$type", array( - 'internalname' => $name, - 'value' => $vars['settings'][$name], +foreach ($vars['data'] as $name => $info) { + echo '

'; + if ($info['type'] == 'checkbox') { + echo elgg_view("input/checkbox", array( + 'name' => $name, + 'value' => $info['value'], + 'checked' => $info['checked'], )); echo ''; echo '' . elgg_echo("developers:help:$name") . ''; } else { echo ''; - echo elgg_view("input/$type", array( - 'internalname' => $name, - 'value' => $vars['settings'][$name], - 'options' => $vars['options'][$name], + echo elgg_view("input/{$info['type']}", array( + 'name' => $name, + 'value' => $info['value'], + 'options_values' => $info['options_values'], )); echo '' . elgg_echo("developers:help:$name") . ''; } - echo '

'; + echo '
'; } -echo '

'; +echo '

'; echo elgg_view('input/submit', array('value' => elgg_echo('save'))); -echo '

'; \ No newline at end of file +echo '
'; -- cgit v1.2.3