aboutsummaryrefslogtreecommitdiff
path: root/mod/developers/views
diff options
context:
space:
mode:
Diffstat (limited to 'mod/developers/views')
-rw-r--r--mod/developers/views/default/admin/developers/settings.php7
-rw-r--r--mod/developers/views/default/developers/css.php8
-rw-r--r--mod/developers/views/default/forms/developers/settings.php41
3 files changed, 56 insertions, 0 deletions
diff --git a/mod/developers/views/default/admin/developers/settings.php b/mod/developers/views/default/admin/developers/settings.php
new file mode 100644
index 000000000..990d77263
--- /dev/null
+++ b/mod/developers/views/default/admin/developers/settings.php
@@ -0,0 +1,7 @@
+<?php
+/**
+ * Developer settings
+ */
+
+$form_vars = array('id' => 'developer-settings-form');
+echo elgg_view_form('developers/settings', $form_vars, array()); \ No newline at end of file
diff --git a/mod/developers/views/default/developers/css.php b/mod/developers/views/default/developers/css.php
index faa549796..77c27d6b2 100644
--- a/mod/developers/views/default/developers/css.php
+++ b/mod/developers/views/default/developers/css.php
@@ -8,4 +8,12 @@
width: 100%;
height: 600px;
border: none;
+}
+#developer-settings-form label {
+ margin-right: 5px;
+}
+#developer-settings-form .elgg-text-help {
+ display: block;
+ font-size: 85%;
+ font-style: italic;
} \ No newline at end of file
diff --git a/mod/developers/views/default/forms/developers/settings.php b/mod/developers/views/default/forms/developers/settings.php
new file mode 100644
index 000000000..2a3825500
--- /dev/null
+++ b/mod/developers/views/default/forms/developers/settings.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Settings form body
+ *
+ * @uses $vars['values'] Array of current values
+ * @uses $vars['options'] Array of possible options
+ */
+
+$form_body = '<p>' . elgg_echo('elgg_dev_tools:settings:explanation') . '</p>';
+
+$sections = array(
+ 'simple_cache' => 'checkbox',
+ 'views_cache' => 'checkbox',
+ //'display_errors' => 'checkbox',
+ 'debug_level' => 'pulldown',
+);
+
+foreach ($sections as $name => $type) {
+ echo '<p>';
+ if ($type == 'checkbox') {
+ echo elgg_view("input/$type", array(
+ 'internalname' => $name,
+ 'value' => $vars['settings'][$name],
+ ));
+ echo '<label>' . elgg_echo("developers:label:$name") . '</label>';
+ echo '<span class="elgg-text-help">' . elgg_echo("developers:help:$name") . '</span>';
+ } else {
+ echo '<label>' . elgg_echo("developers:label:$name") . '</label>';
+ echo elgg_view("input/$type", array(
+ 'internalname' => $name,
+ 'value' => $vars['settings'][$name],
+ 'options' => $vars['options'][$name],
+ ));
+ echo '<span class="elgg-text-help">' . elgg_echo("developers:help:$name") . '</span>';
+ }
+ echo '</p>';
+}
+
+echo '<p>';
+echo elgg_view('input/submit', array('value' => elgg_echo('save')));
+echo '</p>'; \ No newline at end of file