Add an option to disable a given rich editor Asset site wide.

Added new column in table(default 0), label, hoverHelp and help field entry.
This commit is contained in:
Colin Kuskie 2006-02-14 23:43:32 +00:00
parent cd6759f311
commit ac39689ddb
5 changed files with 36 additions and 0 deletions

View file

@ -68,6 +68,10 @@ sub definition {
tableName=>'RichEdit',
className=>'WebGUI::Asset::RichEdit',
properties=>{
disableRichEditor=>{
fieldType=>'yesNo',
defaultValue=>0
},
askAboutRichEdit=>{
fieldType=>'yesNo',
defaultValue=>0
@ -266,6 +270,12 @@ sub getEditForm {
-hoverHelp=>$i18n->get('toolbar buttons description'),
-value=>$buttonGrid
);
$tabform->getTab("properties")->yesNo(
-value=>$self->getValue("disableRichEditor"),
-label=>$i18n->get('disable rich edit'),
-hoverHelp=>$i18n->get('disable rich edit description'),
-name=>"disableRichEditor"
);
$tabform->getTab("properties")->yesNo(
-value=>$self->getValue("askAboutRichEdit"),
-label=>$i18n->get('using rich edit'),
@ -390,6 +400,7 @@ sub getToolbar {
#-------------------------------------------------------------------
sub getRichEditor {
my $self = shift;
return '' if $self->getValue('disableRichEditor');
my $nameId = shift;
my @toolbarRow1 = split("\n",$self->getValue("toolbarRow1"));
push(@toolbarRow1,"contextmenu") if ($self->getValue("enableContextMenu"));

View file

@ -6,6 +6,11 @@ our $HELP = {
title => 'rich edit add/edit title',
body => 'rich edit add/edit body',
fields => [
{
title => 'disable rich edit',
description => 'disable rich edit description',
namespace => 'Asset_RichEdit',
},
{
title => 'using rich edit',
description => 'using rich edit description',

View file

@ -365,6 +365,17 @@ our $I18N = {
lastUpdated => 1119584956,
},
'disable rich edit' => {
message => q|Disable this Rich Editor?|,
lastUpdated => 1139957794,
},
'disable rich edit description' => {
message => q|This is a master disable for the rich editor, and will turn off the Rich
Edit across the entire site without any user intervention.|,
lastUpdated => 1139958262,
},
'using rich edit description' => {
message => q|Ask the user whether or not to use the Rich Editor on this form.|,
lastUpdated => 1119584875,