fixed a bunch of bugs
This commit is contained in:
parent
914f29b169
commit
d894e39e11
7 changed files with 33 additions and 12 deletions
|
|
@ -1050,7 +1050,7 @@ sub getEditForm {
|
|||
-name=>"isPrototype",
|
||||
-label=>WebGUI::International::get("make prototype","Asset"),
|
||||
-value=>$self->getValue("isPrototype"),
|
||||
-uiLevel=>7
|
||||
-uiLevel=>9
|
||||
);
|
||||
return $tabform;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -643,7 +643,10 @@ sub processPropertiesFromFormPost {
|
|||
$data{endDate} = $self->getThread->getParent->get("endDate") unless ($session{form}{endDate});
|
||||
($data{synopsis}, $data{content}) = $self->getSynopsisAndContentFromFormPost;
|
||||
if ($self->getThread->getParent->get("addEditStampToPosts")) {
|
||||
$data{content} .= "<p>\n\n --- (Edited on ".WebGUI::DateTime::epochToHuman()." by ".$session{user}{alias}.") --- \n</p>";
|
||||
$data{content} .= "\n\n --- (Edited on ".WebGUI::DateTime::epochToHuman()." by ".$session{user}{alias}.") --- \n";
|
||||
if ($self->getValue("contentType") eq "mixed" || $self->getValue("contentType") eq "html") {
|
||||
$data{content} = '<p>'.$data{content}.'</p>';
|
||||
}
|
||||
}
|
||||
$self->update(\%data);
|
||||
$self->getThread->subscribe if ($session{form}{subscribe});
|
||||
|
|
@ -881,10 +884,6 @@ sub www_edit {
|
|||
$var{'preview.content'} = $self->formatContent($var{'preview.content'},$session{form}{contentType});
|
||||
}
|
||||
$var{'form.preview'} = WebGUI::Form::submit({value=>"Preview"});
|
||||
$var{'form.submit'} = WebGUI::Form::button({
|
||||
value=>"Save",
|
||||
extras=>"onclick=\"this.value='Please wait...'; this.form.func.value='editSave'; this.form.submit();\""
|
||||
});
|
||||
$var{'form.footer'} = WebGUI::Form::formFooter();
|
||||
$var{usePreview} = $self->getThread->getParent->get("usePreview");
|
||||
$var{'user.isVisitor'} = ($session{user}{userId} eq '1');
|
||||
|
|
@ -919,16 +918,29 @@ sub www_edit {
|
|||
value=>$title
|
||||
});
|
||||
if ($self->getThread->getParent->get("allowRichEdit")) {
|
||||
$var{'content.form'} = WebGUI::Form::HTMLArea({
|
||||
$var{'content.form'} = WebGUI::Form::textarea({
|
||||
name=>"content",
|
||||
value=>$content
|
||||
});
|
||||
WebGUI::Style::setScript($session{config}{extrasURL}.'/tinymce/jscripts/tiny_mce/tiny_mce.js',{type=>"text/javascript"});
|
||||
$var{'content.form'} = ' <script language="javascript" type="text/javascript">
|
||||
tinyMCE.init({
|
||||
theme : "simple",
|
||||
mode : "textareas"
|
||||
});
|
||||
</script> <textarea name="content" style="min-width: 400px; width: 100%; height: 300px;">'.$content.'</textarea>';
|
||||
} else {
|
||||
$var{'content.form'} = WebGUI::Form::textarea({
|
||||
name=>"content",
|
||||
value=>$content
|
||||
});
|
||||
}
|
||||
$var{'form.submit'} = WebGUI::Form::submit({
|
||||
extras=>"onclick=\"this.value='".WebGUI::International::get(452)."';tinyMCE.triggerSave(); this.form.func.value='editSave'; this.form.submit();\""
|
||||
});
|
||||
$var{'form.preview'} = WebGUI::Form::submit({
|
||||
value=>WebGUI::International::get("preview","Collaboration")
|
||||
});
|
||||
$var{'attachment.form'} = $self->getUploadControl;
|
||||
$var{'contentType.form'} = WebGUI::Form::contentType({
|
||||
name=>'contentType',
|
||||
|
|
|
|||
|
|
@ -848,7 +848,7 @@ sub www_search {
|
|||
WebGUI::Session::setScratch($self->getId."_without",$session{form}{without});
|
||||
WebGUI::Session::setScratch($self->getId."_numResults",$session{form}{numResults});
|
||||
my %var;
|
||||
$var{'form.begin'} = WebGUI::Form::formHeader({action=>$self->getUrl})
|
||||
$var{'form.header'} = WebGUI::Form::formHeader({action=>$self->getUrl})
|
||||
.WebGUI::Form::hidden({ name=>"func", value=>"search" })
|
||||
.WebGUI::Form::hidden({ name=>"doit", value=>1 });
|
||||
$var{'all.form'} = WebGUI::Form::text({
|
||||
|
|
@ -881,7 +881,7 @@ sub www_search {
|
|||
value=>[$numResults]
|
||||
});
|
||||
$var{'form.search'} = WebGUI::Form::submit({value=>WebGUI::International::get(170)});
|
||||
$var{'form.end'} = WebGUI::Form::formFooter();
|
||||
$var{'form.footer'} = WebGUI::Form::formFooter();
|
||||
$var{'back.url'} = $self->getUrl;
|
||||
$self->appendTemplateLabels(\%var);
|
||||
$var{doit} = $session{form}{doit};
|
||||
|
|
|
|||
|
|
@ -380,8 +380,7 @@ sub displayLogin {
|
|||
my $self = shift;
|
||||
my $method = $_[0] || "login";
|
||||
my $vars = $_[1];
|
||||
unless ($session{env}{REQUEST_URI} =~ "displayLogin" || $session{env}{REQUEST_URI} =~ "displayAccount" ||
|
||||
$session{env}{REQUEST_URI} =~ "logout" || $session{env}{REQUEST_URI} =~ "deactivateAccount"){
|
||||
unless ($session{form}{op} eq "auth") {
|
||||
WebGUI::Session::setScratch("redirectAfterLogin",$session{env}{REQUEST_URI});
|
||||
}
|
||||
$vars->{title} = WebGUI::International::get(66);
|
||||
|
|
|
|||
|
|
@ -1561,7 +1561,8 @@ sub submit {
|
|||
my $value = $params->{value} || $params->{defaultValue} || WebGUI::International::get(62);
|
||||
$value = _fixQuotes($value);
|
||||
my $wait = WebGUI::International::get(452);
|
||||
return '<input type="submit" value="'.$value.'" onClick="this.value=\''.$wait.'\'" '.$params->{extras}.' />';
|
||||
my $extras = $params->{extras} || 'onclick="this.value=\''.$wait.'\'"';
|
||||
return '<input type="submit" value="'.$value.'" '.$params->{extras}.' />';
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
package WebGUI::i18n::English::Collaboration;
|
||||
|
||||
our $I18N = {
|
||||
'preview' => {
|
||||
message => q|Preview|,
|
||||
lastUpdated => 1109618544,
|
||||
},
|
||||
|
||||
'add' => {
|
||||
message => q|Add|,
|
||||
lastUpdated => 1109618544,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue