From 221d5ac0aaabfd4b713ed13c3b11ef1b78b4a107 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 28 Mar 2008 19:54:53 +0000 Subject: [PATCH] fixed: subscription group in CS edit not internationalized --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Asset/Wobject/Collaboration.pm | 10 ++++----- lib/WebGUI/Form/SubscriptionGroup.pm | 21 ++++++------------- .../i18n/English/Asset_Collaboration.pm | 9 ++++++++ 4 files changed, 21 insertions(+), 20 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 0ae8e75b3..aa79fd058 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -6,6 +6,7 @@ - fixed: Thingy: on demo sites the edit and delete icons in search results have wrong url's - fixed: Form::FieldType->getTypes should exclude Form::Slider base class (Yung Han Khoe) - upgraded to TinyMCE 3 + - fixed: subscription group in CS edit not internationalized 7.5.8 - moved Gallery utility methods to WebGUI::Utility::Gallery diff --git a/lib/WebGUI/Asset/Wobject/Collaboration.pm b/lib/WebGUI/Asset/Wobject/Collaboration.pm index 9660f5a9b..91945d846 100644 --- a/lib/WebGUI/Asset/Wobject/Collaboration.pm +++ b/lib/WebGUI/Asset/Wobject/Collaboration.pm @@ -739,18 +739,18 @@ sub definition { hoverHelp=>$i18n->get('use captcha hover help'), }, subscriptionGroupId =>{ - fieldType=>"subscriptionGroup", + fieldType=>"subscriptionGroup", tab=>'security', - label=>"subscription group label", - hoverHelp=>"subscription group hoverHelp", + label=>$i18n->get("subscription group label"), + hoverHelp=>$i18n->get("subscription group hoverHelp"), noFormPost=>1, defaultValue=>undef, }, groupToEditPost=>{ tab=>"security", - label=>'Group to Edit Posts', + label=>$i18n->get('group to edit label'), excludeGroups=>[1,7], - hoverHelp=>'Group to Edit Posts', + hoverHelp=>$i18n->get('group to edit hoverhelp'), uiLevel=>6, fieldType=>'group', filter=>'fixId', diff --git a/lib/WebGUI/Form/SubscriptionGroup.pm b/lib/WebGUI/Form/SubscriptionGroup.pm index f1e2ef0da..51e7edc9a 100644 --- a/lib/WebGUI/Form/SubscriptionGroup.pm +++ b/lib/WebGUI/Form/SubscriptionGroup.pm @@ -15,7 +15,7 @@ package WebGUI::Form::SubscriptionGroup; =cut use strict; -use base 'WebGUI::Form::Hidden'; +use base 'WebGUI::Form::Control'; use WebGUI::International; =head1 NAME @@ -76,24 +76,15 @@ Renders the form field to HTML as a table row. The row is not displayed because =cut -sub toHtmlWithWrapper { - my $self = shift; +sub toHtml { + my $self = shift; my $value = $self->fixMacros($self->fixQuotes($self->fixSpecialCharacters($self->get("value")))) || ''; - + my $manageButton = " "; - if($value) { + if ($value) { $manageButton = $self->session->icon->manage("op=editGroup;gid=".$value); } - - if ($self->passUiLevelCheck) { - my ($fieldClass, $rowClass, $labelClass, $hoverHelp, $subtext) = $self->prepareWrapper; - return ' - - '.$manageButton.$self->toHtmlAsHidden." - \n"; - } else { - return $self->toHtmlAsHidden; - } + return $manageButton . $self->toHtmlAsHidden; } diff --git a/lib/WebGUI/i18n/English/Asset_Collaboration.pm b/lib/WebGUI/i18n/English/Asset_Collaboration.pm index c8d8cc2bd..37e3f5324 100644 --- a/lib/WebGUI/i18n/English/Asset_Collaboration.pm +++ b/lib/WebGUI/i18n/English/Asset_Collaboration.pm @@ -1609,6 +1609,15 @@ the Collaboration Asset, the user will be notified.|, message => q|Manage the users in the subscription group for this Collaboration System|, lastUpdated => 1170543345, }, + + 'group to edit label' => { + message => q|Group to Edit Posts|, + lastUpdated => 1206733328, + }, + 'group to edit hoverhelp' => { + message => q|Group to Edit Posts|, + lastUpdated => 1206733328, + }, 'use captcha label' => { message => q|Use Post Captcha|,