summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorFelix Rabinovich <virshu@users.sourceforge.net>2009-01-10 22:04:49 +0000
committerFelix Rabinovich <virshu@users.sourceforge.net>2009-01-10 22:04:49 +0000
commit705c55fb798c97dfb398cad23670fce2f5e16fb4 (patch)
tree8b0c7128f53adcb1633f8f3c7888458cbbc98905 /core
parent144f8c342b35b8940b93e5934f0c149266f5c313 (diff)
Submit theme values
Diffstat (limited to 'core')
-rw-r--r--core/controllers/admin_themes.php8
-rw-r--r--core/helpers/theme.php3
-rw-r--r--core/views/admin_themes.html.php1
3 files changed, 9 insertions, 3 deletions
diff --git a/core/controllers/admin_themes.php b/core/controllers/admin_themes.php
index 9896ce50..278fb8f9 100644
--- a/core/controllers/admin_themes.php
+++ b/core/controllers/admin_themes.php
@@ -28,8 +28,8 @@ class Admin_Themes_Controller extends Admin_Controller {
$file = THEMEPATH . $theme_name . "/theme.info";
$theme_info = new ArrayObject(parse_ini_file($file), ArrayObject::ARRAY_AS_PROPS);
- $details = theme::get_edit_form_admin($theme_info);
$theme_info['id'] = $theme_name;
+ $details = theme::get_edit_form_admin($theme_info);
$theme_info['details'] = $details;
if ($theme_info->admin) {
$admin_themes[$theme_name] = $theme_info;
@@ -61,7 +61,11 @@ class Admin_Themes_Controller extends Admin_Controller {
$form = theme::get_edit_form_admin($theme_info);
$valid = $form->validate();
if ($valid) {
- ;
+ print json_encode(array("result" => "success",
+ "message" => t("Theme was successfully updated")));
+ } else {
+ print json_encode(array("result" => "error",
+ "message" => t("Error saving theme values")));
}
}
diff --git a/core/helpers/theme.php b/core/helpers/theme.php
index 65e1eb20..1d3e4a8f 100644
--- a/core/helpers/theme.php
+++ b/core/helpers/theme.php
@@ -39,7 +39,8 @@ class theme_Core {
}
public static function get_edit_form_admin($theme) {
- $form = new Forge("admin/themes/edit/{$theme->id}/bogus");
+ $form = new Forge("admin/themes/edit/{$theme->id}",
+ '', null, array("id" =>"gThemeDetailsForm"));
$group = $form->group("edit_theme")->label($theme->description);
$group->input("page_size")->label(t("Items per page"))->id("gPageSize")->
value(self::_get_var($theme->id, "page_size", 90));
diff --git a/core/views/admin_themes.html.php b/core/views/admin_themes.html.php
index fffd23da..64df7608 100644
--- a/core/views/admin_themes.html.php
+++ b/core/views/admin_themes.html.php
@@ -75,5 +75,6 @@
</form>
</div>
<div id="gThemeDetails">
+ <p id="gMessage"></p>
<?= $themes[$active]->details ?>
</div>