Fixed #421: category creation now correctly fires page validation.

This commit is contained in:
Dario Solera 2009-11-28 13:45:19 +00:00
parent ec33ba95df
commit 93111258e6
2 changed files with 4 additions and 0 deletions

View file

@ -47,6 +47,7 @@ namespace ScrewTurn.Wiki {
lblNewCategoryResult.CssClass = ""; lblNewCategoryResult.CssClass = "";
lblNewCategoryResult.Text = ""; lblNewCategoryResult.Text = "";
Page.Validate("newcat");
if(!Page.IsValid) return; if(!Page.IsValid) return;
txtNewCategory.Text = txtNewCategory.Text.Trim(); txtNewCategory.Text = txtNewCategory.Text.Trim();

View file

@ -699,6 +699,9 @@ namespace ScrewTurn.Wiki {
lblCategoryResult.Text = ""; lblCategoryResult.Text = "";
lblCategoryResult.CssClass = ""; lblCategoryResult.CssClass = "";
Page.Validate("category");
if(!Page.IsValid) return;
string fullName = NameTools.GetFullName(DetectNamespace(), txtCategory.Text); string fullName = NameTools.GetFullName(DetectNamespace(), txtCategory.Text);
Pages.CreateCategory(DetectNamespaceInfo(), txtCategory.Text, FindAppropriateProvider()); Pages.CreateCategory(DetectNamespaceInfo(), txtCategory.Text, FindAppropriateProvider());