asset help moved into namespace, all International calls updated to support that
This commit is contained in:
parent
8744495b1d
commit
51bb513c5b
25 changed files with 468 additions and 468 deletions
|
|
@ -164,97 +164,97 @@ sub getEditForm {
|
|||
my $tabform = $self->SUPER::getEditForm();
|
||||
#return $tabform;
|
||||
$tabform->getTab("properties")->HTMLArea(
|
||||
-name=>"description", -label=>WebGUI::International::get(512,"EventsCalendar"),
|
||||
-name=>"description", -label=>WebGUI::International::get(512,"Asset_EventsCalendar"),
|
||||
-value=>$self->getValue("description")
|
||||
);
|
||||
$tabform->getTab("properties")->dateTime(
|
||||
-name=>"eventStartDate", -label=>WebGUI::International::get(513,"EventsCalendar"),
|
||||
-name=>"eventStartDate", -label=>WebGUI::International::get(513,"Asset_EventsCalendar"),
|
||||
-extras=>'onBlur="this.form.eventEndDate.value=this.form.eventStartDate.value;this.form.until.value=this.form.eventStartDate.value;"',
|
||||
-value=>$self->getValue("eventStartDate")
|
||||
);
|
||||
$tabform->getTab("properties")->dateTime(
|
||||
-name=>"eventEndDate", -label=>WebGUI::International::get(514,"EventsCalendar"),
|
||||
-name=>"eventEndDate", -label=>WebGUI::International::get(514,"Asset_EventsCalendar"),
|
||||
-extras=>'onBlur="this.form.until.value=this.form.eventEndDate.value;"',
|
||||
-value=>$self->getValue("eventEndDate")
|
||||
);
|
||||
$tabform->getTab("properties")->text(
|
||||
-name=>"eventLocation", -label=>WebGUI::International::get(515,"EventsCalendar"),
|
||||
-name=>"eventLocation", -label=>WebGUI::International::get(515,"Asset_EventsCalendar"),
|
||||
-value=>$self->getValue("eventLocation")
|
||||
);
|
||||
# $tabform->getTab("properties")->yesNo(
|
||||
# -name=>"allowRegistration", -label=>WebGUI::International::get(516,"EventsCalendar"),
|
||||
# -name=>"allowRegistration", -label=>WebGUI::International::get(516,"Asset_EventsCalendar"),
|
||||
# -value=>$self->getValue("allowRegistration")
|
||||
# );
|
||||
# $tabform->getTab("properties")->yesNo(
|
||||
# -name=>"allowUnregistration", -label=>WebGUI::International::get(517,"EventsCalendar"),
|
||||
# -name=>"allowUnregistration", -label=>WebGUI::International::get(517,"Asset_EventsCalendar"),
|
||||
# -value=>$self->getValue("allowUnregistration")
|
||||
# );
|
||||
# $tabform->getTab("properties")->yesNo(
|
||||
# -name=>"regConfirm", -label=>WebGUI::International::get(518,"EventsCalendar"),
|
||||
# -name=>"regConfirm", -label=>WebGUI::International::get(518,"Asset_EventsCalendar"),
|
||||
# -value=>$self->getValue("regConfirm")
|
||||
# );
|
||||
# $tabform->getTab("properties")->yesNo(
|
||||
# -name=>"regNotify", -label=>WebGUI::International::get(519,"EventsCalendar"),
|
||||
# -name=>"regNotify", -label=>WebGUI::International::get(519,"Asset_EventsCalendar"),
|
||||
# -value=>$self->getValue("regNotify")
|
||||
# );
|
||||
# $tabform->getTab("properties")->dateTime(
|
||||
# -name=>"regStartDate", -label=>WebGUI::International::get(520,"EventsCalendar"),
|
||||
# -name=>"regStartDate", -label=>WebGUI::International::get(520,"Asset_EventsCalendar"),
|
||||
# -extras=>'onBlur="this.form.regEndDate.value=this.form.regStartDate.value;this.form.until.value=this.form.regStartDate.value;"',
|
||||
# -value=>$self->getValue("regStartDate")
|
||||
# );
|
||||
# $tabform->getTab("properties")->dateTime(
|
||||
# -name=>"regEndDate", -label=>WebGUI::International::get(521,"EventsCalendar"),
|
||||
# -name=>"regEndDate", -label=>WebGUI::International::get(521,"Asset_EventsCalendar"),
|
||||
# -extras=>'onBlur="this.form.until.value=this.form.regEndDate.value;"',
|
||||
# -value=>$self->getValue("regEndDate")
|
||||
# );
|
||||
# $tabform->getTab("properties")->yesNo(
|
||||
# -name=>"allowReminders", -label=>WebGUI::International::get(522,"EventsCalendar"),
|
||||
# -name=>"allowReminders", -label=>WebGUI::International::get(522,"Asset_EventsCalendar"),
|
||||
# -value=>$self->getValue("allowReminders")
|
||||
# );
|
||||
# $tabform->getTab("properties")->dateTime(
|
||||
# -name=>"reminderStartDate", -label=>WebGUI::International::get(523,"EventsCalendar"),
|
||||
# -name=>"reminderStartDate", -label=>WebGUI::International::get(523,"Asset_EventsCalendar"),
|
||||
# -extras=>'onBlur="this.form.reminderEndDate.value=this.form.reminderStartDate.value;this.form.until.value=this.form.reminderStartDate.value;"',
|
||||
# -value=>$self->getValue("reminderStartDate")
|
||||
# );
|
||||
# $tabform->getTab("properties")->dateTime(
|
||||
# -name=>"reminderEndDate", -label=>WebGUI::International::get(524,"EventsCalendar"),
|
||||
# -name=>"reminderEndDate", -label=>WebGUI::International::get(524,"Asset_EventsCalendar"),
|
||||
# -extras=>'onBlur="this.form.until.value=this.form.reminderEndDate.value;"',
|
||||
# -value=>$self->getValue("regEndDate")
|
||||
# );
|
||||
# $tabform->getTab("properties")->interval(
|
||||
# -name=>"reminderRecurs",
|
||||
# -label=>WebGUI::International::get(524.5,"EventsCalendar"),
|
||||
# -label=>WebGUI::International::get(524.5,"Asset_EventsCalendar"),
|
||||
# -value=>$self->getValue("reminderRecurs")
|
||||
# );
|
||||
# Not quite implemented yet...
|
||||
# $tabform->getTab("properties")->yesNo(
|
||||
# -name=>"chargeForEvent", -label=>WebGUI::International::get(525,"EventsCalendar"),
|
||||
# -name=>"chargeForEvent", -label=>WebGUI::International::get(525,"Asset_EventsCalendar"),
|
||||
# -value=>$self->getValue("chargeForEvent")
|
||||
# );
|
||||
# $tabform->getTab("properties")->float(
|
||||
# -name=>"firstAttendeeFee", -label=>WebGUI::International::get(526,"EventsCalendar"),
|
||||
# -name=>"firstAttendeeFee", -label=>WebGUI::International::get(526,"Asset_EventsCalendar"),
|
||||
# -value=>$self->getValue("firstAttendeeFee")
|
||||
# );
|
||||
# $tabform->getTab("properties")->float(
|
||||
# -name=>"secondAttendeeFee", -label=>WebGUI::International::get(527,"EventsCalendar"),
|
||||
# -name=>"secondAttendeeFee", -label=>WebGUI::International::get(527,"Asset_EventsCalendar"),
|
||||
# -value=>$self->getValue("secondAttendeeFee")
|
||||
# );
|
||||
# $tabform->getTab("properties")->integer(
|
||||
# -name=>"availableSeats", -label=>WebGUI::International::get(528,"EventsCalendar"),
|
||||
# -name=>"availableSeats", -label=>WebGUI::International::get(528,"Asset_EventsCalendar"),
|
||||
# -value=>$self->getValue("availableSeats")
|
||||
# );
|
||||
if (($session{form}{func} eq "addStyledEvent") || ($session{form}{func} eq "addEvent")) {
|
||||
my %recursEvery;
|
||||
tie %recursEvery, 'Tie::IxHash';
|
||||
%recursEvery = (
|
||||
'never'=>WebGUI::International::get(4,"EventsCalendar"),
|
||||
'day'=>WebGUI::International::get(700,"EventsCalendar"),
|
||||
'week'=>WebGUI::International::get(701,"EventsCalendar"),
|
||||
'month'=>WebGUI::International::get(702,"EventsCalendar"),
|
||||
'year'=>WebGUI::International::get(703,"EventsCalendar"),
|
||||
'never'=>WebGUI::International::get(4,"Asset_EventsCalendar"),
|
||||
'day'=>WebGUI::International::get(700,"Asset_EventsCalendar"),
|
||||
'week'=>WebGUI::International::get(701,"Asset_EventsCalendar"),
|
||||
'month'=>WebGUI::International::get(702,"Asset_EventsCalendar"),
|
||||
'year'=>WebGUI::International::get(703,"Asset_EventsCalendar"),
|
||||
);
|
||||
$tabform->getTab("properties")->readOnly(
|
||||
-label=>WebGUI::International::get(8,"EventsCalendar"),
|
||||
-label=>WebGUI::International::get(8,"Asset_EventsCalendar"),
|
||||
-value=>WebGUI::Form::integer({
|
||||
name=>"interval",
|
||||
defaultValue=>1
|
||||
|
|
@ -263,7 +263,7 @@ sub getEditForm {
|
|||
name=>"recursEvery",
|
||||
options=>\%recursEvery
|
||||
})
|
||||
.' '.WebGUI::International::get(9,"EventsCalendar").' '
|
||||
.' '.WebGUI::International::get(9,"Asset_EventsCalendar").' '
|
||||
.WebGUI::Form::date({
|
||||
name=>"until"
|
||||
})
|
||||
|
|
@ -273,40 +273,40 @@ sub getEditForm {
|
|||
# -name=>"confirmationTemplateId",
|
||||
# -value=>$self->getValue("confirmationTemplateId"),
|
||||
# -namespace=>"EventsCalendar/Event",
|
||||
# -label=>WebGUI::International::get(529,"EventsCalendar"),
|
||||
# -label=>WebGUI::International::get(529,"Asset_EventsCalendar"),
|
||||
# -afterEdit=>'func=edit'
|
||||
# );
|
||||
$tabform->getTab("display")->template(
|
||||
-name=>"templateId",
|
||||
-value=>$self->getValue("templateId"),
|
||||
-namespace=>"EventsCalendar/Event",
|
||||
-label=>WebGUI::International::get(530,"EventsCalendar"),
|
||||
-label=>WebGUI::International::get(530,"Asset_EventsCalendar"),
|
||||
-afterEdit=>'func=edit&wid='.$self->get("wobjectId")
|
||||
);
|
||||
# $tabform->getTab("display")->template(
|
||||
# -name=>"regNotifyTemplateId",
|
||||
# -value=>$self->getValue("regNotifyTemplateId"),
|
||||
# -namespace=>"EventsCalendar/Event",
|
||||
# -label=>WebGUI::International::get(531,"EventsCalendar"),
|
||||
# -label=>WebGUI::International::get(531,"Asset_EventsCalendar"),
|
||||
# -afterEdit=>'func=edit&wid='.$self->get("wobjectId")
|
||||
# );
|
||||
# $tabform->getTab("display")->template(
|
||||
# -name=>"reminderTemplateId",
|
||||
# -value=>$self->getValue("reminderTemplateId"),
|
||||
# -namespace=>"EventsCalendar/Event",
|
||||
# -label=>WebGUI::International::get(532,"EventsCalendar"),
|
||||
# -label=>WebGUI::International::get(532,"Asset_EventsCalendar"),
|
||||
# -afterEdit=>'func=edit&wid='.$self->get("wobjectId")
|
||||
# );
|
||||
# $tabform->getTab("security")->group(
|
||||
# -name=>"groupCanRegister", -label=>WebGUI::International::get(533,"EventsCalendar"),
|
||||
# -name=>"groupCanRegister", -label=>WebGUI::International::get(533,"Asset_EventsCalendar"),
|
||||
# -value=>[$self->getValue("groupCanRegister")]
|
||||
# );
|
||||
# $tabform->getTab("security")->group(
|
||||
# -name=>"groupCanReminder", -label=>WebGUI::International::get(534,"EventsCalendar"),
|
||||
# -name=>"groupCanReminder", -label=>WebGUI::International::get(534,"Asset_EventsCalendar"),
|
||||
# -value=>[$self->getValue("groupCanReminder")]
|
||||
# );
|
||||
# $tabform->getTab("security")->group(
|
||||
# -name=>"groupNotify", -label=>WebGUI::International::get(535,"EventsCalendar"),
|
||||
# -name=>"groupNotify", -label=>WebGUI::International::get(535,"Asset_EventsCalendar"),
|
||||
# -value=>[$self->getValue("regNotifyGroupId")]
|
||||
# );
|
||||
return $tabform;
|
||||
|
|
@ -325,7 +325,7 @@ sub getIcon {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(511,"EventsCalendar");
|
||||
return WebGUI::International::get(511,"Asset_EventsCalendar");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -378,28 +378,28 @@ sub view {
|
|||
my ($output, $event, %var, $id);
|
||||
$event = $self;
|
||||
$var{title} = $event->getValue("title");
|
||||
$var{"start.label"} = WebGUI::International::get(14,"EventsCalendar");
|
||||
$var{"start.label"} = WebGUI::International::get(14,"Asset_EventsCalendar");
|
||||
$var{"start.date"} = epochToHuman($self->getValue("eventStartDate"),"%z");
|
||||
$var{"start.time"} = epochToHuman($self->getValue("eventStartDate"),"%Z");
|
||||
$var{"end.label"} = WebGUI::International::get(15,"EventsCalendar");
|
||||
$var{"end.label"} = WebGUI::International::get(15,"Asset_EventsCalendar");
|
||||
$var{"end.date"} = epochToHuman($self->getValue("eventEndDate"),"%z");
|
||||
$var{"end.time"} = epochToHuman($self->getValue("eventEndDate"),"%Z");
|
||||
$var{canEdit} = $self->canEdit;
|
||||
$var{"edit.url"} = WebGUI::URL::page('func=edit');
|
||||
$var{"edit.label"} = WebGUI::International::get(575,"EventsCalendar");
|
||||
$var{"edit.label"} = WebGUI::International::get(575,"Asset_EventsCalendar");
|
||||
$var{"delete.url"} = WebGUI::URL::page('func=deleteEvent&rid='.$self->getValue("EventsCalendar_recurringId"));
|
||||
$var{"delete.label"} = WebGUI::International::get(576,"EventsCalendar");
|
||||
$var{"delete.label"} = WebGUI::International::get(576,"Asset_EventsCalendar");
|
||||
# my $query = "select EventsCalendar_eventId from EventsCalendar_event where EventsCalendar_eventId<>".quote($event->getValue("EventsCalendar_eventId});
|
||||
# $query .= " and wobjectId=".quote($self->get("wobjectId")) unless ($self->get("isMaster"));
|
||||
# $query .= " and startDate<=$event->getValue("startDate} order by startDate desc, endDate desc";
|
||||
# ($id) = WebGUI::SQL->quickArray($query,WebGUI::SQL->getSlave);
|
||||
# $var{"previous.label"} = '«'.WebGUI::International::get(92,"EventsCalendar");
|
||||
# $var{"previous.label"} = '«'.WebGUI::International::get(92,"Asset_EventsCalendar");
|
||||
# $var{"previous.url"} = WebGUI::URL::page("func=viewEvent&wid=".$self->get("wobjectId")."&eid=".$id) if ($id);
|
||||
# $query = "select EventsCalendar_eventId from EventsCalendar_event where EventsCalendar_eventId<>".quote($event->getValue("EventsCalendar_eventId});
|
||||
# $query .= " and wobjectId=".quote($self->get("wobjectId")) unless ($self->get("isMaster"));
|
||||
# $query .= " and startDate>=$event->getValue("eventStartDate") order by startDate, endDate";
|
||||
# ($id) = WebGUI::SQL->quickArray($query,WebGUI::SQL->getSlave);
|
||||
# $var{"next.label"} = WebGUI::International::get(93,"EventsCalendar").'»';
|
||||
# $var{"next.label"} = WebGUI::International::get(93,"Asset_EventsCalendar").'»';
|
||||
# $var{"next.url"} = WebGUI::URL::page("func=viewEvent&wid=".$self->get("wobjectId")."&eid=".$id) if ($id);
|
||||
$var{description} = $event->getValue("description");
|
||||
# my $where = "eventscalendar.type=2";
|
||||
|
|
@ -424,12 +424,12 @@ sub www_deleteEvent {
|
|||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
my ($output);
|
||||
$output = '<h1>'.WebGUI::International::get(42,"EventsCalendar").'</h1>';
|
||||
$output .= WebGUI::International::get(75,"EventsCalendar").'<p><blockquote>';
|
||||
$output .= '<a href="'.WebGUI::URL::page('func=deleteEventConfirm').'">'.WebGUI::International::get(76,"EventsCalendar").'</a><p>';
|
||||
$output = '<h1>'.WebGUI::International::get(42,"Asset_EventsCalendar").'</h1>';
|
||||
$output .= WebGUI::International::get(75,"Asset_EventsCalendar").'<p><blockquote>';
|
||||
$output .= '<a href="'.WebGUI::URL::page('func=deleteEventConfirm').'">'.WebGUI::International::get(76,"Asset_EventsCalendar").'</a><p>';
|
||||
$output .= '<a href="'.WebGUI::URL::page('func=deleteEventConfirm&rid='.$session{form}{rid}).'">'
|
||||
.WebGUI::International::get(77,"EventsCalendar").'</a><p>' if (($session{form}{rid} ne "") and ($session{form}{rid} ne "0"));
|
||||
$output .= '<a href="'.$self->getUrl.'">'.WebGUI::International::get(78,"EventsCalendar").'</a>';
|
||||
.WebGUI::International::get(77,"Asset_EventsCalendar").'</a><p>' if (($session{form}{rid} ne "") and ($session{form}{rid} ne "0"));
|
||||
$output .= '<a href="'.$self->getUrl.'">'.WebGUI::International::get(78,"Asset_EventsCalendar").'</a>';
|
||||
$output .= '</blockquote>';
|
||||
return return WebGUI::Style::process($output,$self->getParent->getValue("styleTemplateId"));
|
||||
}
|
||||
|
|
@ -458,7 +458,7 @@ sub www_edit {
|
|||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("event add/edit","EventsCalendar");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get('13', 'EventsCalendar'));
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get('13', 'Asset_EventsCalendar'));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -124,14 +124,14 @@ sub getEditForm {
|
|||
my $tabform = $self->SUPER::getEditForm();
|
||||
if ($self->get("filename") ne "") {
|
||||
$tabform->getTab("properties")->readOnly(
|
||||
-label=>WebGUI::International::get('current file', 'File'),
|
||||
-label=>WebGUI::International::get('current file', 'Asset_File'),
|
||||
-value=>'<a href="'.$self->getFileUrl.'"><img src="'.$self->getFileIconUrl.'" alt="'.$self->get("filename").'" border="0" align="middle" /> '.$self->get("filename").'</a>'
|
||||
);
|
||||
|
||||
}
|
||||
$tabform->getTab("properties")->file(
|
||||
-name=>"file",
|
||||
-label=>WebGUI::International::get('new file', 'File'),
|
||||
-label=>WebGUI::International::get('new file', 'Asset_File'),
|
||||
);
|
||||
return $tabform;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,22 +117,22 @@ sub getEditForm {
|
|||
my $tabform = $self->SUPER::getEditForm();
|
||||
$tabform->getTab("properties")->integer(
|
||||
-name=>"thumbnailSize",
|
||||
-label=>WebGUI::International::get('thumbnail size', 'Image'),
|
||||
-label=>WebGUI::International::get('thumbnail size', 'Asset_Image'),
|
||||
-value=>$self->getValue("thumbnailSize")
|
||||
);
|
||||
$tabform->getTab("properties")->textarea(
|
||||
-name=>"parameters",
|
||||
-label=>WebGUI::International::get('parameters', 'Image'),
|
||||
-label=>WebGUI::International::get('parameters', 'Asset_Image'),
|
||||
-value=>$self->getValue("parameters")
|
||||
);
|
||||
if ($self->get("filename") ne "") {
|
||||
$tabform->getTab("properties")->readOnly(
|
||||
-label=>WebGUI::International::get('thumbnail', 'Image'),
|
||||
-label=>WebGUI::International::get('thumbnail', 'Asset_Image'),
|
||||
-value=>'<a href="'.$self->getFileUrl.'"><img src="'.$self->getThumbnailUrl.'?noCache='.time().'" alt="thumbnail" /></a>'
|
||||
);
|
||||
my ($x, $y) = $self->getStorageLocation->getSizeInPixels($self->get("filename"));
|
||||
$tabform->getTab("properties")->readOnly(
|
||||
-label=>WebGUI::International::get('image size', 'Image'),
|
||||
-label=>WebGUI::International::get('image size', 'Asset_Image'),
|
||||
-value=>$x.' x '.$y
|
||||
);
|
||||
}
|
||||
|
|
@ -224,7 +224,7 @@ sub view {
|
|||
sub www_edit {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->addSubmenuItem($self->getUrl('func=resize'),WebGUI::International::get("resize image","Image")) if ($self->get("filename"));
|
||||
$self->getAdminConsole->addSubmenuItem($self->getUrl('func=resize'),WebGUI::International::get("resize image","Asset_Image")) if ($self->get("filename"));
|
||||
my $tabform = $self->getEditForm;
|
||||
$tabform->getTab("display")->template(
|
||||
-value=>$self->get("templateId"),
|
||||
|
|
@ -232,7 +232,7 @@ sub www_edit {
|
|||
-defaultValue=>"PBtmpl0000000000000088"
|
||||
);
|
||||
$self->getAdminConsole->setHelp("image add/edit","Image");
|
||||
return $self->getAdminConsole->render($tabform->print,WebGUI::International::get("edit image","Image"));
|
||||
return $self->getAdminConsole->render($tabform->print,WebGUI::International::get("edit image","Asset_Image"));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -243,7 +243,7 @@ sub www_resize {
|
|||
$self->getStorageLocation->resize($self->get("filename"),$session{form}{newWidth},$session{form}{newHeight});
|
||||
$self->setSize($self->getStorageLocation->getFileSize($self->get("filename")));
|
||||
}
|
||||
$self->getAdminConsole->addSubmenuItem($self->getUrl('func=edit'),WebGUI::International::get("edit image","Image"));
|
||||
$self->getAdminConsole->addSubmenuItem($self->getUrl('func=edit'),WebGUI::International::get("edit image","Asset_Image"));
|
||||
my $f = WebGUI::HTMLForm->new(-action=>$self->getUrl);
|
||||
$f->hidden(
|
||||
-name=>"func",
|
||||
|
|
@ -251,20 +251,20 @@ sub www_resize {
|
|||
);
|
||||
my ($x, $y) = $self->getStorageLocation->getSizeInPixels($self->get("filename"));
|
||||
$f->readOnly(
|
||||
-label=>WebGUI::International::get('image size', 'Image'),
|
||||
-label=>WebGUI::International::get('image size', 'Asset_Image'),
|
||||
-value=>$x.' x '.$y
|
||||
);
|
||||
$f->integer(
|
||||
-label=>WebGUI::International::get('new width','Image'),
|
||||
-label=>WebGUI::International::get('new width','Asset_Image'),
|
||||
-name=>"newWidth"
|
||||
);
|
||||
$f->integer(
|
||||
-label=>WebGUI::International::get('new height','Image'),
|
||||
-label=>WebGUI::International::get('new height','Asset_Image'),
|
||||
-name=>"newHeight"
|
||||
);
|
||||
$f->submit;
|
||||
my $image = '<div align="center"><img src="'.$self->getStorageLocation->getUrl($self->get("filename")).'" border="1" alt="'.$self->get("filename").'" /></div>';
|
||||
return $self->getAdminConsole->render($f->print.$image,WebGUI::International::get("resize image","Image"));
|
||||
return $self->getAdminConsole->render($f->print.$image,WebGUI::International::get("resize image","Asset_Image"));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -133,11 +133,11 @@ sub edit {
|
|||
-uiLevel=>6
|
||||
);
|
||||
$tabform->getTab("properties")->readOnly(
|
||||
-label=>WebGUI::International::get("upload files", "FilePile"),
|
||||
-label=>WebGUI::International::get("upload files", "Asset_FilePile"),
|
||||
-value=>$self->getUploadControl
|
||||
);
|
||||
$self->getAdminConsole->setHelp("file pile add/edit","FilePile");
|
||||
return $self->getAdminConsole->render($tabform->print,WebGUI::International::get("add pile", "FilePile"));
|
||||
return $self->getAdminConsole->render($tabform->print,WebGUI::International::get("add pile", "Asset_FilePile"));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -331,13 +331,13 @@ sub getStatus {
|
|||
my $self = shift;
|
||||
my $status = $self->get("status");
|
||||
if ($status eq "approved") {
|
||||
return WebGUI::International::get('approved','Post');
|
||||
return WebGUI::International::get('approved','Asset_Post');
|
||||
} elsif ($status eq "denied") {
|
||||
return WebGUI::International::get('denied','Post');
|
||||
return WebGUI::International::get('denied','Asset_Post');
|
||||
} elsif ($status eq "pending") {
|
||||
return WebGUI::International::get('pending','Post');
|
||||
return WebGUI::International::get('pending','Asset_Post');
|
||||
} elsif ($status eq "archived") {
|
||||
return WebGUI::International::get('archived','Post');
|
||||
return WebGUI::International::get('archived','Asset_Post');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -467,7 +467,7 @@ sub getUploadControl {
|
|||
if ($self->get("storageId")) {
|
||||
my $i;
|
||||
foreach my $filename (@{$self->getStorageLocation->getFiles}) {
|
||||
$uploadControl .= deleteIcon("func=deleteFile&filename=".$filename,$self->get("url"),WebGUI::International::get("delete file warning","Collaboration"))
|
||||
$uploadControl .= deleteIcon("func=deleteFile&filename=".$filename,$self->get("url"),WebGUI::International::get("delete file warning","Asset_Collaboration"))
|
||||
.' <a href="'.$self->getStorageLocation->getUrl($filename).'">'.$filename.'</a>'
|
||||
.'<br />';
|
||||
$i++;
|
||||
|
|
@ -610,8 +610,8 @@ sub notifySubscribers {
|
|||
$lang{$u->profileField("language")}{var} = $self->getTemplateVars($lang{$u->profileField("language")}{var});
|
||||
$lang{$u->profileField("language")}{var}{url} = WebGUI::URL::getSiteURL().$self->getUrl;
|
||||
$lang{$u->profileField("language")}{var}{'notify.subscription.message'} =
|
||||
WebGUI::International::get(875,"Post",$u->profileField("language"));
|
||||
$lang{$u->profileField("language")}{subject} = WebGUI::International::get(523,"Post",$u->profileField("language"));
|
||||
WebGUI::International::get(875,"Asset_Post",$u->profileField("language"));
|
||||
$lang{$u->profileField("language")}{subject} = WebGUI::International::get(523,"Asset_Post",$u->profileField("language"));
|
||||
$lang{$u->profileField("language")}{message} = $self->processTemplate($lang{$u->profileField("language")}{var}, $self->getThread->getParent->get("notificationTemplateId"));
|
||||
}
|
||||
WebGUI::MessageLog::addEntry($userId,"",$lang{$u->profileField("language")}{subject},$lang{$u->profileField("language")}{message});
|
||||
|
|
@ -983,7 +983,7 @@ sub www_edit {
|
|||
extras=>"onclick=\"this.value='".WebGUI::International::get(452)."'; this.form.func.value='editSave'; this.form.submit();\""
|
||||
});
|
||||
$var{'form.preview'} = WebGUI::Form::submit({
|
||||
value=>WebGUI::International::get("preview","Collaboration")
|
||||
value=>WebGUI::International::get("preview","Asset_Collaboration")
|
||||
});
|
||||
$var{'attachment.form'} = $self->getUploadControl;
|
||||
$var{'contentType.form'} = WebGUI::Form::contentType({
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ sub getEditForm {
|
|||
my $tabform = $self->SUPER::getEditForm();
|
||||
$tabform->getTab("properties")->url(
|
||||
-name=>"redirectUrl",
|
||||
-label=>WebGUI::International::get('redirect url', 'Redirect'),
|
||||
-label=>WebGUI::International::get('redirect url', 'Asset_Redirect'),
|
||||
-value=>$self->getValue("redirectUrl")
|
||||
);
|
||||
return $tabform;
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ sub getEditForm {
|
|||
my $originalTemplate = WebGUI::Asset::Template->new($self->getShortcut->get("templateId"));
|
||||
$tabform->getTab("properties")->HTMLArea(
|
||||
-value=>$self->getValue("description"),
|
||||
-label=>WebGUI::International::get(85, 'Shortcut'),
|
||||
-label=>WebGUI::International::get(85, 'Asset_Shortcut'),
|
||||
-name=>"description"
|
||||
);
|
||||
$tabform->getTab("display")->template(
|
||||
|
|
@ -102,32 +102,32 @@ sub getEditForm {
|
|||
$tabform->getTab("properties")->yesNo(
|
||||
-name=>"overrideTitle",
|
||||
-value=>$self->getValue("overrideTitle"),
|
||||
-label=>WebGUI::International::get(7,"Shortcut")
|
||||
-label=>WebGUI::International::get(7,"Asset_Shortcut")
|
||||
);
|
||||
$tabform->getTab("display")->yesNo(
|
||||
-name=>"overrideDisplayTitle",
|
||||
-value=>$self->getValue("overrideDisplayTitle"),
|
||||
-label=>WebGUI::International::get(8,"Shortcut")
|
||||
-label=>WebGUI::International::get(8,"Asset_Shortcut")
|
||||
);
|
||||
$tabform->getTab("properties")->yesNo(
|
||||
-name=>"overrideDescription",
|
||||
-value=>$self->getValue("overrideDescription"),
|
||||
-label=>WebGUI::International::get(9,"Shortcut")
|
||||
-label=>WebGUI::International::get(9,"Asset_Shortcut")
|
||||
);
|
||||
$tabform->getTab("display")->yesNo(
|
||||
-name=>"overrideTemplate",
|
||||
-value=>$self->getValue("overrideTemplate"),
|
||||
-label=>WebGUI::International::get(10,"Shortcut")
|
||||
-label=>WebGUI::International::get(10,"Asset_Shortcut")
|
||||
);
|
||||
$tabform->getTab("properties")->readOnly(
|
||||
-label=>WebGUI::International::get(1,"Shortcut"),
|
||||
-label=>WebGUI::International::get(1,"Asset_Shortcut"),
|
||||
-value=>'<a href="'.$self->getShortcut->getUrl.'">'.$self->getShortcut->get('title').'</a> ('.$self->getShortcut->getId.')'
|
||||
);
|
||||
if($session{setting}{metaDataEnabled}) {
|
||||
$tabform->getTab("properties")->yesNo(
|
||||
-name=>"shortcutByCriteria",
|
||||
-value=>$self->getValue("shortcutByCriteria"),
|
||||
-label=>WebGUI::International::get("Shortcut by alternate criteria?","Shortcut"),
|
||||
-label=>WebGUI::International::get("Asset_Shortcut by alternate criteria?","Shortcut"),
|
||||
-extras=>q|Onchange="
|
||||
if (this.form.shortcutByCriteria[0].checked) {
|
||||
this.form.resolveMultiples.disabled=false;
|
||||
|
|
@ -143,17 +143,17 @@ sub getEditForm {
|
|||
$tabform->getTab("properties")->selectList(
|
||||
-name=>"resolveMultiples",
|
||||
-value=>[ $self->getValue("resolveMultiples") ],
|
||||
-label=>WebGUI::International::get("Resolve Multiples?","Shortcut"),
|
||||
-label=>WebGUI::International::get("Resolve Multiples?","Asset_Shortcut"),
|
||||
-options=>{
|
||||
mostRecent=>WebGUI::International::get("Most Recent","Shortcut"),
|
||||
random=>WebGUI::International::get("Random","Shortcut"),
|
||||
mostRecent=>WebGUI::International::get("Most Recent","Asset_Shortcut"),
|
||||
random=>WebGUI::International::get("Random","Asset_Shortcut"),
|
||||
},
|
||||
-extras=>$self->{_disabled}
|
||||
);
|
||||
|
||||
$tabform->getTab("properties")->readOnly(
|
||||
-value=>$self->_drawQueryBuilder(),
|
||||
-label=>WebGUI::International::get("Criteria","Shortcut"),
|
||||
-label=>WebGUI::International::get("Criteria","Asset_Shortcut"),
|
||||
);
|
||||
}
|
||||
return $tabform;
|
||||
|
|
@ -169,7 +169,7 @@ sub getIcon {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(3,"Shortcut");
|
||||
return WebGUI::International::get(3,"Asset_Shortcut");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -339,7 +339,7 @@ sub view {
|
|||
my %var = (
|
||||
isShortcut => 1,
|
||||
'shortcut.content' => $content,
|
||||
'shortcut.label' => WebGUI::International::get('3',"Shortcut"),
|
||||
'shortcut.label' => WebGUI::International::get('3',"Asset_Shortcut"),
|
||||
originalURL => $self->getShortcut->getUrl
|
||||
);
|
||||
return $self->processTemplate(\%var,$self->getValue("templateId"));
|
||||
|
|
@ -351,7 +351,7 @@ sub www_edit {
|
|||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("shortcut add/edit","Shortcut");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get(2,"Shortcut"));
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get(2,"Asset_Shortcut"));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -362,15 +362,15 @@ sub _drawQueryBuilder {
|
|||
my %operator;
|
||||
foreach (@textFields) {
|
||||
$operator{$_} = {
|
||||
"=" => WebGUI::International::get("is","Shortcut"),
|
||||
"!=" => WebGUI::International::get("isnt","Shortcut")
|
||||
"=" => WebGUI::International::get("is","Asset_Shortcut"),
|
||||
"!=" => WebGUI::International::get("isnt","Asset_Shortcut")
|
||||
};
|
||||
}
|
||||
$operator{integer} = {
|
||||
"=" => WebGUI::International::get("equal to","Shortcut"),
|
||||
"!=" => WebGUI::International::get("not equal to","Shortcut"),
|
||||
"<" => WebGUI::International::get("less than","Shortcut"),
|
||||
">" => WebGUI::International::get("greater than","Shortcut")
|
||||
"=" => WebGUI::International::get("equal to","Asset_Shortcut"),
|
||||
"!=" => WebGUI::International::get("not equal to","Asset_Shortcut"),
|
||||
"<" => WebGUI::International::get("less than","Asset_Shortcut"),
|
||||
">" => WebGUI::International::get("greater than","Asset_Shortcut")
|
||||
};
|
||||
|
||||
# Get the fields and count them
|
||||
|
|
@ -392,8 +392,8 @@ sub _drawQueryBuilder {
|
|||
my $conjunctionField = WebGUI::Form::selectList({
|
||||
name=>"conjunction",
|
||||
options=>{
|
||||
"AND" => WebGUI::International::get("AND","Shortcut"),
|
||||
"OR" => WebGUI::International::get("OR","Shortcut")},
|
||||
"AND" => WebGUI::International::get("AND","Asset_Shortcut"),
|
||||
"OR" => WebGUI::International::get("OR","Asset_Shortcut")},
|
||||
value=>["OR"],
|
||||
extras=>'class="qbselect"',
|
||||
});
|
||||
|
|
|
|||
|
|
@ -91,12 +91,12 @@ sub getEditForm {
|
|||
my $tabform = $self->SUPER::getEditForm();
|
||||
$tabform->getTab("properties")->codearea(
|
||||
-name=>"snippet",
|
||||
-label=>WebGUI::International::get('snippet', 'Snippet'),
|
||||
-label=>WebGUI::International::get('snippet', 'Asset_Snippet'),
|
||||
-value=>$self->getValue("snippet")
|
||||
);
|
||||
$tabform->getTab("properties")->yesNo(
|
||||
-name=>"processAsTemplate",
|
||||
-label=>WebGUI::International::get('process as template', 'Snippet'),
|
||||
-label=>WebGUI::International::get('process as template', 'Asset_Snippet'),
|
||||
-value=>$self->getValue("processAsTemplate")
|
||||
);
|
||||
return $tabform;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ sub _execute {
|
|||
return $t->output;
|
||||
} else {
|
||||
WebGUI::ErrorHandler::error("Error in template. ".$@);
|
||||
return WebGUI::International::get('template error', 'Template').$@;
|
||||
return WebGUI::International::get('template error', 'Asset_Template').$@;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -147,12 +147,12 @@ sub getEditForm {
|
|||
$tabform->getTab("properties")->combo(
|
||||
-name=>"namespace",
|
||||
-options=>$namespaces,
|
||||
-label=>WebGUI::International::get('namespace','Template'),
|
||||
-label=>WebGUI::International::get('namespace','Asset_Template'),
|
||||
-value=>[$session{form}{namespace}]
|
||||
);
|
||||
} else {
|
||||
$tabform->getTab("meta")->readOnly(
|
||||
-label=>WebGUI::International::get('namespace','Template'),
|
||||
-label=>WebGUI::International::get('namespace','Asset_Template'),
|
||||
-value=>$self->getValue("namespace")
|
||||
);
|
||||
$tabform->getTab("meta")->hidden(
|
||||
|
|
@ -163,11 +163,11 @@ sub getEditForm {
|
|||
$tabform->getTab("display")->yesNo(
|
||||
-name=>"showInForms",
|
||||
-value=>$self->getValue("showInForms"),
|
||||
-label=>WebGUI::International::get('show in forms', 'Template'),
|
||||
-label=>WebGUI::International::get('show in forms', 'Asset_Template'),
|
||||
);
|
||||
$tabform->getTab("properties")->codearea(
|
||||
-name=>"template",
|
||||
-label=>WebGUI::International::get('template', 'Template'),
|
||||
-label=>WebGUI::International::get('template', 'Asset_Template'),
|
||||
-value=>$self->getValue("template")
|
||||
);
|
||||
return $tabform;
|
||||
|
|
@ -334,7 +334,7 @@ sub www_edit {
|
|||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("template add/edit","Template");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get('edit template', 'Template'));
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get('edit template', 'Asset_Template'));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -64,21 +64,21 @@ sub getEditForm {
|
|||
);
|
||||
$tabform->getTab("properties")->text(
|
||||
-name=>"linkTitle",
|
||||
-label=>WebGUI::International::get(7,"Article"),
|
||||
-label=>WebGUI::International::get(7,"Asset_Article"),
|
||||
-value=>$self->getValue("linkTitle"),
|
||||
-uiLevel=>3
|
||||
);
|
||||
$tabform->getTab("properties")->url(
|
||||
-name=>"linkURL",
|
||||
-label=>WebGUI::International::get(8,"Article"),
|
||||
-label=>WebGUI::International::get(8,"Asset_Article"),
|
||||
-value=>$self->getValue("linkURL"),
|
||||
-uiLevel=>3
|
||||
);
|
||||
$tabform->getTab("display")->yesNo(
|
||||
-name=>"convertCarriageReturns",
|
||||
-label=>WebGUI::International::get(10,"Article"),
|
||||
-label=>WebGUI::International::get(10,"Asset_Article"),
|
||||
-value=>$self->getValue("convertCarriageReturns"),
|
||||
-subtext=>' <span style="font-size: 8pt;">'.WebGUI::International::get(11,"Article").'</span>',
|
||||
-subtext=>' <span style="font-size: 8pt;">'.WebGUI::International::get(11,"Asset_Article").'</span>',
|
||||
-uiLevel=>5,
|
||||
-defaultValue=>0
|
||||
);
|
||||
|
|
@ -128,7 +128,7 @@ sub getIndexerParams {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(1,"Article");
|
||||
return WebGUI::International::get(1,"Asset_Article");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -192,9 +192,9 @@ sub view {
|
|||
my $forum = WebGUI::Forum->new($self->get("forumId"));
|
||||
$var{"replies.count"} = ($forum->get("replies") + $forum->get("threads"));
|
||||
$var{"replies.URL"} = WebGUI::Forum::UI::formatForumURL($callback,$forum->get("forumId"));
|
||||
$var{"replies.label"} = WebGUI::International::get(28,"Article");
|
||||
$var{"replies.label"} = WebGUI::International::get(28,"Asset_Article");
|
||||
$var{"post.URL"} = WebGUI::Forum::UI::formatNewThreadURL($callback,$forum->get("forumId"));
|
||||
$var{"post.label"} = WebGUI::International::get(24,"Article");
|
||||
$var{"post.label"} = WebGUI::International::get(24,"Asset_Article");
|
||||
}
|
||||
my $templateId = $self->get("templateId");
|
||||
if ($session{form}{overrideTemplateId} ne "") {
|
||||
|
|
@ -218,7 +218,7 @@ sub www_edit {
|
|||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("article add/edit","Article");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("12","Article"));
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("12","Asset_Article"));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ sub appendPostListTemplateVars {
|
|||
sub appendTemplateLabels {
|
||||
my $self = shift;
|
||||
my $var = shift;
|
||||
my $i18n = WebGUI::International->new("Collaboration");
|
||||
my $i18n = WebGUI::International->new("Asset_Collaboration");
|
||||
$var->{"add.label"} = $i18n->get("add");
|
||||
$var->{"addlink.label"} = $i18n->get("addlink");
|
||||
$var->{"addquestion.label"} = $i18n->get("addquestion");
|
||||
|
|
@ -410,63 +410,63 @@ sub getEditForm {
|
|||
my $tabform = $self->SUPER::getEditForm;
|
||||
$tabform->getTab("display")->yesNo(
|
||||
-value=>$self->getValue('displayLastReply'),
|
||||
-label=>WebGUI::International::get('display last reply', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('display last reply', 'Asset_Collaboration'),
|
||||
-name=>"displayLastReply"
|
||||
);
|
||||
$tabform->getTab("display")->template(
|
||||
-value=>$self->getValue('collaborationTemplateId'),
|
||||
-namespace=>"Collaboration",
|
||||
-label=>WebGUI::International::get('system template', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('system template', 'Asset_Collaboration'),
|
||||
-name=>"collaborationTemplateId"
|
||||
);
|
||||
$tabform->getTab("display")->template(
|
||||
-name=>"threadTemplateId",
|
||||
-value=>$self->getValue("threadTemplateId"),
|
||||
-namespace=>"Collaboration/Thread",
|
||||
-label=>WebGUI::International::get('thread template', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('thread template', 'Asset_Collaboration'),
|
||||
);
|
||||
$tabform->getTab("display")->template(
|
||||
-name=>"postFormTemplateId",
|
||||
-value=>$self->getValue("postFormTemplateId"),
|
||||
-namespace=>"Collaboration/PostForm",
|
||||
-label=>WebGUI::International::get('post template', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('post template', 'Asset_Collaboration'),
|
||||
);
|
||||
$tabform->getTab("display")->template(
|
||||
-name=>"searchTemplateId",
|
||||
-value=>$self->getValue("SearchTemplateId"),
|
||||
-namespace=>"Collaboration/Search",
|
||||
-label=>WebGUI::International::get('search template', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('search template', 'Asset_Collaboration'),
|
||||
);
|
||||
$tabform->getTab("display")->template(
|
||||
-name=>"notificationTemplateId",
|
||||
-value=>$self->getValue("notificationTemplateId"),
|
||||
-namespace=>"Collaboration/Notification",
|
||||
-label=>WebGUI::International::get('notification template', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('notification template', 'Asset_Collaboration'),
|
||||
);
|
||||
$tabform->getTab("security")->group(
|
||||
-name=>"moderateGroupId",
|
||||
-label=>WebGUI::International::get('who moderates', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('who moderates', 'Asset_Collaboration'),
|
||||
-value=>[$self->getValue("moderateGroupId")]
|
||||
);
|
||||
$tabform->getTab("security")->group(
|
||||
-name=>"postGroupId",
|
||||
-label=>WebGUI::International::get('who posts', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('who posts', 'Asset_Collaboration'),
|
||||
-value=>[$self->getValue("postGroupId")]
|
||||
);
|
||||
$tabform->getTab("display")->integer(
|
||||
-name=>"threadsPerPage",
|
||||
-label=>WebGUI::International::get('threads/page', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('threads/page', 'Asset_Collaboration'),
|
||||
-value=>$self->getValue("threadsPerPage")
|
||||
);
|
||||
$tabform->getTab("display")->integer(
|
||||
-name=>"postsPerPage",
|
||||
-label=>WebGUI::International::get('posts/page', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('posts/page', 'Asset_Collaboration'),
|
||||
-value=>$self->getValue("postsPerPage")
|
||||
);
|
||||
if ($session{setting}{useKarma}) {
|
||||
$tabform->getTab("properties")->integer(
|
||||
-name=>"karmaPerPost",
|
||||
-label=>WebGUI::International::get('karma/post', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('karma/post', 'Asset_Collaboration'),
|
||||
-value=>$self->getValue("karmaPerPost")
|
||||
);
|
||||
} else {
|
||||
|
|
@ -475,7 +475,7 @@ sub getEditForm {
|
|||
$tabform->getTab("security")->filterContent(
|
||||
-value=>$self->getValue("filterCode"),
|
||||
-name=>"filterCode",
|
||||
-label=>WebGUI::International::get('filter code', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('filter code', 'Asset_Collaboration'),
|
||||
);
|
||||
$tabform->getTab("display")->selectList(
|
||||
-name=>"sortBy",
|
||||
|
|
@ -491,7 +491,7 @@ sub getEditForm {
|
|||
userDefined5=>"User Defined 5",
|
||||
title=>"Title"
|
||||
},
|
||||
-label=>WebGUI::International::get('sort by', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('sort by', 'Asset_Collaboration'),
|
||||
);
|
||||
$tabform->getTab("display")->selectList(
|
||||
-name=>"sortOrder",
|
||||
|
|
@ -500,51 +500,51 @@ sub getEditForm {
|
|||
asc=>"Ascending",
|
||||
desc=>"Descending"
|
||||
},
|
||||
-label=>WebGUI::International::get('sort order', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('sort order', 'Asset_Collaboration'),
|
||||
);
|
||||
$tabform->getTab("properties")->interval(
|
||||
-name=>"archiveAfter",
|
||||
-label=>WebGUI::International::get('archive after', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('archive after', 'Asset_Collaboration'),
|
||||
-value=>$self->getValue("archiveAfter")
|
||||
);
|
||||
$tabform->getTab("properties")->integer(
|
||||
-name=>"attachmentsPerPost",
|
||||
-label=>WebGUI::International::get('attachments/post', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('attachments/post', 'Asset_Collaboration'),
|
||||
-value=>$self->getValue("attachmentsPerPost")
|
||||
);
|
||||
$tabform->getTab("security")->interval(
|
||||
-name=>"editTimeout",
|
||||
-label=>WebGUI::International::get('edit timeout', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('edit timeout', 'Asset_Collaboration'),
|
||||
-value=>$self->getValue("editTimeout")
|
||||
);
|
||||
$tabform->getTab("security")->yesNo(
|
||||
-name=>"allowReplies",
|
||||
-label=>WebGUI::International::get('allow replies', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('allow replies', 'Asset_Collaboration'),
|
||||
-value=>$self->getValue("allowReplies")
|
||||
);
|
||||
$tabform->getTab("security")->yesNo(
|
||||
-name=>"addEditStampToPosts",
|
||||
-label=>WebGUI::International::get('edit stamp', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('edit stamp', 'Asset_Collaboration'),
|
||||
-value=>$self->getValue("addEditStampToPosts")
|
||||
);
|
||||
$tabform->getTab("display")->yesNo(
|
||||
-name=>"allowRichEdit",
|
||||
-label=>WebGUI::International::get('rich edit', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('rich edit', 'Asset_Collaboration'),
|
||||
-value=>$self->getValue("allowRichEdit")
|
||||
);
|
||||
$tabform->getTab("display")->yesNo(
|
||||
-name=>"useContentFilter",
|
||||
-label=>WebGUI::International::get('content filter', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('content filter', 'Asset_Collaboration'),
|
||||
-value=>$self->getValue("useContentFilter")
|
||||
);
|
||||
$tabform->getTab("properties")->yesNo(
|
||||
-name=>"usePreview",
|
||||
-label=>WebGUI::International::get('use preview', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('use preview', 'Asset_Collaboration'),
|
||||
-value=>$self->getValue("usePreview")
|
||||
);
|
||||
$tabform->getTab("security")->yesNo(
|
||||
-name=>"moderatePosts",
|
||||
-label=>WebGUI::International::get('moderate', 'Collaboration'),
|
||||
-label=>WebGUI::International::get('moderate', 'Asset_Collaboration'),
|
||||
-value=>$self->getValue("moderatePosts")
|
||||
);
|
||||
return $tabform;
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ sub _fieldAdminIcons {
|
|||
my $tid = shift;
|
||||
my $cantDelete = shift;
|
||||
my $output;
|
||||
$output = deleteIcon('func=deleteFieldConfirm&fid='.$fid.'&tid='.$tid,$self->get("url"),WebGUI::International::get(19,"DataForm")) unless ($cantDelete);
|
||||
$output = deleteIcon('func=deleteFieldConfirm&fid='.$fid.'&tid='.$tid,$self->get("url"),WebGUI::International::get(19,"Asset_DataForm")) unless ($cantDelete);
|
||||
$output .= editIcon('func=editField&fid='.$fid.'&tid='.$tid,$self->get("url"))
|
||||
.moveUpIcon('func=moveFieldUp&fid='.$fid.'&tid='.$tid,$self->get("url"))
|
||||
.moveDownIcon('func=moveFieldDown&fid='.$fid.'&tid='.$tid,$self->get("url"));
|
||||
|
|
@ -101,7 +101,7 @@ sub _tabAdminIcons {
|
|||
my $tid = shift;
|
||||
my $cantDelete = shift;
|
||||
my $output;
|
||||
$output = deleteIcon('func=deleteTabConfirm&tid='.$tid,$self->get("url"),WebGUI::International::get(100,"DataForm")) unless ($cantDelete);
|
||||
$output = deleteIcon('func=deleteTabConfirm&tid='.$tid,$self->get("url"),WebGUI::International::get(100,"Asset_DataForm")) unless ($cantDelete);
|
||||
$output .= editIcon('func=editTab&tid='.$tid,$self->get("url"))
|
||||
.moveLeftIcon('func=moveTabLeft&tid='.$tid,$self->get("url"))
|
||||
.moveRightIcon('func=moveTabRight&tid='.$tid,$self->get("url"));
|
||||
|
|
@ -203,38 +203,38 @@ sub getEditForm {
|
|||
-name=>"emailTemplateId",
|
||||
-value=>$self->getValue("emailTemplateId"),
|
||||
-namespace=>"DataForm",
|
||||
-label=>WebGUI::International::get(80,"DataForm"),
|
||||
-label=>WebGUI::International::get(80,"Asset_DataForm"),
|
||||
-afterEdit=>'func=edit'
|
||||
);
|
||||
$tabform->getTab("display")->template(
|
||||
-name=>"acknowlegementTemplateId",
|
||||
-value=>$self->getValue("acknowlegementTemplateId"),
|
||||
-namespace=>"DataForm",
|
||||
-label=>WebGUI::International::get(81,"DataForm"),
|
||||
-label=>WebGUI::International::get(81,"Asset_DataForm"),
|
||||
-afterEdit=>'func=edit'
|
||||
);
|
||||
$tabform->getTab("display")->template(
|
||||
-name=>"listTemplateId",
|
||||
-value=>$self->getValue("listTemplateId"),
|
||||
-namespace=>"DataForm/List",
|
||||
-label=>WebGUI::International::get(87,"DataForm"),
|
||||
-label=>WebGUI::International::get(87,"Asset_DataForm"),
|
||||
-afterEdit=>'func=edit'
|
||||
);
|
||||
$tabform->getTab("properties")->HTMLArea(
|
||||
-name=>"acknowledgement",
|
||||
-label=>WebGUI::International::get(16, "DataForm"),
|
||||
-value=>($self->get("acknowledgement") || WebGUI::International::get(3, "DataForm"))
|
||||
-label=>WebGUI::International::get(16, "Asset_DataForm"),
|
||||
-value=>($self->get("acknowledgement") || WebGUI::International::get(3, "Asset_DataForm"))
|
||||
);
|
||||
$tabform->getTab("properties")->yesNo(
|
||||
-name=>"mailData",
|
||||
-label=>WebGUI::International::get(74,"DataForm"),
|
||||
-label=>WebGUI::International::get(74,"Asset_DataForm"),
|
||||
-value=>$self->getValue("mailData")
|
||||
);
|
||||
if ($self->getId eq "new" && $session{form}{proceed} ne "manageAssets") {
|
||||
$tabform->getTab("properties")->whatNext(
|
||||
-options=>{
|
||||
editField=>WebGUI::International::get(76,"DataForm"),
|
||||
""=>WebGUI::International::get(745,"DataForm")
|
||||
editField=>WebGUI::International::get(76,"Asset_DataForm"),
|
||||
""=>WebGUI::International::get(745,"Asset_DataForm")
|
||||
},
|
||||
-value=>"editField"
|
||||
);
|
||||
|
|
@ -300,10 +300,10 @@ sub getListTemplateVars {
|
|||
my $var = shift;
|
||||
my @fieldLoop;
|
||||
$var->{"back.url"} = $self->getUrl."&entryId=0";
|
||||
$var->{"back.label"} = WebGUI::International::get(18,"DataForm");
|
||||
$var->{"back.label"} = WebGUI::International::get(18,"Asset_DataForm");
|
||||
#$var->{"entryId"} = $self->getId;
|
||||
#$var->{"delete.url"} = $self->getUrl."&func=deleteAllEntries";
|
||||
#$var->{"delete.label"} = WebGUI::International::get(91,"DataForm");
|
||||
#$var->{"delete.label"} = WebGUI::International::get(91,"Asset_DataForm");
|
||||
my $a = WebGUI::SQL->read("select DataForm_fieldId,name,label,isMailField,type from DataForm_field
|
||||
where assetId=".quote($self->getId)." order by sequenceNumber");
|
||||
while (my $field = $a->hashRef) {
|
||||
|
|
@ -339,7 +339,7 @@ sub getListTemplateVars {
|
|||
"record.edit.url"=>$self->getUrl("func=view&entryId=".$record->{DataForm_entryId}),
|
||||
"record.edit.icon"=>editIcon("func=view&entryId=".$record->{DataForm_entryId}, $self->getUrl),
|
||||
"record.delete.url"=>$self->getUrl("func=deleteEntry&entryId=".$record->{DataForm_entryId}),
|
||||
"record.delete.icon"=>deleteIcon("func=deleteEntry&entryId=".$record->{DataForm_entryId}, $self->getUrl, WebGUI::International::get('Delete entry confirmation',"DataForm")),
|
||||
"record.delete.icon"=>deleteIcon("func=deleteEntry&entryId=".$record->{Asset_DataForm_entryId}, $self->getUrl, WebGUI::International::get('Delete entry confirmation',"DataForm")),
|
||||
"record.username"=>$record->{username},
|
||||
"record.userId"=>$record->{userId},
|
||||
"record.submissionDate.epoch"=>$record->{submissionDate},
|
||||
|
|
@ -360,17 +360,17 @@ sub getRecordTemplateVars {
|
|||
$var->{error_loop} = [] unless (exists $var->{error_loop});
|
||||
$var->{canEdit} = ($self->canEdit);
|
||||
$var->{"entryList.url"} = $self->getUrl('func=view&entryId=list');
|
||||
$var->{"entryList.label"} = WebGUI::International::get(86,"DataForm");
|
||||
$var->{"entryList.label"} = WebGUI::International::get(86,"Asset_DataForm");
|
||||
$var->{"export.tab.url"} = $self->getUrl('func=exportTab');
|
||||
$var->{"export.tab.label"} = WebGUI::International::get(84,"DataForm");
|
||||
$var->{"export.tab.label"} = WebGUI::International::get(84,"Asset_DataForm");
|
||||
$var->{"delete.url"} = $self->getUrl('func=deleteEntry&entryId='.$var->{entryId});
|
||||
$var->{"delete.label"} = WebGUI::International::get(90,"DataForm");
|
||||
$var->{"delete.label"} = WebGUI::International::get(90,"Asset_DataForm");
|
||||
$var->{"back.url"} = $self->getUrl;
|
||||
$var->{"back.label"} = WebGUI::International::get(18,"DataForm");
|
||||
$var->{"back.label"} = WebGUI::International::get(18,"Asset_DataForm");
|
||||
$var->{"addField.url"} = $self->getUrl('func=editField');
|
||||
$var->{"addField.label"} = WebGUI::International::get(76,"DataForm");
|
||||
$var->{"addField.label"} = WebGUI::International::get(76,"Asset_DataForm");
|
||||
# add Tab label, url, header and init
|
||||
$var->{"addTab.label"}= WebGUI::International::get(105,"DataForm");;
|
||||
$var->{"addTab.label"}= WebGUI::International::get(105,"Asset_DataForm");;
|
||||
$var->{"addTab.url"}= $self->getUrl('func=editTab');
|
||||
$var->{"tab.init"}= _createTabInit($self->getId);
|
||||
$var->{"form.start"} = WebGUI::Form::formHeader({action=>$self->getUrl})
|
||||
|
|
@ -478,7 +478,7 @@ sub getRecordTemplateVars {
|
|||
$var->{field_loop} = \@fields;
|
||||
$tabsth->finish;
|
||||
$var->{tab_loop} = \@tabs;
|
||||
$var->{"form.send"} = WebGUI::Form::submit({value=>WebGUI::International::get(73, "DataForm")});
|
||||
$var->{"form.send"} = WebGUI::Form::submit({value=>WebGUI::International::get(73, "Asset_DataForm")});
|
||||
$var->{"form.save"} = WebGUI::Form::submit();
|
||||
$var->{"form.end"} = WebGUI::Form::formFooter();
|
||||
return $var;
|
||||
|
|
@ -486,7 +486,7 @@ sub getRecordTemplateVars {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(1,"DataForm");
|
||||
return WebGUI::International::get(1,"Asset_DataForm");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -502,7 +502,7 @@ sub processPropertiesFromFormPost {
|
|||
$self->setCollateral("DataForm_field","DataForm_fieldId",{
|
||||
DataForm_fieldId=>"new",
|
||||
name=>"from",
|
||||
label=>WebGUI::International::get(10,"DataForm"),
|
||||
label=>WebGUI::International::get(10,"Asset_DataForm"),
|
||||
status=>"editable",
|
||||
isMailField=>1,
|
||||
width=>0,
|
||||
|
|
@ -511,7 +511,7 @@ sub processPropertiesFromFormPost {
|
|||
$self->setCollateral("DataForm_field","DataForm_fieldId",{
|
||||
DataForm_fieldId=>"new",
|
||||
name=>"to",
|
||||
label=>WebGUI::International::get(11,"DataForm"),
|
||||
label=>WebGUI::International::get(11,"Asset_DataForm"),
|
||||
status=>"hidden",
|
||||
isMailField=>1,
|
||||
width=>0,
|
||||
|
|
@ -521,7 +521,7 @@ sub processPropertiesFromFormPost {
|
|||
$self->setCollateral("DataForm_field","DataForm_fieldId",{
|
||||
DataForm_fieldId=>"new",
|
||||
name=>"cc",
|
||||
label=>WebGUI::International::get(12,"DataForm"),
|
||||
label=>WebGUI::International::get(12,"Asset_DataForm"),
|
||||
status=>"hidden",
|
||||
isMailField=>1,
|
||||
width=>0,
|
||||
|
|
@ -530,7 +530,7 @@ sub processPropertiesFromFormPost {
|
|||
$self->setCollateral("DataForm_field","DataForm_fieldId",{
|
||||
DataForm_fieldId=>"new",
|
||||
name=>"bcc",
|
||||
label=>WebGUI::International::get(13,"DataForm"),
|
||||
label=>WebGUI::International::get(13,"Asset_DataForm"),
|
||||
status=>"hidden",
|
||||
isMailField=>1,
|
||||
width=>0,
|
||||
|
|
@ -539,12 +539,12 @@ sub processPropertiesFromFormPost {
|
|||
$self->setCollateral("DataForm_field","DataForm_fieldId",{
|
||||
DataForm_fieldId=>"new",
|
||||
name=>"subject",
|
||||
label=>WebGUI::International::get(14,"DataForm"),
|
||||
label=>WebGUI::International::get(14,"Asset_DataForm"),
|
||||
status=>"editable",
|
||||
isMailField=>1,
|
||||
width=>0,
|
||||
type=>"text",
|
||||
defaultValue=>WebGUI::International::get(2,"DataForm")
|
||||
defaultValue=>WebGUI::International::get(2,"Asset_DataForm")
|
||||
});
|
||||
}
|
||||
if ($session{form}{fid} eq "new") { # hack to get proceed to work.
|
||||
|
|
@ -673,7 +673,7 @@ sub www_edit {
|
|||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("data form add/edit","DataForm");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("7","DataForm"));
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("7","Asset_DataForm"));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -684,98 +684,98 @@ sub www_editField {
|
|||
tie %field, 'Tie::CPHash';
|
||||
tie %fieldStatus, 'Tie::IxHash';
|
||||
%fieldStatus = (
|
||||
"hidden" => WebGUI::International::get(4, "DataForm"),
|
||||
"visible" => WebGUI::International::get(5, "DataForm"),
|
||||
"editable" => WebGUI::International::get(6, "DataForm"),
|
||||
"required" => WebGUI::International::get(75, "DataForm")
|
||||
"hidden" => WebGUI::International::get(4, "Asset_DataForm"),
|
||||
"visible" => WebGUI::International::get(5, "Asset_DataForm"),
|
||||
"editable" => WebGUI::International::get(6, "Asset_DataForm"),
|
||||
"required" => WebGUI::International::get(75, "Asset_DataForm")
|
||||
);
|
||||
$session{form}{fid} = "new" if ($session{form}{fid} eq "");
|
||||
unless ($session{form}{fid} eq "new") {
|
||||
%field = WebGUI::SQL->quickHash("select * from DataForm_field where DataForm_fieldId=".quote($session{form}{fid}));
|
||||
}
|
||||
$tab = WebGUI::SQL->buildHashRef("select DataForm_tabId,label from DataForm_tab where assetId=".quote($self->getId));
|
||||
$tab->{0} = WebGUI::International::get("no tab","DataForm");
|
||||
$tab->{0} = WebGUI::International::get("no tab","Asset_DataForm");
|
||||
$f = WebGUI::HTMLForm->new(-action=>$self->getUrl);
|
||||
$f->hidden("fid",$session{form}{fid});
|
||||
$f->hidden("func","editFieldSave");
|
||||
$f->text(
|
||||
-name=>"label",
|
||||
-label=>WebGUI::International::get(77,"DataForm"),
|
||||
-label=>WebGUI::International::get(77,"Asset_DataForm"),
|
||||
-value=>$field{label}
|
||||
);
|
||||
$f->text(
|
||||
-name=>"name",
|
||||
-label=>WebGUI::International::get(21,"DataForm"),
|
||||
-label=>WebGUI::International::get(21,"Asset_DataForm"),
|
||||
-value=>$field{name}
|
||||
);
|
||||
if($field{sequenceNumber} && ! $field{isMailField}) {
|
||||
$f->integer(
|
||||
-name=>"position",
|
||||
-label=>WebGUI::International::get('Field Position',"DataForm"),
|
||||
-label=>WebGUI::International::get('Field Position',"Asset_DataForm"),
|
||||
-value=>$field{sequenceNumber}
|
||||
);
|
||||
}
|
||||
$f->selectList(
|
||||
-name=>"tid",
|
||||
-options=>$tab,
|
||||
-label=>WebGUI::International::get(104,"DataForm"),
|
||||
-label=>WebGUI::International::get(104,"Asset_DataForm"),
|
||||
-value=>[ $field{DataForm_tabId}] || [0]
|
||||
);
|
||||
$f->text(
|
||||
-name=>"subtext",
|
||||
-value=>$field{subtext},
|
||||
-label=>WebGUI::International::get(79,"DataForm"),
|
||||
-label=>WebGUI::International::get(79,"Asset_DataForm"),
|
||||
);
|
||||
$f->selectList(
|
||||
-name=>"status",
|
||||
-options=>\%fieldStatus,
|
||||
-label=>WebGUI::International::get(22,"DataForm"),
|
||||
-label=>WebGUI::International::get(22,"Asset_DataForm"),
|
||||
-value=>[ $field{status} ] || [ "editable" ]
|
||||
);
|
||||
$f->fieldType(
|
||||
-name=>"type",
|
||||
-label=>WebGUI::International::get(23,"DataForm"),
|
||||
-label=>WebGUI::International::get(23,"Asset_DataForm"),
|
||||
-value=>$field{type} || "text"
|
||||
);
|
||||
$f->integer(
|
||||
-name=>"width",
|
||||
-label=>WebGUI::International::get(8,"DataForm"),
|
||||
-label=>WebGUI::International::get(8,"Asset_DataForm"),
|
||||
-value=>($field{width} || 0)
|
||||
);
|
||||
$f->integer(
|
||||
-name=>"rows",
|
||||
-value=>$field{rows} || 0,
|
||||
-label=>WebGUI::International::get(27,"DataForm"),
|
||||
-subtext=>WebGUI::International::get(28,"DataForm"),
|
||||
-label=>WebGUI::International::get(27,"Asset_DataForm"),
|
||||
-subtext=>WebGUI::International::get(28,"Asset_DataForm"),
|
||||
);
|
||||
$f->yesNo(
|
||||
-name=>"vertical",
|
||||
-value=>$field{vertical},
|
||||
-label=>WebGUI::International::get('editField-vertical-label', "DataForm"),
|
||||
-subtext=>WebGUI::International::get('editField-vertical-subtext', "DataForm")
|
||||
-label=>WebGUI::International::get('editField-vertical-label', "Asset_DataForm"),
|
||||
-subtext=>WebGUI::International::get('editField-vertical-subtext', "Asset_DataForm")
|
||||
);
|
||||
$f->text(
|
||||
-name=>"extras",
|
||||
-value=>$field{extras},
|
||||
-label=>WebGUI::International::get('editField-extras-label', "DataForm")
|
||||
-label=>WebGUI::International::get('editField-extras-label', "Asset_DataForm")
|
||||
);
|
||||
$f->textarea(
|
||||
-name=>"possibleValues",
|
||||
-label=>WebGUI::International::get(24,"DataForm"),
|
||||
-label=>WebGUI::International::get(24,"Asset_DataForm"),
|
||||
-value=>$field{possibleValues},
|
||||
-subtext=>'<br>'.WebGUI::International::get(85,"DataForm")
|
||||
-subtext=>'<br>'.WebGUI::International::get(85,"Asset_DataForm")
|
||||
);
|
||||
$f->textarea(
|
||||
-name=>"defaultValue",
|
||||
-label=>WebGUI::International::get(25,"DataForm"),
|
||||
-label=>WebGUI::International::get(25,"Asset_DataForm"),
|
||||
-value=>$field{defaultValue},
|
||||
-subtext=>'<br>'.WebGUI::International::get(85,"DataForm")
|
||||
-subtext=>'<br>'.WebGUI::International::get(85,"Asset_DataForm")
|
||||
);
|
||||
if ($session{form}{fid} eq "new" && $session{form}{proceed} ne "manageAssets") {
|
||||
$f->whatNext(
|
||||
-options=>{
|
||||
"editField"=>WebGUI::International::get(76,"DataForm"),
|
||||
"viewDataForm"=>WebGUI::International::get(745,"DataForm")
|
||||
"editField"=>WebGUI::International::get(76,"Asset_DataForm"),
|
||||
"viewAsset_DataForm"=>WebGUI::International::get(745,"DataForm")
|
||||
},
|
||||
-value=>"editField"
|
||||
);
|
||||
|
|
@ -783,7 +783,7 @@ sub www_editField {
|
|||
$f->submit;
|
||||
my $ac = $self->getAdminConsole;
|
||||
$ac->setHelp("data form fields add/edit","DataForm");
|
||||
return $ac->render($f->print,WebGUI::International::get('20',"DataForm"));
|
||||
return $ac->render($f->print,WebGUI::International::get('20',"Asset_DataForm"));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -837,20 +837,20 @@ sub www_editTab {
|
|||
$f->hidden("func","editTabSave");
|
||||
$f->text(
|
||||
-name=>"label",
|
||||
-label=>WebGUI::International::get(101,"DataForm"),
|
||||
-label=>WebGUI::International::get(101,"Asset_DataForm"),
|
||||
-value=>$tab{label}
|
||||
);
|
||||
$f->textarea(
|
||||
-name=>"subtext",
|
||||
-label=>WebGUI::International::get(102,"DataForm"),
|
||||
-label=>WebGUI::International::get(102,"Asset_DataForm"),
|
||||
-value=>$tab{subtext},
|
||||
-subtext=>""
|
||||
);
|
||||
if ($session{form}{tid} eq "new") {
|
||||
$f->whatNext(
|
||||
-options=>{
|
||||
editTab=>WebGUI::International::get(103,"DataForm"),
|
||||
""=>WebGUI::International::get(745,"DataForm")
|
||||
editTab=>WebGUI::International::get(103,"Asset_DataForm"),
|
||||
""=>WebGUI::International::get(745,"Asset_DataForm")
|
||||
},
|
||||
-value=>"editTab"
|
||||
);
|
||||
|
|
@ -858,7 +858,7 @@ sub www_editTab {
|
|||
$f->submit;
|
||||
my $ac = $self->getAdminConsole;
|
||||
$ac->setHelp("data form fields add/edit","DataForm");
|
||||
return $ac->render($f->print,WebGUI::International::get('20',"DataForm"));
|
||||
return $ac->render($f->print,WebGUI::International::get('20',"Asset_DataForm"));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -987,7 +987,7 @@ sub www_process {
|
|||
}
|
||||
if ($row{status} eq "required" && ($value =~ /^\s$/ || $value eq "" || not defined $value)) {
|
||||
push (@errors,{
|
||||
"error.message"=>$row{label}." ".WebGUI::International::get(29,"DataForm").".",
|
||||
"error.message"=>$row{label}." ".WebGUI::International::get(29,"Asset_DataForm").".",
|
||||
});
|
||||
$hadErrors = 1;
|
||||
delete $var->{entryId};
|
||||
|
|
|
|||
|
|
@ -95,35 +95,35 @@ sub getEditForm {
|
|||
my $tabform = $self->SUPER::getEditForm();
|
||||
# $tabform->getTab("properties")->selectList(
|
||||
# -name=>"type",
|
||||
# -label=>WebGUI::International::get(501,"EventsCalendar"),
|
||||
# -label=>WebGUI::International::get(501,"Asset_EventsCalendar"),
|
||||
# -value=>[$self->getValue("type")],
|
||||
# -options=>{
|
||||
# 0=>WebGUI::International::get(502,"EventsCalendar"),
|
||||
# 1=>WebGUI::International::get(503,"EventsCalendar"),
|
||||
# 2=>WebGUI::International::get(504,"EventsCalendar"),
|
||||
# 3=>WebGUI::International::get(505,"EventsCalendar"),
|
||||
# 4=>WebGUI::International::get(506,"EventsCalendar")
|
||||
# 0=>WebGUI::International::get(502,"Asset_EventsCalendar"),
|
||||
# 1=>WebGUI::International::get(503,"Asset_EventsCalendar"),
|
||||
# 2=>WebGUI::International::get(504,"Asset_EventsCalendar"),
|
||||
# 3=>WebGUI::International::get(505,"Asset_EventsCalendar"),
|
||||
# 4=>WebGUI::International::get(506,"Asset_EventsCalendar")
|
||||
# },
|
||||
# );
|
||||
$tabform->getTab("properties")->selectList(
|
||||
-name=>"scope",
|
||||
-label=>WebGUI::International::get(507,"EventsCalendar"),
|
||||
-label=>WebGUI::International::get(507,"Asset_EventsCalendar"),
|
||||
-value=>[$self->getValue("scope")],
|
||||
-options=>{
|
||||
0=>WebGUI::International::get(508,"EventsCalendar"),
|
||||
1=>WebGUI::International::get(510,"EventsCalendar"),
|
||||
2=>WebGUI::International::get(509,"EventsCalendar"),
|
||||
0=>WebGUI::International::get(508,"Asset_EventsCalendar"),
|
||||
1=>WebGUI::International::get(510,"Asset_EventsCalendar"),
|
||||
2=>WebGUI::International::get(509,"Asset_EventsCalendar"),
|
||||
}
|
||||
);
|
||||
$tabform->getTab("display")->template(
|
||||
-name=>"templateId",
|
||||
-label=>WebGUI::International::get(94,"EventsCalendar"),
|
||||
-label=>WebGUI::International::get(94,"Asset_EventsCalendar"),
|
||||
-value=>$self->getValue('templateId'),
|
||||
-namespace=>"EventsCalendar"
|
||||
);
|
||||
$tabform->getTab("display")->template(
|
||||
-name=>"eventTemplateId",
|
||||
-label=>WebGUI::International::get(80,"EventsCalendar"),
|
||||
-label=>WebGUI::International::get(80,"Asset_EventsCalendar"),
|
||||
-value=>$self->getValue('eventTemplateId'),
|
||||
-namespace=>"EventsCalendar/Event",
|
||||
-afterEdit=>'func=edit&wid='.$self->get("wobjectId")
|
||||
|
|
@ -131,48 +131,48 @@ sub getEditForm {
|
|||
$tabform->getTab("display")->selectList(
|
||||
-name=>"startMonth",
|
||||
-options=>{
|
||||
"january"=>WebGUI::International::get('january','EventsCalendar'),
|
||||
"now"=>WebGUI::International::get(98,"EventsCalendar"),
|
||||
"current"=>WebGUI::International::get(82,"EventsCalendar"),
|
||||
"first"=>WebGUI::International::get(83,"EventsCalendar")
|
||||
"january"=>WebGUI::International::get('january','Asset_EventsCalendar'),
|
||||
"now"=>WebGUI::International::get(98,"Asset_EventsCalendar"),
|
||||
"current"=>WebGUI::International::get(82,"Asset_EventsCalendar"),
|
||||
"first"=>WebGUI::International::get(83,"Asset_EventsCalendar")
|
||||
},
|
||||
-label=>WebGUI::International::get(81,"EventsCalendar"),
|
||||
-label=>WebGUI::International::get(81,"Asset_EventsCalendar"),
|
||||
-value=>[$self->getValue("startMonth")]
|
||||
);
|
||||
my %options;
|
||||
tie %options, 'Tie::IxHash';
|
||||
%options = (
|
||||
"last"=>WebGUI::International::get(85,"EventsCalendar"),
|
||||
"after12"=>WebGUI::International::get(86,"EventsCalendar"),
|
||||
"after9"=>WebGUI::International::get(87,"EventsCalendar"),
|
||||
"after6"=>WebGUI::International::get(88,"EventsCalendar"),
|
||||
"after3"=>WebGUI::International::get(89,"EventsCalendar"),
|
||||
"current"=>WebGUI::International::get(82,"EventsCalendar")
|
||||
"last"=>WebGUI::International::get(85,"Asset_EventsCalendar"),
|
||||
"after12"=>WebGUI::International::get(86,"Asset_EventsCalendar"),
|
||||
"after9"=>WebGUI::International::get(87,"Asset_EventsCalendar"),
|
||||
"after6"=>WebGUI::International::get(88,"Asset_EventsCalendar"),
|
||||
"after3"=>WebGUI::International::get(89,"Asset_EventsCalendar"),
|
||||
"current"=>WebGUI::International::get(82,"Asset_EventsCalendar")
|
||||
);
|
||||
$tabform->getTab("display")->selectList(
|
||||
-name=>"endMonth",
|
||||
-options=>\%options,
|
||||
-label=>WebGUI::International::get(84,"EventsCalendar"),
|
||||
-label=>WebGUI::International::get(84,"Asset_EventsCalendar"),
|
||||
-value=>[$self->getValue("endMonth")]
|
||||
);
|
||||
$tabform->getTab("display")->selectList(
|
||||
-name=>"defaultMonth",
|
||||
-options=>{
|
||||
"current"=>WebGUI::International::get(82,"EventsCalendar"),
|
||||
"last"=>WebGUI::International::get(85,"EventsCalendar"),
|
||||
"first"=>WebGUI::International::get(83,"EventsCalendar")
|
||||
"current"=>WebGUI::International::get(82,"Asset_EventsCalendar"),
|
||||
"last"=>WebGUI::International::get(85,"Asset_EventsCalendar"),
|
||||
"first"=>WebGUI::International::get(83,"Asset_EventsCalendar")
|
||||
},
|
||||
-label=>WebGUI::International::get(90,"EventsCalendar"),
|
||||
-label=>WebGUI::International::get(90,"Asset_EventsCalendar"),
|
||||
-value=>[$self->getValue("defaultMonth")]
|
||||
);
|
||||
$tabform->getTab("display")->integer(
|
||||
-name=>"paginateAfter",
|
||||
-label=>WebGUI::International::get(19,"EventsCalendar"),
|
||||
-label=>WebGUI::International::get(19,"Asset_EventsCalendar"),
|
||||
-value=>$self->getValue("paginateAfter")
|
||||
);
|
||||
# $tabform->getTab("security")->group(
|
||||
# -name=>"groupIdManage",
|
||||
# -label=>WebGUI::International::get(500,"EventsCalendar"),
|
||||
# -label=>WebGUI::International::get(500,"Asset_EventsCalendar"),
|
||||
# -value=>[$self->getValue("groupIdManage")],
|
||||
# -uiLevel=>6
|
||||
# );
|
||||
|
|
@ -189,7 +189,7 @@ sub getIcon {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(2,"EventsCalendar");
|
||||
return WebGUI::International::get(2,"Asset_EventsCalendar");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -435,7 +435,7 @@ sub view {
|
|||
$var{month_loop} = \@$monthloop;
|
||||
# $var{"canManage"} = $self->canManage;
|
||||
$var{"addevent.url"} = $self->getUrl().'?func=addStyledEvent&class=WebGUI::Asset::Event';
|
||||
$var{"addevent.label"} = WebGUI::International::get(20,"EventsCalendar");
|
||||
$var{"addevent.label"} = WebGUI::International::get(20,"Asset_EventsCalendar");
|
||||
$var{'sunday.label'} = WebGUI::DateTime::getDayName(7);
|
||||
$var{'monday.label'} = WebGUI::DateTime::getDayName(1);
|
||||
$var{'tuesday.label'} = WebGUI::DateTime::getDayName(2);
|
||||
|
|
@ -458,28 +458,28 @@ sub view {
|
|||
my $nextCalMonthEnd = $calMonthEnd + $monthRangeLength;
|
||||
my $monthLabel;
|
||||
if ($monthRangeLength == 1) {
|
||||
$monthLabel = WebGUI::International::get(560,"EventsCalendar");
|
||||
$monthLabel = WebGUI::International::get(560,"Asset_EventsCalendar");
|
||||
} else {
|
||||
$monthLabel = WebGUI::International::get(561,"EventsCalendar");
|
||||
$monthLabel = WebGUI::International::get(561,"Asset_EventsCalendar");
|
||||
}
|
||||
$var{'pagination.previousPage'} = '<form method="POST" style="inline;" action="'.
|
||||
$self->getUrl.'?calMonthStart='.$calMonthStart.
|
||||
'"><a href="'.$self->getUrl.
|
||||
'?calMonthStart='.$prevCalMonthStart.'&calMonthEnd='.$prevCalMonthEnd.'">'.
|
||||
WebGUI::International::get(558,"EventsCalendar")." ".$monthRangeLength." ".
|
||||
WebGUI::International::get(558,"Asset_EventsCalendar")." ".$monthRangeLength." ".
|
||||
$monthLabel.'</a>';
|
||||
$var{'pagination.nextPage'} = '<a href="'.$self->getUrl.
|
||||
'?calMonthStart='.$nextCalMonthStart.'&calMonthEnd='.$nextCalMonthEnd.'">'.
|
||||
WebGUI::International::get(559,"EventsCalendar")." ".$monthRangeLength." ".
|
||||
WebGUI::International::get(559,"Asset_EventsCalendar")." ".$monthRangeLength." ".
|
||||
$monthLabel.'</a></form>';
|
||||
$var{'pagination.pageList.upTo20'} = '<select size="1" name="calMonthEnd">
|
||||
<option value="'.($calMonthStart).'">1 '.WebGUI::International::get(560,"EventsCalendar").'</option>
|
||||
<option value="'.(1+$calMonthStart).'">2 '.WebGUI::International::get(561,"EventsCalendar").'</option>
|
||||
<option value="'.(2+$calMonthStart).'">3 '.WebGUI::International::get(561,"EventsCalendar").'</option>
|
||||
<option value="'.(3+$calMonthStart).'">4 '.WebGUI::International::get(561,"EventsCalendar").'</option>
|
||||
<option value="'.(5+$calMonthStart).'">6 '.WebGUI::International::get(561,"EventsCalendar").'</option>
|
||||
<option value="'.(8+$calMonthStart).'">9 '.WebGUI::International::get(561,"EventsCalendar").'</option>
|
||||
<option value="'.(11+$calMonthStart).'">12 '.WebGUI::International::get(561,"EventsCalendar").'</option>
|
||||
<option value="'.($calMonthStart).'">1 '.WebGUI::International::get(560,"Asset_EventsCalendar").'</option>
|
||||
<option value="'.(1+$calMonthStart).'">2 '.WebGUI::International::get(561,"Asset_EventsCalendar").'</option>
|
||||
<option value="'.(2+$calMonthStart).'">3 '.WebGUI::International::get(561,"Asset_EventsCalendar").'</option>
|
||||
<option value="'.(3+$calMonthStart).'">4 '.WebGUI::International::get(561,"Asset_EventsCalendar").'</option>
|
||||
<option value="'.(5+$calMonthStart).'">6 '.WebGUI::International::get(561,"Asset_EventsCalendar").'</option>
|
||||
<option value="'.(8+$calMonthStart).'">9 '.WebGUI::International::get(561,"Asset_EventsCalendar").'</option>
|
||||
<option value="'.(11+$calMonthStart).'">12 '.WebGUI::International::get(561,"Asset_EventsCalendar").'</option>
|
||||
<input type="submit" value="Go" name="Go">';
|
||||
|
||||
|
||||
|
|
@ -529,7 +529,7 @@ sub www_edit {
|
|||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("events calendar add/edit","EventsCalendar");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("12","EventsCalendar"));
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("12","Asset_EventsCalendar"));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -91,8 +91,8 @@ sub getEditForm {
|
|||
if ($self->get("assetId") eq "new") {
|
||||
$tabform->getTab("properties")->whatNext(
|
||||
-options=>{
|
||||
view=>WebGUI::International::get(823, "Folder"),
|
||||
""=>WebGUI::International::get(847, "Folder")
|
||||
view=>WebGUI::International::get(823, "Asset_Folder"),
|
||||
""=>WebGUI::International::get(847, "Asset_Folder")
|
||||
},
|
||||
-value=>"view"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -107,27 +107,27 @@ sub getEditForm {
|
|||
%hash=(5=>5,10=>10,20=>20,30=>30,60=>60);
|
||||
$tabform->getTab("properties")->url(
|
||||
-name=>"proxiedUrl",
|
||||
-label=>WebGUI::International::get(1,"HttpProxy"),
|
||||
-label=>WebGUI::International::get(1,"Asset_HttpProxy"),
|
||||
-value=>$self->getValue("proxiedUrl")
|
||||
);
|
||||
$tabform->getTab("security")->yesNo(
|
||||
-name=>"followExternal",
|
||||
-label=>WebGUI::International::get(5,"HttpProxy"),
|
||||
-label=>WebGUI::International::get(5,"Asset_HttpProxy"),
|
||||
-value=>$self->getValue("followExternal")
|
||||
);
|
||||
$tabform->getTab("security")->yesNo(
|
||||
-name=>"followRedirect",
|
||||
-label=>WebGUI::International::get(8,"HttpProxy"),
|
||||
-label=>WebGUI::International::get(8,"Asset_HttpProxy"),
|
||||
-value=>$self->getValue("followRedirect")
|
||||
);
|
||||
$tabform->getTab("properties")->yesNo(
|
||||
-name=>"rewriteUrls",
|
||||
-label=>WebGUI::International::get(12,"HttpProxy"),
|
||||
-label=>WebGUI::International::get(12,"Asset_HttpProxy"),
|
||||
-value=>$self->getValue("rewriteUrls")
|
||||
);
|
||||
$tabform->getTab("display")->yesNo(
|
||||
-name=>"removeStyle",
|
||||
-label=>WebGUI::International::get(6,"HttpProxy"),
|
||||
-label=>WebGUI::International::get(6,"Asset_HttpProxy"),
|
||||
-value=>$self->getValue("removeStyle")
|
||||
);
|
||||
$tabform->getTab("display")->filterContent(
|
||||
|
|
@ -137,17 +137,17 @@ sub getEditForm {
|
|||
$tabform->getTab("properties")->selectList(
|
||||
-name=>"timeout",
|
||||
-options=>\%hash,
|
||||
-label=>WebGUI::International::get(4,"HttpProxy"),
|
||||
-label=>WebGUI::International::get(4,"Asset_HttpProxy"),
|
||||
-value=>[$self->getValue("timeout")]
|
||||
);
|
||||
$tabform->getTab("display")->text(
|
||||
-name=>"searchFor",
|
||||
-label=>WebGUI::International::get(13,"HttpProxy"),
|
||||
-label=>WebGUI::International::get(13,"Asset_HttpProxy"),
|
||||
-value=>$self->getValue("searchFor")
|
||||
);
|
||||
$tabform->getTab("display")->text(
|
||||
-name=>"stopAt",
|
||||
-label=>WebGUI::International::get(14,"HttpProxy"),
|
||||
-label=>WebGUI::International::get(14,"Asset_HttpProxy"),
|
||||
-value=>$self->getValue("stopAt")
|
||||
);
|
||||
return $tabform;
|
||||
|
|
@ -164,7 +164,7 @@ sub getIcon {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(3,"HttpProxy");
|
||||
return WebGUI::International::get(3,"Asset_HttpProxy");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -346,7 +346,7 @@ sub www_edit {
|
|||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("http proxy add/edit","HttpProxy");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("2","HttpProxy"));
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("2","Asset_HttpProxy"));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -97,21 +97,21 @@ sub getEditForm {
|
|||
# Unconditional read to catch intallation errors.
|
||||
my $sth = WebGUI::SQL->unconditionalRead("select distinct(indexName), indexName from IndexedSearch_docInfo");
|
||||
unless ($sth->errorCode < 1) {
|
||||
return "<p><b>" . WebGUI::International::get(1,"IndexedSearch") . $sth->errorMessage."</b></p>";
|
||||
return "<p><b>" . WebGUI::International::get(1,"Asset_IndexedSearch") . $sth->errorMessage."</b></p>";
|
||||
}
|
||||
while (@data = $sth->array) {
|
||||
$indexName{$data[0]} = $data[1];
|
||||
}
|
||||
$sth->finish;
|
||||
unless(%indexName) {
|
||||
return "<p><b>" . WebGUI::International::get(2,"IndexedSearch") .
|
||||
"<p>" . WebGUI::International::get(3,"IndexedSearch") . "</b></p>";
|
||||
return "<p><b>" . WebGUI::International::get(2,"Asset_IndexedSearch") .
|
||||
"<p>" . WebGUI::International::get(3,"Asset_IndexedSearch") . "</b></p>";
|
||||
}
|
||||
|
||||
# Index to use
|
||||
# $tabform->getTab("properties")->radioList( -name=>'indexName',
|
||||
# -options=>\%indexName,
|
||||
# -label=>WebGUI::International::get(5,"IndexedSearch"),
|
||||
# -label=>WebGUI::International::get(5,"Asset_IndexedSearch"),
|
||||
# -value=>$self->getValue("indexName"),
|
||||
# -vertical=>1
|
||||
# );
|
||||
|
|
@ -123,26 +123,26 @@ sub getEditForm {
|
|||
);
|
||||
|
||||
# Page roots
|
||||
#%searchRoot = ( 'any'=>WebGUI::International::get(15,"IndexedSearch"),
|
||||
# $session{page}{pageId}=>WebGUI::International::get(4,"IndexedSearch"),
|
||||
#%searchRoot = ( 'any'=>WebGUI::International::get(15,"Asset_IndexedSearch"),
|
||||
# $session{page}{pageId}=>WebGUI::International::get(4,"Asset_IndexedSearch"),
|
||||
# WebGUI::SQL->buildHash("select pageId,title from page where parentId='0' and isSystem<>1 order by title")
|
||||
# );
|
||||
#$tabform->getTab("properties")->checkList ( -name=>'searchRoot',
|
||||
# -options=>\%searchRoot,
|
||||
# -label=>WebGUI::International::get(6,"IndexedSearch"),
|
||||
# -label=>WebGUI::International::get(6,"Asset_IndexedSearch"),
|
||||
# -value=>[ split("\n", $self->getValue("searchRoot")) ],
|
||||
# -multiple=>1,
|
||||
# -vertical=>1,
|
||||
# );
|
||||
$tabform->getTab("properties")->yesNo(
|
||||
-name=>'forceSearchRoots',
|
||||
-label=>WebGUI::International::get('edit-forceSearchRoots-label',"IndexedSearch"),
|
||||
-label=>WebGUI::International::get('edit-forceSearchRoots-label',"Asset_IndexedSearch"),
|
||||
-value=>$self->getValue("forceSearchRoots")
|
||||
);
|
||||
# Content of specific user
|
||||
$tabform->getTab("properties")->selectList ( -name=>'users',
|
||||
-options=>$self->_getUsers(),
|
||||
-label=>WebGUI::International::get(7,"IndexedSearch"),
|
||||
-label=>WebGUI::International::get(7,"Asset_IndexedSearch"),
|
||||
-value=>[ split("\n", $self->getValue("users")) ],
|
||||
-multiple=>1,
|
||||
-size=>5
|
||||
|
|
@ -151,7 +151,7 @@ sub getEditForm {
|
|||
# Content in specific namespaces
|
||||
$tabform->getTab("properties")->selectList ( -name=>'namespaces',
|
||||
-options=>$self->_getNamespaces,
|
||||
-label=>WebGUI::International::get(8,"IndexedSearch"),
|
||||
-label=>WebGUI::International::get(8,"Asset_IndexedSearch"),
|
||||
-value=>[ split("\n", $self->getValue("namespaces")) ],
|
||||
-multiple=>1,
|
||||
-size=>5
|
||||
|
|
@ -162,7 +162,7 @@ sub getEditForm {
|
|||
delete $contentTypes->{content};
|
||||
$tabform->getTab("properties")->checkList ( -name=>'contentTypes',
|
||||
-options=>$contentTypes,
|
||||
-label=>WebGUI::International::get(10,"IndexedSearch"),
|
||||
-label=>WebGUI::International::get(10,"Asset_IndexedSearch"),
|
||||
-value=>[ split("\n", $self->getValue("contentTypes")) ],
|
||||
-multiple=>1,
|
||||
-vertical=>1,
|
||||
|
|
@ -172,15 +172,15 @@ sub getEditForm {
|
|||
-namespace=>"IndexedSearch"
|
||||
);
|
||||
$tabform->getTab("display")->integer ( -name=>'paginateAfter',
|
||||
-label=>WebGUI::International::get(11,"IndexedSearch"),
|
||||
-label=>WebGUI::International::get(11,"Asset_IndexedSearch"),
|
||||
-value=>$self->getValue("paginateAfter"),
|
||||
);
|
||||
$tabform->getTab("display")->integer ( -name=>'previewLength',
|
||||
-label=>WebGUI::International::get(12,"IndexedSearch"),
|
||||
-label=>WebGUI::International::get(12,"Asset_IndexedSearch"),
|
||||
-value=>$self->getValue("previewLength"),
|
||||
);
|
||||
$tabform->getTab("display")->yesNo ( -name=>'highlight',
|
||||
-label=>WebGUI::International::get(13,"IndexedSearch"),
|
||||
-label=>WebGUI::International::get(13,"Asset_IndexedSearch"),
|
||||
-value=>$self->getValue("highlight"),
|
||||
);
|
||||
|
||||
|
|
@ -194,7 +194,7 @@ sub getEditForm {
|
|||
for (1..5) {
|
||||
my $highlight = "highlight_$_";
|
||||
$tabform->getTab("display")->text ( -name=>$highlight,
|
||||
-label=>WebGUI::International::get(14,"IndexedSearch") ." $_:",
|
||||
-label=>WebGUI::International::get(14,"Asset_IndexedSearch") ." $_:",
|
||||
-size=>7,
|
||||
-value=>$self->getValue($highlight),
|
||||
-subtext=>qq{
|
||||
|
|
@ -215,7 +215,7 @@ sub getIcon {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(17,"IndexedSearch");
|
||||
return WebGUI::International::get(17,"Asset_IndexedSearch");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -238,9 +238,9 @@ sub view {
|
|||
$var{query} = WebGUI::Macro::negate($var{query});
|
||||
|
||||
# Set some standard vars
|
||||
$var{submit} = WebGUI::Form::submit({value=>WebGUI::International::get(16, "IndexedSearch")});
|
||||
$var{submit} = WebGUI::Form::submit({value=>WebGUI::International::get(16, "Asset_IndexedSearch")});
|
||||
$var{actionURL} = $self->getUrl;
|
||||
$var{"int.search"} = WebGUI::International::get(16,"IndexedSearch");
|
||||
$var{"int.search"} = WebGUI::International::get(16,"Asset_IndexedSearch");
|
||||
$var{numberOfResults} = '0';
|
||||
$var{"select_".$self->getValue("paginateAfter")} = "selected";
|
||||
|
||||
|
|
@ -384,7 +384,7 @@ sub www_edit {
|
|||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("search add/edit");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("26","IndexedSearch"));
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("26","Asset_IndexedSearch"));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -489,12 +489,12 @@ sub _getNamespaces {
|
|||
}
|
||||
tie my %namespaces, 'Tie::IxHash';
|
||||
if ($restricted and $self->get('namespaces') !~ /any/i) {
|
||||
$namespaces{any} = WebGUI::International::get(18,"IndexedSearch");
|
||||
$namespaces{any} = WebGUI::International::get(18,"Asset_IndexedSearch");
|
||||
foreach (split/\n/, $self->get('namespaces')) {
|
||||
$namespaces{$_} = $international{$_} || ucfirst($_);
|
||||
}
|
||||
} else {
|
||||
$namespaces{any} = WebGUI::International::get(18,"IndexedSearch");
|
||||
$namespaces{any} = WebGUI::International::get(18,"Asset_IndexedSearch");
|
||||
foreach (WebGUI::SQL->buildArray("select distinct(namespace) from IndexedSearch_docInfo order by namespace")) {
|
||||
$namespaces{$_} = $international{$_} ||ucfirst($_);
|
||||
}
|
||||
|
|
@ -505,13 +505,13 @@ sub _getNamespaces {
|
|||
#-------------------------------------------------------------------
|
||||
sub _getContentTypes {
|
||||
my ($self, $restricted) = @_;
|
||||
my %international = ( 'page' => WebGUI::International::get('page',"IndexedSearch"),
|
||||
'wobject' => WebGUI::International::get(19,"IndexedSearch"),
|
||||
'wobjectDetail' => WebGUI::International::get(20,"IndexedSearch"),
|
||||
'content' => WebGUI::International::get(21,"IndexedSearch"),
|
||||
'discussion' => WebGUI::International::get('discussion',"IndexedSearch"),
|
||||
'profile' => WebGUI::International::get(22,"IndexedSearch"),
|
||||
'any' => WebGUI::International::get(23,"IndexedSearch"),
|
||||
my %international = ( 'page' => WebGUI::International::get('page',"Asset_IndexedSearch"),
|
||||
'wobject' => WebGUI::International::get(19,"Asset_IndexedSearch"),
|
||||
'wobjectDetail' => WebGUI::International::get(20,"Asset_IndexedSearch"),
|
||||
'content' => WebGUI::International::get(21,"Asset_IndexedSearch"),
|
||||
'discussion' => WebGUI::International::get('discussion',"Asset_IndexedSearch"),
|
||||
'profile' => WebGUI::International::get(22,"Asset_IndexedSearch"),
|
||||
'any' => WebGUI::International::get(23,"Asset_IndexedSearch"),
|
||||
);
|
||||
tie my %contentTypes, 'Tie::IxHash';
|
||||
if ($restricted and $self->get('contentTypes') !~ /any/i) {
|
||||
|
|
@ -548,12 +548,12 @@ sub _getUsers {
|
|||
my ($self, $restricted) = @_;
|
||||
tie my %users, 'Tie::IxHash';
|
||||
if ($restricted and $self->get('users') !~ /any/i) {
|
||||
$users{any} = WebGUI::International::get(25,"IndexedSearch");
|
||||
$users{any} = WebGUI::International::get(25,"Asset_IndexedSearch");
|
||||
foreach (split/\n/, $self->get('users')) {
|
||||
$users{$_} = $_;
|
||||
}
|
||||
} else {
|
||||
%users = ( 'any' => WebGUI::International::get(25,"IndexedSearch"),
|
||||
%users = ( 'any' => WebGUI::International::get(25,"Asset_IndexedSearch"),
|
||||
WebGUI::SQL->buildHash("select userId, username from users order by username")
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,8 +96,8 @@ sub getEditForm {
|
|||
if ($self->get("assetId") eq "new") {
|
||||
$tabform->getTab("properties")->whatNext(
|
||||
-options=>{
|
||||
view=>WebGUI::International::get(823, 'Layout'),
|
||||
""=>WebGUI::International::get(847, 'Layout')
|
||||
view=>WebGUI::International::get(823, 'Asset_Layout'),
|
||||
""=>WebGUI::International::get(847, 'Asset_Layout')
|
||||
},
|
||||
-value=>"view"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ sub getIcon {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(2,"MessageBoard");
|
||||
return WebGUI::International::get(2,"Asset_MessageBoard");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -111,13 +111,13 @@ sub view {
|
|||
}
|
||||
$var{'default.listing'} = $first->view if ($count == 1 && defined $first);
|
||||
$var{'forum.add.url'} = $self->getUrl("func=add&class=WebGUI::Asset::Wobject::Collaboration");
|
||||
$var{'forum.add.label'} = WebGUI::International::get(75,"MessageBoard");
|
||||
$var{'title.label'} = WebGUI::International::get('title','MessageBoard');
|
||||
$var{'views.label'} = WebGUI::International::get('views',,'MessageBoard');
|
||||
$var{'rating.label'} = WebGUI::International::get('rating','MessageBoard');
|
||||
$var{'threads.label'} = WebGUI::International::get('threads','MessageBoard');
|
||||
$var{'replies.label'} = WebGUI::International::get('replies','MessageBoard');
|
||||
$var{'lastpost.label'} = WebGUI::International::get('lastpost','MessageBoard');
|
||||
$var{'forum.add.label'} = WebGUI::International::get(75,"Asset_MessageBoard");
|
||||
$var{'title.label'} = WebGUI::International::get('title','Asset_MessageBoard');
|
||||
$var{'views.label'} = WebGUI::International::get('views',,'Asset_MessageBoard');
|
||||
$var{'rating.label'} = WebGUI::International::get('rating','Asset_MessageBoard');
|
||||
$var{'threads.label'} = WebGUI::International::get('threads','Asset_MessageBoard');
|
||||
$var{'replies.label'} = WebGUI::International::get('replies','Asset_MessageBoard');
|
||||
$var{'lastpost.label'} = WebGUI::International::get('lastpost','Asset_MessageBoard');
|
||||
$var{areMultipleForums} = ($count > 1);
|
||||
$var{forum_loop} = \@forum_loop;
|
||||
return $self->processTemplate(\%var,$self->get("templateId"));
|
||||
|
|
@ -129,7 +129,7 @@ sub www_edit {
|
|||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("message board add/edit","MessageBoard");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("6","MessageBoard"));
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("6","Asset_MessageBoard"));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -165,17 +165,17 @@ sub getEditForm {
|
|||
);
|
||||
$tabform->getTab("display")->yesNo(
|
||||
-name=>'showSystemPages',
|
||||
-label=>WebGUI::International::get(30,'Navigation'),
|
||||
-label=>WebGUI::International::get(30,'Asset_Navigation'),
|
||||
-value=>$self->getValue("showSystemPages")
|
||||
);
|
||||
$tabform->getTab("display")->yesNo(
|
||||
-name=>'showHiddenPages',
|
||||
-label=>WebGUI::International::get(31,'Navigation'),
|
||||
-label=>WebGUI::International::get(31,'Asset_Navigation'),
|
||||
-value=>$self->getValue("showHiddenPages")
|
||||
);
|
||||
$tabform->getTab("display")->yesNo(
|
||||
-name=>'showUnprivilegedPages',
|
||||
-label=>WebGUI::International::get(32,'Navigation'),
|
||||
-label=>WebGUI::International::get(32,'Asset_Navigation'),
|
||||
-value=>$self->getValue("showUnprivilegedPages")
|
||||
);
|
||||
my $start = $self->getValue("startPoint");
|
||||
|
|
@ -228,7 +228,7 @@ sub getIcon {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get("navigation","Navigation");
|
||||
return WebGUI::International::get("navigation","Asset_Navigation");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -394,7 +394,7 @@ sub www_edit {
|
|||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("navigation add/edit","Navigation");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("22","Navigation"));
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("22","Asset_Navigation"));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -181,18 +181,18 @@ sub getEditForm {
|
|||
}
|
||||
$tabform->getTab("security")->yesNo(
|
||||
-name=>"active",
|
||||
-label=>WebGUI::International::get(3,"Poll"),
|
||||
-label=>WebGUI::International::get(3,"Asset_Poll"),
|
||||
-value=>$self->getValue("active")
|
||||
);
|
||||
$tabform->getTab("security")->group(
|
||||
-name=>"voteGroup",
|
||||
-label=>WebGUI::International::get(4,"Poll"),
|
||||
-label=>WebGUI::International::get(4,"Asset_Poll"),
|
||||
-value=>[$self->getValue("voteGroup")]
|
||||
);
|
||||
if ($session{setting}{useKarma}) {
|
||||
$tabform->getTab("properties")->integer(
|
||||
-name=>"karmaPerVote",
|
||||
-label=>WebGUI::International::get(20,"Poll"),
|
||||
-label=>WebGUI::International::get(20,"Asset_Poll"),
|
||||
-value=>$self->getValue("karmaPerVote")
|
||||
);
|
||||
} else {
|
||||
|
|
@ -203,28 +203,28 @@ sub getEditForm {
|
|||
}
|
||||
$tabform->getTab("display")->integer(
|
||||
-name=>"graphWidth",
|
||||
-label=>WebGUI::International::get(5,"Poll"),
|
||||
-label=>WebGUI::International::get(5,"Asset_Poll"),
|
||||
-value=>$self->getValue("graphWidth")
|
||||
);
|
||||
$tabform->getTab("properties")->text(
|
||||
-name=>"question",
|
||||
-label=>WebGUI::International::get(6,"Poll"),
|
||||
-label=>WebGUI::International::get(6,"Asset_Poll"),
|
||||
-value=>$self->getValue("question")
|
||||
);
|
||||
$tabform->getTab("properties")->textarea(
|
||||
-name=>"answers",
|
||||
-label=>WebGUI::International::get(7,"Poll"),
|
||||
-subtext=>('<span class="formSubtext"><br>'.WebGUI::International::get(8,"Poll").'</span>'),
|
||||
-label=>WebGUI::International::get(7,"Asset_Poll"),
|
||||
-subtext=>('<span class="formSubtext"><br>'.WebGUI::International::get(8,"Asset_Poll").'</span>'),
|
||||
-value=>$answers
|
||||
);
|
||||
$tabform->getTab("display")->yesNo(
|
||||
-name=>"randomizeAnswers",
|
||||
-label=>WebGUI::International::get(72,"Poll"),
|
||||
-label=>WebGUI::International::get(72,"Asset_Poll"),
|
||||
-value=>$self->getValue("randomizeAnswers")
|
||||
);
|
||||
$tabform->getTab("properties")->yesNo(
|
||||
-name=>"resetVotes",
|
||||
-label=>WebGUI::International::get(10,"Poll")
|
||||
-label=>WebGUI::International::get(10,"Asset_Poll")
|
||||
);
|
||||
return $tabform;
|
||||
}
|
||||
|
|
@ -270,7 +270,7 @@ sub getIndexerParams {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(1,"Poll");
|
||||
return WebGUI::International::get(1,"Asset_Poll");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -323,11 +323,11 @@ sub view {
|
|||
}
|
||||
$var{canVote} = $showPoll;
|
||||
my ($totalResponses) = WebGUI::SQL->quickArray("select count(*) from Poll_answer where assetId=".quote($self->getId));
|
||||
$var{"responses.label"} = WebGUI::International::get(12,"Poll");
|
||||
$var{"responses.label"} = WebGUI::International::get(12,"Asset_Poll");
|
||||
$var{"responses.total"} = $totalResponses;
|
||||
$var{"form.start"} = WebGUI::Form::formHeader({action=>$self->getUrl});
|
||||
$var{"form.start"} .= WebGUI::Form::hidden({name=>'func',value=>'vote'});
|
||||
$var{"form.submit"} = WebGUI::Form::submit({value=>WebGUI::International::get(11,"Poll")});
|
||||
$var{"form.submit"} = WebGUI::Form::submit({value=>WebGUI::International::get(11,"Asset_Poll")});
|
||||
$var{"form.end"} = WebGUI::Form::formFooter();
|
||||
$totalResponses = 1 if ($totalResponses < 1);
|
||||
for (my $i=1; $i<=20; $i++) {
|
||||
|
|
@ -355,7 +355,7 @@ sub www_edit {
|
|||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("poll add/edit","Poll");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("9","Poll"));
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("9","Asset_Poll"));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -38,15 +38,15 @@ sub _addFileTab {
|
|||
if($value eq ""){
|
||||
$tabform->getTab("properties")->file(
|
||||
-name=>$column,
|
||||
-label=>WebGUI::International::get($internationalId,"Product"),
|
||||
-label=>WebGUI::International::get($internationalId,"Asset_Product"),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
my $file = WebGUI::Storage->get($value);
|
||||
$tabform->getTab("properties")->readOnly(
|
||||
-value=>'<a href="'.$self->getUrl('func=deleteFileConfirm&file='.$column).'">'.WebGUI::International::get("deleteImage","Product").'</a>',
|
||||
-label=>WebGUI::International::get($internationalId,"Product"),
|
||||
-value=>'<a href="'.$self->getUrl('func=deleteFileConfirm&file='.$column).'">'.WebGUI::International::get("deleteImage","Asset_Product").'</a>',
|
||||
-label=>WebGUI::International::get($internationalId,"Asset_Product"),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -207,12 +207,12 @@ sub getEditForm {
|
|||
);
|
||||
$tabform->getTab("properties")->text(
|
||||
-name=>"price",
|
||||
-label=>WebGUI::International::get(10,"Product"),
|
||||
-label=>WebGUI::International::get(10,"Asset_Product"),
|
||||
-value=>$self->getValue("price")
|
||||
);
|
||||
$tabform->getTab("properties")->text(
|
||||
-name=>"productNumber",
|
||||
-label=>WebGUI::International::get(11,"Product"),
|
||||
-label=>WebGUI::International::get(11,"Asset_Product"),
|
||||
-value=>$self->getValue("productNumber")
|
||||
);
|
||||
$self->_addFileTab($tabform,"image1",7);
|
||||
|
|
@ -297,7 +297,7 @@ sub getIndexerParams {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(1,"Product");
|
||||
return WebGUI::International::get(1,"Asset_Product");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -348,8 +348,8 @@ sub www_addAccessory {
|
|||
@usedAccessories = WebGUI::SQL->buildArray("select accessoryAssetId from Product_accessory where assetId=".quote($self->getId));
|
||||
push(@usedAccessories,$self->getId);
|
||||
$accessory = WebGUI::SQL->buildHashRef("select assetId, title from asset where className='WebGUI::Asset::Wobject::Product' and assetId not in (".quoteAndJoin(\@usedAccessories).")");
|
||||
$f->selectList("accessoryAccessId",$accessory,WebGUI::International::get(17,'Product'));
|
||||
$f->yesNo("proceed",WebGUI::International::get(18,'Product'));
|
||||
$f->selectList("accessoryAccessId",$accessory,WebGUI::International::get(17,'Asset_Product'));
|
||||
$f->yesNo("proceed",WebGUI::International::get(18,'Asset_Product'));
|
||||
$f->submit;
|
||||
return $self->getAdminConsole->render($f->print, "product accessory add/edit");
|
||||
}
|
||||
|
|
@ -375,8 +375,8 @@ sub www_addRelated {
|
|||
@usedRelated = WebGUI::SQL->buildArray("select relatedAssetId from Product_related where assetId=".quote($self->getId));
|
||||
push(@usedRelated,$self->getId);
|
||||
$related = WebGUI::SQL->buildHashRef("select assetId,title from asset where className='WebGUI::Asset::Wobject::Product' and assetId not in (".quoteAndJoin(\@usedRelated).")");
|
||||
$f->selectList("relatedAssetId",$related,WebGUI::International::get(20,'Product'));
|
||||
$f->yesNo("proceed",WebGUI::International::get(21,'Product'));
|
||||
$f->selectList("relatedAssetId",$related,WebGUI::International::get(20,'Asset_Product'));
|
||||
$f->yesNo("proceed",WebGUI::International::get(21,'Asset_Product'));
|
||||
$f->submit;
|
||||
return $self->getAdminConsole->render($f->print,"product related add/edit");
|
||||
}
|
||||
|
|
@ -454,7 +454,7 @@ sub www_edit {
|
|||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("product add/edit","Product");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("6","Product"));
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("6","Asset_Product"));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -481,8 +481,8 @@ sub www_editBenefit {
|
|||
$f->hidden("bid",$data->{Product_benefitId});
|
||||
$f->hidden("func","editBenefitSave");
|
||||
$benefits = WebGUI::SQL->buildHashRef("select benefit,benefit from Product_benefit order by benefit");
|
||||
$f->combo("benefit",$benefits,WebGUI::International::get(51,'Product'),[$data->{benefits}]);
|
||||
$f->yesNo("proceed",WebGUI::International::get(52,'Product'));
|
||||
$f->combo("benefit",$benefits,WebGUI::International::get(51,'Asset_Product'),[$data->{benefits}]);
|
||||
$f->yesNo("proceed",WebGUI::International::get(52,'Asset_Product'));
|
||||
$f->submit;
|
||||
return $self->getAdminConsole->render($f->print, "product benefit add/edit");
|
||||
}
|
||||
|
|
@ -512,8 +512,8 @@ sub www_editFeature {
|
|||
$f->hidden("fid",$data->{Product_featureId});
|
||||
$f->hidden("func","editFeatureSave");
|
||||
$features = WebGUI::SQL->buildHashRef("select feature,feature from Product_feature order by feature");
|
||||
$f->combo("feature",$features,WebGUI::International::get(23,'Product'),[$data->{feature}]);
|
||||
$f->yesNo("proceed",WebGUI::International::get(24,'Product'));
|
||||
$f->combo("feature",$features,WebGUI::International::get(23,'Asset_Product'),[$data->{feature}]);
|
||||
$f->yesNo("proceed",WebGUI::International::get(24,'Asset_Product'));
|
||||
$f->submit;
|
||||
return $self->getAdminConsole->render($f->print, "product feature add/edit");
|
||||
}
|
||||
|
|
@ -542,11 +542,11 @@ sub www_editSpecification {
|
|||
$f->hidden("sid",$data->{Product_specificationId});
|
||||
$f->hidden("func","editSpecificationSave");
|
||||
$hashRef = WebGUI::SQL->buildHashRef("select name,name from Product_specification order by name");
|
||||
$f->combo("name",$hashRef,WebGUI::International::get(26,'Product'),[$data->{name}]);
|
||||
$f->text("value",WebGUI::International::get(27,'Product'),$data->{value});
|
||||
$f->combo("name",$hashRef,WebGUI::International::get(26,'Asset_Product'),[$data->{name}]);
|
||||
$f->text("value",WebGUI::International::get(27,'Asset_Product'),$data->{value});
|
||||
$hashRef = WebGUI::SQL->buildHashRef("select units,units from Product_specification order by units");
|
||||
$f->combo("units",$hashRef,WebGUI::International::get(29,'Product'),[$data->{units}]);
|
||||
$f->yesNo("proceed",WebGUI::International::get(28,'Product'));
|
||||
$f->combo("units",$hashRef,WebGUI::International::get(29,'Asset_Product'),[$data->{units}]);
|
||||
$f->yesNo("proceed",WebGUI::International::get(28,'Asset_Product'));
|
||||
$f->submit;
|
||||
return $self->getAdminConsole->render($f->print, "product specification add/edit");
|
||||
}
|
||||
|
|
@ -660,21 +660,21 @@ sub view {
|
|||
if ($brochure) {
|
||||
$file = WebGUI::Storage->get($brochure);
|
||||
$var{"brochure.icon"} = $self->getFileIconUrl($file);
|
||||
$var{"brochure.label"} = WebGUI::International::get(13,"Product");
|
||||
$var{"brochure.label"} = WebGUI::International::get(13,"Asset_Product");
|
||||
$var{"brochure.URL"} = $self->getFileUrl($file);
|
||||
}
|
||||
#---manual
|
||||
if ($manual) {
|
||||
$file = WebGUI::Storage->get($manual);
|
||||
$var{"manual.icon"} = $self->getFileIconUrl($file);
|
||||
$var{"manual.label"} = WebGUI::International::get(14,"Product");
|
||||
$var{"manual.label"} = WebGUI::International::get(14,"Asset_Product");
|
||||
$var{"manual.URL"} = $self->getFileUrl($file);
|
||||
}
|
||||
#---warranty
|
||||
if ($warranty) {
|
||||
$file = WebGUI::Storage->get($warranty);
|
||||
$var{"warranty.icon"} = $self->getFileIconUrl($file);
|
||||
$var{"warranty.label"} = WebGUI::International::get(15,"Product");
|
||||
$var{"warranty.label"} = WebGUI::International::get(15,"Asset_Product");
|
||||
$var{"warranty.URL"} = $self->getFileUrl($file);
|
||||
}
|
||||
#---image1
|
||||
|
|
@ -698,10 +698,10 @@ sub view {
|
|||
|
||||
#---features
|
||||
$var{"addFeature.url"} = $self->getUrl('func=editFeature&fid=new');
|
||||
$var{"addFeature.label"} = WebGUI::International::get(34,'Product');
|
||||
$var{"addFeature.label"} = WebGUI::International::get(34,'Asset_Product');
|
||||
$sth = WebGUI::SQL->read("select feature,Product_featureId from Product_feature where assetId=".quote($self->getId)." order by sequenceNumber");
|
||||
while (%data = $sth->hash) {
|
||||
$segment = deleteIcon('func=deleteFeatureConfirm&fid='.$data{Product_featureId},$self->get("url"),WebGUI::International::get(3,'Product'))
|
||||
$segment = deleteIcon('func=deleteFeatureConfirm&fid='.$data{Product_featureId},$self->get("url"),WebGUI::International::get(3,'Asset_Product'))
|
||||
.editIcon('func=editFeature&fid='.$data{Product_featureId},$self->get("url"))
|
||||
.moveUpIcon('func=moveFeatureUp&&fid='.$data{Product_featureId},$self->get("url"))
|
||||
.moveDownIcon('func=moveFeatureDown&&fid='.$data{Product_featureId},$self->get("url"));
|
||||
|
|
@ -715,10 +715,10 @@ sub view {
|
|||
|
||||
#---benefits
|
||||
$var{"addBenefit.url"} = $self->getUrl('func=editBenefit&fid=new');
|
||||
$var{"addBenefit.label"} = WebGUI::International::get(55,'Product');
|
||||
$var{"addBenefit.label"} = WebGUI::International::get(55,'Asset_Product');
|
||||
$sth = WebGUI::SQL->read("select benefit,Product_benefitId from Product_benefit where assetId=".quote($self->getId)." order by sequenceNumber");
|
||||
while (%data = $sth->hash) {
|
||||
$segment = deleteIcon('func=deleteBenefitConfirm&bid='.$data{Product_benefitId},$self->get("url"),WebGUI::International::get(48,'Product'))
|
||||
$segment = deleteIcon('func=deleteBenefitConfirm&bid='.$data{Product_benefitId},$self->get("url"),WebGUI::International::get(48,'Asset_Product'))
|
||||
.editIcon('func=editBenefit&bid='.$data{Product_benefitId},$self->get("url"))
|
||||
.moveUpIcon('func=moveBenefitUp&bid='.$data{Product_benefitId},$self->get("url"))
|
||||
.moveDownIcon('func=moveBenefitDown&bid='.$data{Product_benefitId},$self->get("url"));
|
||||
|
|
@ -732,10 +732,10 @@ sub view {
|
|||
|
||||
#---specifications
|
||||
$var{"addSpecification.url"} = $self->getUrl('func=editSpecification&sid=new');
|
||||
$var{"addSpecification.label"} = WebGUI::International::get(35,'Product');
|
||||
$var{"addSpecification.label"} = WebGUI::International::get(35,'Asset_Product');
|
||||
$sth = WebGUI::SQL->read("select name,value,units,Product_specificationId from Product_specification where assetId=".quote($self->getId)." order by sequenceNumber");
|
||||
while (%data = $sth->hash) {
|
||||
$segment = deleteIcon('func=deleteSpecificationConfirm&sid='.$data{Product_specificationId},$self->get("url"),WebGUI::International::get(5,'Product'))
|
||||
$segment = deleteIcon('func=deleteSpecificationConfirm&sid='.$data{Product_specificationId},$self->get("url"),WebGUI::International::get(5,'Asset_Product'))
|
||||
.editIcon('func=editSpecification&sid='.$data{Product_specificationId},$self->get("url"))
|
||||
.moveUpIcon('func=moveSpecificationUp&sid='.$data{Product_specificationId},$self->get("url"))
|
||||
.moveDownIcon('func=moveSpecificationDown&sid='.$data{Product_specificationId},$self->get("url"));
|
||||
|
|
@ -751,14 +751,14 @@ sub view {
|
|||
|
||||
#---accessories
|
||||
$var{"addaccessory.url"} = $self->getUrl('func=addAccessory');
|
||||
$var{"addaccessory.label"} = WebGUI::International::get(36,'Product');
|
||||
$var{"addaccessory.label"} = WebGUI::International::get(36,'Asset_Product');
|
||||
$sth = WebGUI::SQL->read("select asset.title, asset.url, Product_accessory.accessoryAssetId
|
||||
from Product_accessory,asset
|
||||
where Product_accessory.assetId=".quote($self->getId)."
|
||||
and Product_accessory.accessoryAssetId=asset.assetId
|
||||
order by Product_accessory.sequenceNumber");
|
||||
while (%data = $sth->hash) {
|
||||
$segment = deleteIcon('func=deleteAccessoryConfirm&aid='.$data{accessoryAssetId},$self->get("url"),WebGUI::International::get(2,'Product'))
|
||||
$segment = deleteIcon('func=deleteAccessoryConfirm&aid='.$data{accessoryAssetId},$self->get("url"),WebGUI::International::get(2,'Asset_Product'))
|
||||
.moveUpIcon('func=moveAccessoryUp&aid='.$data{accessoryAssetId},$self->get("url"))
|
||||
.moveDownIcon('func=moveAccessoryDown&aid='.$data{accessoryAssetId},$self->get("url"));
|
||||
push(@accessoryloop,{
|
||||
|
|
@ -772,14 +772,14 @@ sub view {
|
|||
|
||||
#---related
|
||||
$var{"addrelatedproduct.url"} = $self->getUrl('func=addRelated');
|
||||
$var{"addrelatedproduct.label"} = WebGUI::International::get(37,'Product');
|
||||
$var{"addrelatedproduct.label"} = WebGUI::International::get(37,'Asset_Product');
|
||||
$sth = WebGUI::SQL->read("select asset.title,asset.url,Product_related.relatedAssetId
|
||||
from Product_related,asset
|
||||
where Product_related.assetId=".quote($self->getId)."
|
||||
and Product_related.relatedAssetId=asset.assetId
|
||||
order by Product_related.sequenceNumber");
|
||||
while (%data = $sth->hash) {
|
||||
$segment = deleteIcon('func=deleteRelatedConfirm&rid='.$data{relatedAssetId},$self->get("url"),WebGUI::International::get(4,'Product'))
|
||||
$segment = deleteIcon('func=deleteRelatedConfirm&rid='.$data{relatedAssetId},$self->get("url"),WebGUI::International::get(4,'Asset_Product'))
|
||||
.moveUpIcon('func=moveRelatedUp&rid='.$data{relatedAssetId},$self->get("url"))
|
||||
.moveDownIcon('func=moveRelatedDown&rid='.$data{relatedAssetId},$self->get("url"));
|
||||
push(@relatedloop,{
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ sub getEditForm {
|
|||
);
|
||||
$tabform->getTab("properties")->yesNo(
|
||||
-name=>"debugMode",
|
||||
-label=>WebGUI::International::get(16,"SQLReport"),
|
||||
-label=>WebGUI::International::get(16,"Asset_SQLReport"),
|
||||
-value=>$self->getValue("debugMode")
|
||||
);
|
||||
|
||||
|
|
@ -176,17 +176,17 @@ sub getEditForm {
|
|||
);
|
||||
$tabform->getTab("properties")->yesNo(
|
||||
-name=>"preprocessMacros".$nr,
|
||||
-label=>WebGUI::International::get(15,"SQLReport"),
|
||||
-label=>WebGUI::International::get(15,"Asset_SQLReport"),
|
||||
-value=>$self->getValue("preprocessMacros".$nr)
|
||||
);
|
||||
$tabform->getTab("properties")->textarea(
|
||||
-name=>"placeholderParams".$nr,
|
||||
-label=>WebGUI::International::get('Placeholder Parameters',"SQLReport"),
|
||||
-label=>WebGUI::International::get('Placeholder Parameters',"Asset_SQLReport"),
|
||||
-value=>$self->getValue("placeholderParams".$nr)
|
||||
);
|
||||
$tabform->getTab("properties")->codearea(
|
||||
-name=>"dbQuery".$nr,
|
||||
-label=>WebGUI::International::get(4,"SQLReport"),
|
||||
-label=>WebGUI::International::get(4,"Asset_SQLReport"),
|
||||
-value=>$self->getValue("dbQuery".$nr)
|
||||
);
|
||||
$tabform->getTab("properties")->databaseLink(
|
||||
|
|
@ -197,7 +197,7 @@ sub getEditForm {
|
|||
# Add a "Add another query" button
|
||||
if ($nr < 5 and ($self->get("dbQuery".($nr+1)) eq "" || ($self->get("dbQuery".($nr)) eq "" and $self->get("dbQuery".($nr+1)) ne ""))) {
|
||||
$tabform->getTab("properties")->button(
|
||||
-value=>WebGUI::International::get('Add another query',"SQLReport"),
|
||||
-value=>WebGUI::International::get('Add another query',"Asset_SQLReport"),
|
||||
-extras=>'onClick="toggleQuery(\''.($nr+1).'\'); this.style.display=\'none\';"',
|
||||
-noWait=>1
|
||||
);
|
||||
|
|
@ -218,7 +218,7 @@ sub getEditForm {
|
|||
|
||||
$tabform->getTab("display")->integer(
|
||||
-name=>"paginateAfter",
|
||||
-label=>WebGUI::International::get(14,"SQLReport"),
|
||||
-label=>WebGUI::International::get(14,"Asset_SQLReport"),
|
||||
-value=>$self->getValue("paginateAfter")
|
||||
);
|
||||
return $tabform;
|
||||
|
|
@ -234,7 +234,7 @@ sub getIcon {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(1,"SQLReport");
|
||||
return WebGUI::International::get(1,"Asset_SQLReport");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -267,7 +267,7 @@ sub www_edit {
|
|||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("sql report add/edit", "SQLReport");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("8","SQLReport"));
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("8","Asset_SQLReport"));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -326,8 +326,8 @@ sub _processQuery {
|
|||
$query = $self->{_query}{$nr}{dbQuery};
|
||||
}
|
||||
|
||||
push(@{$self->{_debug_loop}},{'debug.output'=>WebGUI::International::get(17,"SQLReport").$query});
|
||||
push(@{$self->{_debug_loop}},{'debug.output'=>WebGUI::International::get('debug placeholder parameters',"SQLReport").join(",",@$placeholderParams)});
|
||||
push(@{$self->{_debug_loop}},{'debug.output'=>WebGUI::International::get(17,"Asset_SQLReport").$query});
|
||||
push(@{$self->{_debug_loop}},{'debug.output'=>WebGUI::International::get('debug placeholder parameters',"Asset_SQLReport").join(",",@$placeholderParams)});
|
||||
my $dbLink = WebGUI::DatabaseLink->new($self->{_query}{$nr}{databaseLinkId});
|
||||
my $dbh = $dbLink->dbh;
|
||||
if (defined $dbh) {
|
||||
|
|
@ -345,7 +345,7 @@ sub _processQuery {
|
|||
my $error = $p->setDataByQuery($query,$dbh,1,$placeholderParams);
|
||||
if ($error ne "") {
|
||||
WebGUI::ErrorHandler::warn("There was a problem with the query: ".$error);
|
||||
push(@{$self->{_debug_loop}},{'debug.output'=>WebGUI::International::get(11,"SQLReport")." ".$error});
|
||||
push(@{$self->{_debug_loop}},{'debug.output'=>WebGUI::International::get(11,"Asset_SQLReport")." ".$error});
|
||||
} else {
|
||||
my $first = 1;
|
||||
my @columns;
|
||||
|
|
@ -389,16 +389,16 @@ sub _processQuery {
|
|||
$var{$prefix.'columns.count'} = scalar(@columns);
|
||||
$var{$prefix.'rows.count'} = $p->getRowCount;
|
||||
$var{$prefix.'rows.count.isZero'} = ($p->getRowCount < 1);
|
||||
$var{$prefix.'rows.count.isZero.label'} = WebGUI::International::get(18,"SQLReport");
|
||||
$var{$prefix.'rows.count.isZero.label'} = WebGUI::International::get(18,"Asset_SQLReport");
|
||||
$p->appendTemplateVars(\%var) if ($nr == 1);
|
||||
}
|
||||
} else {
|
||||
push(@{$self->{_debug_loop}},{'debug.output'=>WebGUI::International::get(10,"SQLReport")});
|
||||
push(@{$self->{_debug_loop}},{'debug.output'=>WebGUI::International::get(10,"Asset_SQLReport")});
|
||||
WebGUI::ErrorHandler::warn("SQLReport [".$self->getId."] The SQL query is improperly formatted.");
|
||||
}
|
||||
$dbLink->disconnect;
|
||||
} else {
|
||||
push(@{$self->{_debug_loop}},{'debug.output'=>WebGUI::International::get(12,"SQLReport")});
|
||||
push(@{$self->{_debug_loop}},{'debug.output'=>WebGUI::International::get(12,"Asset_SQLReport")});
|
||||
WebGUI::ErrorHandler::warn("SQLReport [".$self->getId."] Could not connect to database.");
|
||||
}
|
||||
return \%var;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ sub addAnswer {
|
|||
Survey_id=>$_[0]->get("Survey_id"),
|
||||
Survey_questionId=>$_[2],
|
||||
Survey_answerId=>"new",
|
||||
answer=>WebGUI::International::get($_[1],'Survey')
|
||||
answer=>WebGUI::International::get($_[1],'Asset_Survey')
|
||||
},1,0,"Survey_id");
|
||||
}
|
||||
|
||||
|
|
@ -184,28 +184,28 @@ sub getEditForm {
|
|||
$tabform->getTab('properties')->hidden("Survey_id",($self->get("Survey_id") || WebGUI::Id::generate()));
|
||||
$tabform->getTab('display')->template(
|
||||
-name => 'templateId',
|
||||
-label => WebGUI::International::get('view template', 'Survey'),
|
||||
-label => WebGUI::International::get('view template', 'Asset_Survey'),
|
||||
-value => $self->getValue('templateId'),
|
||||
-namespace => 'Survey',
|
||||
-afterEdit => 'func=edit'
|
||||
);
|
||||
$tabform->getTab('display')->template(
|
||||
-name => 'responseTemplateId',
|
||||
-label => WebGUI::International::get('response template', 'Survey'),
|
||||
-label => WebGUI::International::get('response template', 'Asset_Survey'),
|
||||
-value => $self->getValue('responseTemplateId'),
|
||||
-namespace => 'Survey/Response',
|
||||
-afterEdit => 'func=edit'
|
||||
);
|
||||
$tabform->getTab('display')->template(
|
||||
-name => 'gradebookTemplateId',
|
||||
-label => WebGUI::International::get('gradebook template', 'Survey'),
|
||||
-label => WebGUI::International::get('gradebook template', 'Asset_Survey'),
|
||||
-value => $self->getValue('gradebookTemplateId'),
|
||||
-namespace => 'Survey/Gradebook',
|
||||
-afterEdit => 'func=edit'
|
||||
);
|
||||
$tabform->getTab('display')->template(
|
||||
-name => 'overviewTemplateId',
|
||||
-label => WebGUI::International::get('overview template', 'Survey'),
|
||||
-label => WebGUI::International::get('overview template', 'Asset_Survey'),
|
||||
-value => $self->getValue('overviewTemplateId'),
|
||||
-namespace => 'Survey/Overview',
|
||||
-afterEdit => 'func=edit'
|
||||
|
|
@ -214,57 +214,57 @@ sub getEditForm {
|
|||
$tabform->getTab('display')->selectList(
|
||||
-name => "questionOrder",
|
||||
-options => {
|
||||
sequential => WebGUI::International::get(5,'Survey'),
|
||||
random => WebGUI::International::get(6,'Survey'),
|
||||
response => WebGUI::International::get(7,'Survey')
|
||||
sequential => WebGUI::International::get(5,'Asset_Survey'),
|
||||
random => WebGUI::International::get(6,'Asset_Survey'),
|
||||
response => WebGUI::International::get(7,'Asset_Survey')
|
||||
},
|
||||
-label => WebGUI::International::get(8,'Survey'),
|
||||
-label => WebGUI::International::get(8,'Asset_Survey'),
|
||||
-value => [$self->getValue("questionOrder")]
|
||||
);
|
||||
$tabform->getTab('display')->integer(
|
||||
-name => "questionsPerPage",
|
||||
-value => $self->getValue("questionsPerPage"),
|
||||
-label => WebGUI::International::get(83,'Survey')
|
||||
-label => WebGUI::International::get(83,'Asset_Survey')
|
||||
);
|
||||
$tabform->getTab('properties')->selectList(
|
||||
-name => "mode",
|
||||
-options => {
|
||||
survey => WebGUI::International::get(9,'Survey'),
|
||||
quiz => WebGUI::International::get(10,'Survey')
|
||||
survey => WebGUI::International::get(9,'Asset_Survey'),
|
||||
quiz => WebGUI::International::get(10,'Asset_Survey')
|
||||
},
|
||||
-label => WebGUI::International::get(11,'Survey'),
|
||||
-label => WebGUI::International::get(11,'Asset_Survey'),
|
||||
-value => [$self->getValue("mode")]
|
||||
);
|
||||
$tabform->getTab('properties')->yesNo(
|
||||
-name => "anonymous",
|
||||
-value => $self->getValue("anonymous"),
|
||||
-label => WebGUI::International::get(81,'Survey')
|
||||
-label => WebGUI::International::get(81,'Asset_Survey')
|
||||
);
|
||||
$tabform->getTab('properties')->integer(
|
||||
-name => "maxResponsesPerUser",
|
||||
-value => $self->getValue("maxResponsesPerUser"),
|
||||
-label => WebGUI::International::get(84,'Survey')
|
||||
-label => WebGUI::International::get(84,'Asset_Survey')
|
||||
);
|
||||
$tabform->getTab('properties')->integer(
|
||||
-name => "questionsPerResponse",
|
||||
-value => $self->getValue("questionsPerResponse"),
|
||||
-label => WebGUI::International::get(85,'Survey')
|
||||
-label => WebGUI::International::get(85,'Asset_Survey')
|
||||
);
|
||||
$tabform->getTab('security')->group(
|
||||
-name => "groupToTakeSurvey",
|
||||
-value => [$self->getValue("groupToTakeSurvey")],
|
||||
-label => WebGUI::International::get(12,'Survey')
|
||||
-label => WebGUI::International::get(12,'Asset_Survey')
|
||||
);
|
||||
$tabform->getTab('security')->group(
|
||||
-name => "groupToViewReports",
|
||||
-label => WebGUI::International::get(13,'Survey'),
|
||||
-label => WebGUI::International::get(13,'Asset_Survey'),
|
||||
-value => [$self->getValue("groupToViewReports")]
|
||||
);
|
||||
if ($self->get("wobjectId") eq "new") {
|
||||
$tabform->getTab('properties')->whatNext(
|
||||
-options=>{
|
||||
addQuestion=>WebGUI::International::get(28,'Survey'),
|
||||
backToPage=>WebGUI::International::get(745,'Survey')
|
||||
addQuestion=>WebGUI::International::get(28,'Asset_Survey'),
|
||||
backToPage=>WebGUI::International::get(745,'Asset_Survey')
|
||||
},
|
||||
-value=>"addQuestion"
|
||||
);
|
||||
|
|
@ -329,21 +329,21 @@ sub getMenuVars {
|
|||
my %var;
|
||||
$var{'user.canViewReports'} = (WebGUI::Grouping::isInGroup($self->get("groupToViewReports")));
|
||||
$var{'delete.all.responses.url'} = $self->getUrl('func=deleteAllResponses');
|
||||
$var{'delete.all.responses.label'} = WebGUI::International::get(73,'Survey');
|
||||
$var{'delete.all.responses.label'} = WebGUI::International::get(73,'Asset_Survey');
|
||||
$var{'export.answers.url'} = $self->getUrl('func=exportAnswers');
|
||||
$var{'export.answers.label'} = WebGUI::International::get(62,'Survey');
|
||||
$var{'export.answers.label'} = WebGUI::International::get(62,'Asset_Survey');
|
||||
$var{'export.questions.url'} = $self->getUrl('func=exportQuestions');
|
||||
$var{'export.questions.label'} = WebGUI::International::get(63,'Survey');
|
||||
$var{'export.questions.label'} = WebGUI::International::get(63,'Asset_Survey');
|
||||
$var{'export.responses.url'} = $self->getUrl('func=exportResponses');
|
||||
$var{'export.responses.label'} = WebGUI::International::get(64,'Survey');
|
||||
$var{'export.responses.label'} = WebGUI::International::get(64,'Asset_Survey');
|
||||
$var{'export.composite.url'} = $self->getUrl('func=exportComposite');
|
||||
$var{'export.composite.label'} = WebGUI::International::get(65,'Survey');
|
||||
$var{'export.composite.label'} = WebGUI::International::get(65,'Asset_Survey');
|
||||
$var{'report.gradebook.url'} = $self->getUrl('func=viewGradebook');
|
||||
$var{'report.gradebook.label'} = WebGUI::International::get(61,'Survey');
|
||||
$var{'report.gradebook.label'} = WebGUI::International::get(61,'Asset_Survey');
|
||||
$var{'report.overview.url'} = $self->getUrl('func=viewStatisticalOverview');
|
||||
$var{'report.overview.label'} = WebGUI::International::get(59,'Survey');
|
||||
$var{'report.overview.label'} = WebGUI::International::get(59,'Asset_Survey');
|
||||
$var{'survey.url'} = $self->getUrl;
|
||||
$var{'survey.label'} = WebGUI::International::get(60,'Survey');
|
||||
$var{'survey.label'} = WebGUI::International::get(60,'Asset_Survey');
|
||||
return \%var;
|
||||
}
|
||||
|
||||
|
|
@ -398,7 +398,7 @@ sub getQuestionVars {
|
|||
$var{'question.comment.field'} = WebGUI::Form::textarea({
|
||||
name=>'comment_'.$questionId
|
||||
});
|
||||
$var{'question.comment.label'} = WebGUI::International::get(51,'Survey');
|
||||
$var{'question.comment.label'} = WebGUI::International::get(51,'Asset_Survey');
|
||||
if ($question->{answerFieldType} eq "text") {
|
||||
my ($answer) = WebGUI::SQL->quickArray("select Survey_answerId from Survey_answer where Survey_questionId=".quote($question->{Survey_questionId}));
|
||||
$var{'question.answer.field'} = WebGUI::Form::hidden({
|
||||
|
|
@ -509,7 +509,7 @@ sub getUserId {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(1,'Survey');
|
||||
return WebGUI::International::get(1,'Asset_Survey');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -553,13 +553,13 @@ sub view {
|
|||
$self->logView() if ($session{setting}{passiveProfilingEnabled});
|
||||
my $var = $self->getMenuVars;
|
||||
$var->{'question.add.url'} = $self->getUrl('func=editQuestion&qid=new');
|
||||
$var->{'question.add.label'} = WebGUI::International::get(30,'Survey');
|
||||
$var->{'question.add.label'} = WebGUI::International::get(30,'Asset_Survey');
|
||||
my @edit;
|
||||
my $sth = WebGUI::SQL->read("select Survey_questionId,question from Survey_question where Survey_id=".quote($self->get("Survey_id"))." order by sequenceNumber");
|
||||
while (my %data = $sth->hash) {
|
||||
push(@edit,{
|
||||
'question.edit.controls'=>
|
||||
deleteIcon('func=deleteQuestionConfirm&qid='.$data{Survey_questionId}, $self->get("url"), WebGUI::International::get(44,'Survey')).
|
||||
deleteIcon('func=deleteQuestionConfirm&qid='.$data{Survey_questionId}, $self->get("url"), WebGUI::International::get(44,'Asset_Survey')).
|
||||
editIcon('func=editQuestion&qid='.$data{Survey_questionId}, $self->get("url")).
|
||||
moveUpIcon('func=moveQuestionUp&qid='.$data{Survey_questionId}, $self->get("url")).
|
||||
moveDownIcon('func=moveQuestionDown&qid='.$data{Survey_questionId}, $self->get("url")),
|
||||
|
|
@ -596,19 +596,19 @@ sub view {
|
|||
});
|
||||
$var->{'form.footer'} = WebGUI::Form::formFooter();
|
||||
$var->{'form.submit'} = WebGUI::Form::submit({
|
||||
value=>WebGUI::International::get(50,'Survey')
|
||||
value=>WebGUI::International::get(50,'Asset_Survey')
|
||||
});
|
||||
$var->{'questions.sofar.label'} = WebGUI::International::get(86,'Survey');
|
||||
$var->{'start.newResponse.label'} = WebGUI::International::get(87,'Survey');
|
||||
$var->{'questions.sofar.label'} = WebGUI::International::get(86,'Asset_Survey');
|
||||
$var->{'start.newResponse.label'} = WebGUI::International::get(87,'Asset_Survey');
|
||||
$var->{'start.newResponse.url'} = $self->getUrl("func=view&startNew=1");
|
||||
$var->{'thanks.survey.label'} = WebGUI::International::get(46,'Survey');
|
||||
$var->{'thanks.quiz.label'} = WebGUI::International::get(47,'Survey');
|
||||
$var->{'thanks.survey.label'} = WebGUI::International::get(46,'Asset_Survey');
|
||||
$var->{'thanks.quiz.label'} = WebGUI::International::get(47,'Asset_Survey');
|
||||
$var->{'questions.total'} = $self->getQuestionCount;
|
||||
$var->{'questions.correct.count.label'} = WebGUI::International::get(52,'Survey');
|
||||
$var->{'questions.correct.percent.label'} = WebGUI::International::get(54,'Survey');
|
||||
$var->{'questions.correct.count.label'} = WebGUI::International::get(52,'Asset_Survey');
|
||||
$var->{'questions.correct.percent.label'} = WebGUI::International::get(54,'Asset_Survey');
|
||||
$var->{'mode.isSurvey'} = ($self->get("mode") eq "survey");
|
||||
$var->{'survey.noprivs.label'} = WebGUI::International::get(48,'Survey');
|
||||
$var->{'quiz.noprivs.label'} = WebGUI::International::get(49,'Survey');
|
||||
$var->{'survey.noprivs.label'} = WebGUI::International::get(48,'Asset_Survey');
|
||||
$var->{'quiz.noprivs.label'} = WebGUI::International::get(49,'Asset_Survey');
|
||||
return $self->processTemplate($var, $self->getValue("templateId"));
|
||||
}
|
||||
|
||||
|
|
@ -636,7 +636,7 @@ sub www_deleteQuestionConfirm {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_deleteResponse {
|
||||
return "" unless (WebGUI::Grouping::isInGroup($_[0]->get("groupToViewReports")));
|
||||
return $_[0]->confirm(WebGUI::International::get(72,'Survey'),
|
||||
return $_[0]->confirm(WebGUI::International::get(72,'Asset_Survey'),
|
||||
$_[0]->getUrl('func=deleteResponseConfirm&responseId='.$session{form}{responseId}));
|
||||
}
|
||||
|
||||
|
|
@ -651,7 +651,7 @@ sub www_deleteResponseConfirm {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_deleteAllResponses {
|
||||
return "" unless (WebGUI::Grouping::isInGroup($_[0]->get("groupToViewReports")));
|
||||
return $_[0]->confirm(WebGUI::International::get(74,'Survey'),
|
||||
return $_[0]->confirm(WebGUI::International::get(74,'Asset_Survey'),
|
||||
$_[0]->getUrl('func=deleteAllResponsesConfirm'));
|
||||
}
|
||||
|
||||
|
|
@ -668,7 +668,7 @@ sub www_edit {
|
|||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("survey add/edit","Survey");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get(2,'Survey'));
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get(2,'Asset_Survey'));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -698,13 +698,13 @@ sub www_editAnswer {
|
|||
$f->text(
|
||||
-name=>"answer",
|
||||
-value=>$answer->{answer},
|
||||
-label=>WebGUI::International::get(19,'Survey')
|
||||
-label=>WebGUI::International::get(19,'Asset_Survey')
|
||||
);
|
||||
if ($self->get("mode") eq "quiz") {
|
||||
$f->yesNo(
|
||||
-name=>"isCorrect",
|
||||
-value=>$answer->{isCorrect},
|
||||
-label=>WebGUI::International::get(20,'Survey')
|
||||
-label=>WebGUI::International::get(20,'Asset_Survey')
|
||||
);
|
||||
} else {
|
||||
$f->hidden("isCorrect",0);
|
||||
|
|
@ -712,22 +712,22 @@ sub www_editAnswer {
|
|||
if ($self->get("questionOrder") eq "response") {
|
||||
$question = WebGUI::SQL->buildHashRef("select Survey_questionId,question
|
||||
from Survey_question where Survey_id=".quote($self->get("Survey_id"))." order by sequenceNumber");
|
||||
$question = { ('-1' => WebGUI::International::get(82,'Survey'),%$question) };
|
||||
$question = { ('-1' => WebGUI::International::get(82,'Asset_Survey'),%$question) };
|
||||
$f->select(
|
||||
-name=>"gotoQuestion",
|
||||
-options=>$question,
|
||||
-value=>[$answer->{gotoQuestion}],
|
||||
-label=>WebGUI::International::get(21,'Survey')
|
||||
-label=>WebGUI::International::get(21,'Asset_Survey')
|
||||
);
|
||||
}
|
||||
if ($answer->{Survey_answerId} eq "new") {
|
||||
my %options;
|
||||
tie %options, 'Tie::IxHash';
|
||||
%options = (
|
||||
"addAnswer"=>WebGUI::International::get(24,'Survey'),
|
||||
"addQuestion"=>WebGUI::International::get(28,'Survey'),
|
||||
"editQuestion"=>WebGUI::International::get(75,'Survey'),
|
||||
"backToPage"=>WebGUI::International::get(745,'Survey')
|
||||
"addAnswer"=>WebGUI::International::get(24,'Asset_Survey'),
|
||||
"addQuestion"=>WebGUI::International::get(28,'Asset_Survey'),
|
||||
"editQuestion"=>WebGUI::International::get(75,'Asset_Survey'),
|
||||
"backToPage"=>WebGUI::International::get(745,'Asset_Survey')
|
||||
);
|
||||
$f->whatNext(
|
||||
-options=>\%options,
|
||||
|
|
@ -737,7 +737,7 @@ sub www_editAnswer {
|
|||
$f->submit;
|
||||
|
||||
# $self->getAdminConsole->setHelp("answer add/edit","Survey");
|
||||
return $self->getAdminConsole->render($f->print, WebGUI::International::get(18,'Survey'));
|
||||
return $self->getAdminConsole->render($f->print, WebGUI::International::get(18,'Asset_Survey'));
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -782,27 +782,27 @@ sub www_editQuestion {
|
|||
$f->HTMLArea(
|
||||
-name => "question",
|
||||
-value => $question->{question},
|
||||
-label => WebGUI::International::get(14,'Survey')
|
||||
-label => WebGUI::International::get(14,'Asset_Survey')
|
||||
);
|
||||
$f->yesNo(
|
||||
-name => "allowComment",
|
||||
-value => $question->{allowComment},
|
||||
-label => WebGUI::International::get(15,'Survey')
|
||||
-label => WebGUI::International::get(15,'Asset_Survey')
|
||||
);
|
||||
$f->yesNo(
|
||||
-name => "randomizeAnswers",
|
||||
-value => $question->{randomizeAnswers},
|
||||
-label => WebGUI::International::get(16,'Survey')
|
||||
-label => WebGUI::International::get(16,'Asset_Survey')
|
||||
);
|
||||
if ($self->get("questionOrder") eq "response") {
|
||||
my $ql = WebGUI::SQL->buildHashRef("select Survey_questionId,question
|
||||
from Survey_question where Survey_id=".quote($self->get("Survey_id"))." order by sequenceNumber");
|
||||
$ql = { ('-1' => WebGUI::International::get(82,'Survey'),%$ql) };
|
||||
$ql = { ('-1' => WebGUI::International::get(82,'Asset_Survey'),%$ql) };
|
||||
$f->select(
|
||||
-name => "gotoQuestion",
|
||||
-options=> $ql,
|
||||
-value => [$question->{gotoQuestion}],
|
||||
-label => WebGUI::International::get(21,'Survey')
|
||||
-label => WebGUI::International::get(21,'Asset_Survey')
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -810,13 +810,13 @@ sub www_editQuestion {
|
|||
my %options;
|
||||
tie %options, 'Tie::IxHash';
|
||||
%options = (
|
||||
"addMultipleChoiceAnswer" => WebGUI::International::get(24,'Survey'),
|
||||
"addTextAnswer" => WebGUI::International::get(29,'Survey'),
|
||||
"addBooleanAnswer" => WebGUI::International::get(25,'Survey'),
|
||||
"addFrequencyAnswer" => WebGUI::International::get(26,'Survey'),
|
||||
"addOpinionAnswer" => WebGUI::International::get(27,'Survey'),
|
||||
#"addQuestion" => WebGUI::International::get(28,'Survey'),
|
||||
"backToPage" => WebGUI::International::get(745,'Survey')
|
||||
"addMultipleChoiceAnswer" => WebGUI::International::get(24,'Asset_Survey'),
|
||||
"addTextAnswer" => WebGUI::International::get(29,'Asset_Survey'),
|
||||
"addBooleanAnswer" => WebGUI::International::get(25,'Asset_Survey'),
|
||||
"addFrequencyAnswer" => WebGUI::International::get(26,'Asset_Survey'),
|
||||
"addOpinionAnswer" => WebGUI::International::get(27,'Asset_Survey'),
|
||||
#"addQuestion" => WebGUI::International::get(28,'Asset_Survey'),
|
||||
"backToPage" => WebGUI::International::get(745,'Asset_Survey')
|
||||
);
|
||||
$f->whatNext(
|
||||
-options=> \%options,
|
||||
|
|
@ -827,13 +827,13 @@ sub www_editQuestion {
|
|||
my $output = $f->print;
|
||||
if ($question->{Survey_questionId} ne "new" && $question->{answerFieldType} ne "text") {
|
||||
$output .= '<a href="'.$self->getUrl('func=editAnswer&aid=new&qid='
|
||||
.$question->{Survey_questionId}).'">'.WebGUI::International::get(23,'Survey').'</a><p>';
|
||||
.$question->{Survey_questionId}).'">'.WebGUI::International::get(23,'Asset_Survey').'</a><p>';
|
||||
$sth = WebGUI::SQL->read("select Survey_answerId,answer from Survey_answer
|
||||
where Survey_questionId=".quote($question->{Survey_questionId})." order by sequenceNumber");
|
||||
while (%data = $sth->hash) {
|
||||
$output .=
|
||||
deleteIcon('func=deleteAnswerConfirm&qid='.$question->{Survey_questionId}.'&aid='.$data{Survey_answerId},
|
||||
$self->getUrl,WebGUI::International::get(45,'Survey')).
|
||||
$self->getUrl,WebGUI::International::get(45,'Asset_Survey')).
|
||||
editIcon('func=editAnswer&qid='.$question->{Survey_questionId}.'&aid='.$data{Survey_answerId}, $self->getUrl).
|
||||
moveUpIcon('func=moveAnswerUp'.'&qid='.$question->{Survey_questionId}.'&aid='.$data{Survey_answerId}, $self->getUrl).
|
||||
moveDownIcon('func=moveAnswerDown&qid='.$question->{Survey_questionId}.'&aid='.$data{Survey_answerId}, $self->getUrl).
|
||||
|
|
@ -843,7 +843,7 @@ sub www_editQuestion {
|
|||
}
|
||||
|
||||
$self->getAdminConsole->setHelp("question add/edit","Survey");
|
||||
return $self->getAdminConsole->render($f->print, WebGUI::International::get(17,'Survey'));
|
||||
return $self->getAdminConsole->render($f->print, WebGUI::International::get(17,'Asset_Survey'));
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -987,7 +987,7 @@ sub www_viewGradebook {
|
|||
return "" unless (WebGUI::Grouping::isInGroup($self->get("groupToViewReports")));
|
||||
$self->logView() if ($session{setting}{passiveProfilingEnabled});
|
||||
my $var = $self->getMenuVars;
|
||||
$var->{title} = WebGUI::International::get(71,'Survey');
|
||||
$var->{title} = WebGUI::International::get(71,'Asset_Survey');
|
||||
my $p = WebGUI::Paginator->new($self->getUrl('func=viewGradebook'));
|
||||
$p->setDataByQuery("select userId,username,ipAddress,Survey_responseId,startDate,endDate from Survey_response
|
||||
where isComplete=1 and Survey_id=".quote($self->get("Survey_id"))." order by username,ipAddress,startDate");
|
||||
|
|
@ -996,9 +996,9 @@ sub www_viewGradebook {
|
|||
if ($var->{'question.count'} > $self->get("questionsPerResponse")) {
|
||||
$var->{'question.count'} = $self->get("questionsPerResponse");
|
||||
}
|
||||
$var->{'response.user.label'} = WebGUI::International::get(67,'Survey');
|
||||
$var->{'response.count.label'} = WebGUI::International::get(52,'Survey');
|
||||
$var->{'response.percent.label'} = WebGUI::International::get(54,'Survey');
|
||||
$var->{'response.user.label'} = WebGUI::International::get(67,'Asset_Survey');
|
||||
$var->{'response.count.label'} = WebGUI::International::get(52,'Asset_Survey');
|
||||
$var->{'response.percent.label'} = WebGUI::International::get(54,'Asset_Survey');
|
||||
my @responseloop;
|
||||
foreach my $user (@$users) {
|
||||
my ($correctCount) = WebGUI::SQL->quickArray("select count(*) from Survey_questionResponse a left join
|
||||
|
|
@ -1024,26 +1024,26 @@ sub www_viewIndividualSurvey {
|
|||
return "" unless (WebGUI::Grouping::isInGroup($self->get("groupToViewReports")));
|
||||
$self->logView() if ($session{setting}{passiveProfilingEnabled});
|
||||
my $var = $self->getMenuVars;
|
||||
$var->{'title'} = WebGUI::International::get(70,'Survey');
|
||||
$var->{'title'} = WebGUI::International::get(70,'Asset_Survey');
|
||||
$var->{'delete.url'} = $self->getUrl('func=deleteResponse&responseId='.$session{form}{responseId});
|
||||
$var->{'delete.label'} = WebGUI::International::get(69,'Survey');
|
||||
$var->{'delete.label'} = WebGUI::International::get(69,'Asset_Survey');
|
||||
my $response = WebGUI::SQL->getRow("Survey_response","Survey_responseId",$session{form}{responseId});
|
||||
$var->{'start.date.label'} = WebGUI::International::get(76,'Survey');
|
||||
$var->{'start.date.label'} = WebGUI::International::get(76,'Asset_Survey');
|
||||
$var->{'start.date.epoch'} = $response->{startDate};
|
||||
$var->{'start.date.human'} = epochToHuman($response->{startDate},"%z");
|
||||
$var->{'start.time.human'} = epochToHuman($response->{startDate},"%Z");
|
||||
$var->{'end.date.label'} = WebGUI::International::get(77,'Survey');
|
||||
$var->{'end.date.label'} = WebGUI::International::get(77,'Asset_Survey');
|
||||
$var->{'end.date.epoch'} = $response->{endDate};
|
||||
$var->{'end.date.human'} = epochToHuman($response->{endDate},"%z");
|
||||
$var->{'end.time.human'} = epochToHuman($response->{endDate},"%Z");
|
||||
$var->{'duration.label'} = WebGUI::International::get(78,'Survey');
|
||||
$var->{'duration.label'} = WebGUI::International::get(78,'Asset_Survey');
|
||||
$var->{'duration.minutes'} = int(($response->{end} - $response->{start})/60);
|
||||
$var->{'duration.minutes.label'} = WebGUI::International::get(79,'Survey');
|
||||
$var->{'duration.minutes.label'} = WebGUI::International::get(79,'Asset_Survey');
|
||||
$var->{'duration.seconds'} = (($response->{endDate} - $response->{start})%60);
|
||||
$var->{'duration.seconds.label'} = WebGUI::International::get(80,'Survey');
|
||||
$var->{'answer.label'} = WebGUI::International::get(19,'Survey');
|
||||
$var->{'response.label'} = WebGUI::International::get(66,'Survey');
|
||||
$var->{'comment.label'} = WebGUI::International::get(57,'Survey');
|
||||
$var->{'duration.seconds.label'} = WebGUI::International::get(80,'Asset_Survey');
|
||||
$var->{'answer.label'} = WebGUI::International::get(19,'Asset_Survey');
|
||||
$var->{'response.label'} = WebGUI::International::get(66,'Asset_Survey');
|
||||
$var->{'comment.label'} = WebGUI::International::get(57,'Asset_Survey');
|
||||
my $a = WebGUI::SQL->read("select Survey_questionId,question,answerFieldType from Survey_question
|
||||
where Survey_id=".quote($self->get("Survey_id"))." order by sequenceNumber");
|
||||
my @questionloop;
|
||||
|
|
@ -1083,17 +1083,17 @@ sub www_viewStatisticalOverview {
|
|||
return "" unless (WebGUI::Grouping::isInGroup($self->get("groupToViewReports")));
|
||||
$self->logView() if ($session{setting}{passiveProfilingEnabled});
|
||||
my $var = $self->getMenuVars;
|
||||
$var->{title} = WebGUI::International::get(58,'Survey');
|
||||
$var->{title} = WebGUI::International::get(58,'Asset_Survey');
|
||||
my $p = WebGUI::Paginator->new($self->getUrl('func=viewStatisticalOverview'));
|
||||
$p->setDataByQuery("select Survey_questionId,question,answerFieldType,allowComment from Survey_question
|
||||
where Survey_id=".quote($self->get("Survey_id"))." order by sequenceNumber");
|
||||
my $questions = $p->getPageData;
|
||||
my @questionloop;
|
||||
$var->{'answer.label'} = WebGUI::International::get(19,'Survey');
|
||||
$var->{'response.count.label'} = WebGUI::International::get(53,'Survey');
|
||||
$var->{'response.percent.label'} = WebGUI::International::get(54,'Survey');
|
||||
$var->{'show.responses.label'} = WebGUI::International::get(55,'Survey');
|
||||
$var->{'show.comments.label'} = WebGUI::International::get(56,'Survey');
|
||||
$var->{'answer.label'} = WebGUI::International::get(19,'Asset_Survey');
|
||||
$var->{'response.count.label'} = WebGUI::International::get(53,'Asset_Survey');
|
||||
$var->{'response.percent.label'} = WebGUI::International::get(54,'Asset_Survey');
|
||||
$var->{'show.responses.label'} = WebGUI::International::get(55,'Asset_Survey');
|
||||
$var->{'show.comments.label'} = WebGUI::International::get(56,'Asset_Survey');
|
||||
foreach my $question (@$questions) {
|
||||
my @answerloop;
|
||||
my ($totalResponses) = WebGUI::SQL->quickArray("select count(*) from Survey_questionResponse where Survey_questionId=".quote($question->{Survey_questionId}));
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ sub getIcon {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(2,"SyndicatedContent");
|
||||
return WebGUI::International::get(2,"Asset_SyndicatedContent");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -87,12 +87,12 @@ sub getEditForm {
|
|||
);
|
||||
$tabform->getTab("properties")->url(
|
||||
-name=>"rssUrl",
|
||||
-label=>WebGUI::International::get(1,"SyndicatedContent"),
|
||||
-label=>WebGUI::International::get(1,"Asset_SyndicatedContent"),
|
||||
-value=>$self->getValue("rssUrl")
|
||||
);
|
||||
$tabform->getTab("display")->integer(
|
||||
-name=>"maxHeadlines",
|
||||
-label=>WebGUI::International::get(3,"SyndicatedContent"),
|
||||
-label=>WebGUI::International::get(3,"Asset_SyndicatedContent"),
|
||||
-value=>$self->getValue("maxHeadlines")
|
||||
);
|
||||
return $tabform;
|
||||
|
|
@ -391,7 +391,7 @@ sub www_edit {
|
|||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("syndicated content add/edit","SyndicatedContent");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("4","SyndicatedContent"));
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("4","Asset_SyndicatedContent"));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ sub getIcon {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(1, "WSClient");
|
||||
return WebGUI::International::get(1, "Asset_WSClient");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -160,88 +160,88 @@ sub getEditForm {
|
|||
);
|
||||
$tabform->getTab("display")->yesNo (
|
||||
-name => 'preprocessMacros',
|
||||
-label => WebGUI::International::get(8, "WSClient"),
|
||||
-label => WebGUI::International::get(8, "Asset_WSClient"),
|
||||
-value => $self->get('preprocessMacros'),
|
||||
);
|
||||
$tabform->getTab("display")->integer(
|
||||
-name => 'paginateAfter',
|
||||
-label => WebGUI::International::get(13, "WSClient"),
|
||||
-label => WebGUI::International::get(13, "Asset_WSClient"),
|
||||
-value => $self->getValue("paginateAfter")
|
||||
);
|
||||
$tabform->getTab("display")->text (
|
||||
-name => 'paginateVar',
|
||||
-label => WebGUI::International::get(14, "WSClient"),
|
||||
-label => WebGUI::International::get(14, "Asset_WSClient"),
|
||||
-value => $self->get('paginateVar'),
|
||||
);
|
||||
$tabform->getTab("properties")->text (
|
||||
-name => 'uri',
|
||||
-label => WebGUI::International::get(2, "WSClient"),
|
||||
-label => WebGUI::International::get(2, "Asset_WSClient"),
|
||||
-value => $self->get('uri'),
|
||||
);
|
||||
$tabform->getTab("properties")->text (
|
||||
-name => 'proxy',
|
||||
-label => WebGUI::International::get(3, "WSClient"),
|
||||
-label => WebGUI::International::get(3, "Asset_WSClient"),
|
||||
-value => $self->get('proxy'),
|
||||
);
|
||||
$tabform->getTab("properties")->text (
|
||||
-name => 'callMethod',
|
||||
-label => WebGUI::International::get(4, "WSClient"),
|
||||
-label => WebGUI::International::get(4, "Asset_WSClient"),
|
||||
-value => $self->get('callMethod'),
|
||||
);
|
||||
$tabform->getTab("properties")->textarea (
|
||||
-name => 'params',
|
||||
-label => WebGUI::International::get(5, "WSClient"),
|
||||
-label => WebGUI::International::get(5, "Asset_WSClient"),
|
||||
-value => $self->get('params'),
|
||||
);
|
||||
if ($session{'config'}{'soapHttpHeaderOverride'}) {
|
||||
$tabform->getTab("properties")->text (
|
||||
-name => 'httpHeader',
|
||||
-label => WebGUI::International::get(16, "WSClient"),
|
||||
-label => WebGUI::International::get(16, "Asset_WSClient"),
|
||||
-value => $self->get('httpHeader'),
|
||||
);
|
||||
} else {
|
||||
$tabform->getTab("properties")->hidden (
|
||||
-name => 'httpHeader',
|
||||
-label => WebGUI::International::get(16, "WSClient"),
|
||||
-label => WebGUI::International::get(16, "Asset_WSClient"),
|
||||
-value => $self->get('httpHeader'),
|
||||
);
|
||||
}
|
||||
$tabform->getTab("properties")->yesNo (
|
||||
-name => 'execute_by_default',
|
||||
-label => WebGUI::International::get(11, "WSClient"),
|
||||
-label => WebGUI::International::get(11, "Asset_WSClient"),
|
||||
-value => $self->get('execute_by_default'),
|
||||
);
|
||||
$tabform->getTab("properties")->yesNo (
|
||||
-name => 'debugMode',
|
||||
-label => WebGUI::International::get(9, "WSClient"),
|
||||
-label => WebGUI::International::get(9, "Asset_WSClient"),
|
||||
-value => $self->get('debugMode'),
|
||||
);
|
||||
if ($utf8FieldType eq 'yesNo') {
|
||||
$tabform->getTab("properties")->yesNo (
|
||||
-name => 'decodeUtf8',
|
||||
-label => WebGUI::International::get(15, "WSClient"),
|
||||
-label => WebGUI::International::get(15, "Asset_WSClient"),
|
||||
-value => $self->get('decodeUtf8'),
|
||||
);
|
||||
} else {
|
||||
$tabform->getTab("properties")->hidden (
|
||||
-name => 'decodeUtf8',
|
||||
-label => WebGUI::International::get(15, "WSClient"),
|
||||
-label => WebGUI::International::get(15, "Asset_WSClient"),
|
||||
-value => $self->get('decodeUtf8'),
|
||||
);
|
||||
}
|
||||
my $cacheopts = {
|
||||
0 => WebGUI::International::get(29, "WSClient"),
|
||||
1 => WebGUI::International::get(19, "WSClient"),
|
||||
0 => WebGUI::International::get(29, "Asset_WSClient"),
|
||||
1 => WebGUI::International::get(19, "Asset_WSClient"),
|
||||
};
|
||||
$tabform->getTab("properties")->radioList (
|
||||
-name => 'sharedCache',
|
||||
-options => $cacheopts,
|
||||
-label => WebGUI::International::get(28, "WSClient"),
|
||||
-label => WebGUI::International::get(28, "Asset_WSClient"),
|
||||
-value => $self->get('sharedCache'),
|
||||
);
|
||||
$tabform->getTab("properties")->text (
|
||||
-name => 'cacheTTL',
|
||||
-label => WebGUI::International::get(27, "WSClient"),
|
||||
-label => WebGUI::International::get(27, "Asset_WSClient"),
|
||||
-value => $self->get('cacheTTL'),
|
||||
);
|
||||
return $tabform;
|
||||
|
|
@ -253,7 +253,7 @@ sub www_edit {
|
|||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("web services client add/edit","WSClient");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("20","WSClient"));
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("20","Asset_WSClient"));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -339,7 +339,7 @@ sub view {
|
|||
$cache_key = _create_cache_key($self, $call, $param_str);
|
||||
}
|
||||
$cache = WebGUI::Cache->new($cache_key,
|
||||
WebGUI::International::get(4, "WSClient"));
|
||||
WebGUI::International::get(4, "Asset_WSClient"));
|
||||
|
||||
# passing a form param WSClient_skipCache lets us ignore even good caches
|
||||
if (!$session{'form'}{'WSClient_skipCache'}) {
|
||||
|
|
@ -354,7 +354,7 @@ sub view {
|
|||
# the solution is to normalize all params to another table
|
||||
eval "\$arr_ref = [$param_str];";
|
||||
eval { @params = @$arr_ref; };
|
||||
WebGUI::ErrorHandler::debug(WebGUI::International::get(22, "WSClient")) if $@ && $self->get('debugMode');
|
||||
WebGUI::ErrorHandler::debug(WebGUI::International::get(22, "Asset_WSClient")) if $@ && $self->get('debugMode');
|
||||
|
||||
if ($self->get('execute_by_default') || grep /^$call$/,
|
||||
@targetWobjects) {
|
||||
|
|
@ -368,7 +368,7 @@ sub view {
|
|||
$soap = $self->_instantiate_soap;
|
||||
|
||||
} else {
|
||||
WebGUI::ErrorHandler::debug(WebGUI::International::get(23, "WSClient")) if $self->get('debugMode');
|
||||
WebGUI::ErrorHandler::debug(WebGUI::International::get(23, "Asset_WSClient")) if $self->get('debugMode');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -390,7 +390,7 @@ sub view {
|
|||
# a hash reference, a blessed object or a simple scalar. Each type
|
||||
# requires different handling (woohoo!) before being passed to the
|
||||
# template system
|
||||
WebGUI::ErrorHandler::debug(WebGUI::International::get(24, "WSClient") . (ref $return ? ref $return : 'scalar')) if $self->get('debugMode');
|
||||
WebGUI::ErrorHandler::debug(WebGUI::International::get(24, "Asset_WSClient") . (ref $return ? ref $return : 'scalar')) if $self->get('debugMode');
|
||||
|
||||
# SOAP object
|
||||
if ((ref $return) =~ /SOAP/i) {
|
||||
|
|
@ -425,7 +425,7 @@ sub view {
|
|||
if ($@) {
|
||||
WebGUI::ErrorHandler::debug($@) if $self->get('debugMode');
|
||||
$var{'soapError'} = $@;
|
||||
WebGUI::ErrorHandler::debug(WebGUI::International::get(25, "WSClient") . $var{'soapError'})
|
||||
WebGUI::ErrorHandler::debug(WebGUI::International::get(25, "Asset_WSClient") . $var{'soapError'})
|
||||
if $self->get('debugMode');
|
||||
}
|
||||
|
||||
|
|
@ -508,7 +508,7 @@ sub view {
|
|||
|
||||
|
||||
} else {
|
||||
WebGUI::ErrorHandler::debug(WebGUI::International::get(26, "WSClient") . $@) if $self->get('debugMode');
|
||||
WebGUI::ErrorHandler::debug(WebGUI::International::get(26, "Asset_WSClient") . $@) if $self->get('debugMode');
|
||||
}
|
||||
|
||||
# did they request a funky http header?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue