summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/info/views/info_block.html.php8
-rw-r--r--modules/user/controllers/login.php5
-rw-r--r--modules/user/helpers/user_block.php6
-rw-r--r--modules/user/js/user.js23
4 files changed, 8 insertions, 34 deletions
diff --git a/modules/info/views/info_block.html.php b/modules/info/views/info_block.html.php
index 6ef5c372..05228ec1 100644
--- a/modules/info/views/info_block.html.php
+++ b/modules/info/views/info_block.html.php
@@ -3,16 +3,18 @@
<tbody>
<tr>
<th><?= _("Title:") ?></th>
- <td><?= $item->title_edit; ?></td>
+ <td><?= $item->title; ?></td>
</tr>
<tr>
<th><?= _("Description:") ?></th>
- <td><?= $item->description_edit; ?></td>
+ <td><?= $item->description; ?></td>
</tr>
+ <? if ($item->id != 1): ?>
<tr>
<th><?= _("Name:") ?></th>
- <td><?= $item->name_edit; ?></td>
+ <td><?= $item->name; ?></td>
</tr>
+ <? endif ?>
<? if ($item->owner): ?>
<tr>
<th><?= _("Owner:") ?></th>
diff --git a/modules/user/controllers/login.php b/modules/user/controllers/login.php
index 3215bec7..36eab292 100644
--- a/modules/user/controllers/login.php
+++ b/modules/user/controllers/login.php
@@ -32,10 +32,7 @@ class Login_Controller extends Controller {
user::login($user);
log::add("user", "User $user->name logged in",
log::INFO, html::anchor("user/$user->id", $user->name));
- if ($continue = $this->input->get("continue")) {
- url::redirect($continue);
- }
- return;
+ rest::http_status(rest::ACCEPTED);
} else {
log::add("user", sprintf(_("Failed login for %s"), $group->inputs["name"]->value),
log::WARNING);
diff --git a/modules/user/helpers/user_block.php b/modules/user/helpers/user_block.php
index 51d4908d..5e406fef 100644
--- a/modules/user/helpers/user_block.php
+++ b/modules/user/helpers/user_block.php
@@ -19,14 +19,12 @@
*/
class user_block_Core {
public static function head($theme) {
- $url = url::file("modules/user/js/user.js");
- $script[] = "<script src=\"$url\" type=\"text/javascript\"></script>";
+ // @todo: move this into the theme
$user = user::active();
if (!user::active()->guest) {
$url = url::file("lib/jquery.jeditable.js");
- $script[] = "<script src=\"$url\" type=\"text/javascript\"></script>";
+ return "<script src=\"$url\" type=\"text/javascript\"></script>";
}
- return implode("\n", $script);
}
public static function header_top($theme) {
diff --git a/modules/user/js/user.js b/modules/user/js/user.js
deleted file mode 100644
index d8488092..00000000
--- a/modules/user/js/user.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Ajaxify user login form
- */
-function ajaxify_login_form(event) {
- event.preventDefault();
- $("#gLoginForm").ajaxForm({
- target: "#gDialog",
- success: function(responseText, statusText) {
- if (!responseText) {
- window.location.reload();
- } else {
- ajaxify_login_form(event);
- }
- }
- });
- return false;
-}
-
-$("document").ready(function() {
- $.listen("submit", "#gLoginForm", function(event) {
- ajaxify_login_form(event);
- });
-});