Permalink
Browse files

Cleanup issues with the original fix for #779

  • Loading branch information...
1 parent 6469763 commit 48326ad01708fcfa020283e2ad8b2cae4ede1600 @talmdal talmdal committed Sep 17, 2009
Showing with 8 additions and 3 deletions.
  1. +2 −2 modules/tag/controllers/admin_tags.php
  2. +1 −1 modules/tag/js/tag.js
  3. +5 −0 themes/admin_default/css/screen.css
@@ -81,15 +81,15 @@ public function rename($id) {
kohana::show_404();
}
- //Don't use a form as the form is dynamically created in the js
+ // Don't use a form as the form is dynamically created in the js
$post = new Validation($_POST);
$post->add_rules("name", "required", "length[1,64]");
$valid = $post->validate();
if ($valid) {
$new_name = $this->input->post("name");
$new_tag = ORM::factory("tag")->where("name", $new_name)->find();
if ($new_tag->loaded) {
- $error_msg = "There is already a tag with that name";
+ $error_msg = t("There is already a tag with that name")->__toString();
$valid = false;
}
} else {
View
@@ -69,7 +69,7 @@ function editInPlace(element) {
window.location.reload();
} else if (data.result == "error") {
$("#gRenameTagForm #name")
- .css("border", "2px solid red")
+ .addClass("gError")
.focus();
$("#gTagAdmin").before("<p id=\"gEditErrorMessage\" class=\"gError\">" + data.message + "</p>");
}
@@ -1034,6 +1034,11 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser {
float: right;
}
+#gRenameTagForm input[type="text"].gError {
+ border: 2px solid red;
+ background: none;
+}
+
#gRenameTagForm input[type="submit"] {
height: 25px;
}

0 comments on commit 48326ad

Please sign in to comment.