summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Kieffer <ckieffer@gmail.com>2009-10-23 22:25:36 -0600
committerChad Kieffer <ckieffer@gmail.com>2009-10-23 22:25:36 -0600
commit38141865926730506f55b62a499cb548b94d4bfe (patch)
tree0ba8c493152ba9327c4803783e867cb4a746f5f0
parente3f90a889d5bb4cb1214445bbf5be8c9815d8733 (diff)
Created user.css. Moved user-related form css to the new sheet.
-rw-r--r--modules/user/controllers/admin_users.php3
-rw-r--r--modules/user/controllers/users.php1
-rw-r--r--modules/user/css/user.css7
-rw-r--r--modules/user/helpers/user.php2
-rw-r--r--modules/user/helpers/user_theme.php28
5 files changed, 37 insertions, 4 deletions
diff --git a/modules/user/controllers/admin_users.php b/modules/user/controllers/admin_users.php
index 5950c358..a34d152a 100644
--- a/modules/user/controllers/admin_users.php
+++ b/modules/user/controllers/admin_users.php
@@ -313,7 +313,6 @@ class Admin_Users_Controller extends Admin_Controller {
static function _get_user_add_form_admin() {
$form = new Forge("admin/users/add_user", "", "post", array("id" => "g-add-user-form"));
- $form->set_attr('class', "g-narrow");
$group = $form->group("add_user")->label(t("Add User"));
$group->input("name")->label(t("Username"))->id("g-username")
->error_messages("in_use", t("There is already a user with that username"));
@@ -372,7 +371,7 @@ class Admin_Users_Controller extends Admin_Controller {
private function _get_group_add_form_admin() {
$form = new Forge("admin/users/add_group", "", "post", array("id" => "g-add-group-form"));
- $form->set_attr('class', "g-narrow");
+ $form->set_attr('class', "g-one-quarter");
$form_group = $form->group("add_group")->label(t("Add Group"));
$form_group->input("name")->label(t("Name"))->id("g-name");
$form_group->inputs["name"]->error_messages(
diff --git a/modules/user/controllers/users.php b/modules/user/controllers/users.php
index b03a47cc..2be49065 100644
--- a/modules/user/controllers/users.php
+++ b/modules/user/controllers/users.php
@@ -68,7 +68,6 @@ class Users_Controller extends Controller {
private function _get_edit_form($user) {
$form = new Forge("users/update/$user->id", "", "post", array("id" => "g-edit-user-form"));
- $form->set_attr("class", "g-narrow");
$group = $form->group("edit_user")->label(t("Edit User: %name", array("name" => $user->name)));
$group->input("full_name")->label(t("Full Name"))->id("g-fullname")->value($user->full_name);
self::_add_locale_dropdown($group, $user);
diff --git a/modules/user/css/user.css b/modules/user/css/user.css
new file mode 100644
index 00000000..aa21f9c3
--- /dev/null
+++ b/modules/user/css/user.css
@@ -0,0 +1,7 @@
+#g-login-form,
+#g-add-user-form
+#g-edit-user-form,
+#g-delete-user-form,
+#g-user-admin {
+ width: 270px;
+} \ No newline at end of file
diff --git a/modules/user/helpers/user.php b/modules/user/helpers/user.php
index e7e75d64..47f57d3d 100644
--- a/modules/user/helpers/user.php
+++ b/modules/user/helpers/user.php
@@ -26,7 +26,7 @@
class user_Core {
static function get_login_form($url) {
$form = new Forge($url, "", "post", array("id" => "g-login-form"));
- $form->set_attr('class', "g-narrow");
+ $form->set_attr('class', "g-one-quarter");
$group = $form->group("login")->label(t("Login"));
$group->input("name")->label(t("Username"))->id("g-username")->class(null);
$group->password("password")->label(t("Password"))->id("g-password")->class(null);
diff --git a/modules/user/helpers/user_theme.php b/modules/user/helpers/user_theme.php
new file mode 100644
index 00000000..191fd15a
--- /dev/null
+++ b/modules/user/helpers/user_theme.php
@@ -0,0 +1,28 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Gallery - a web based photo album viewer and editor
+ * Copyright (C) 2000-2009 Bharat Mediratta
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+class user_theme_Core {
+ static function head($theme) {
+ $theme->css("user.css");
+ }
+
+ static function admin_head($theme) {
+ $theme->css("user.css");
+ }
+} \ No newline at end of file