Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix admin editbuttons so update only shows if the story has been save…

…d; add in wrapping for journal editing
  • Loading branch information...
commit bb2cffa677048d6d36fa3d32985c9ea0289da4e9 1 parent 3babb91
@pudge pudge authored
View
14 plugins/Admin/admin.pl
@@ -952,7 +952,7 @@ sub editStory {
my($authoredit_flag, $extracolumn_flag) = (0, 0);
my($storyref, $story, $author, $topic, $storycontent, $storybox, $locktest,
- $editbuttons, $sections, $topic_select, $section_select, $author_select,
+ $sections, $topic_select, $section_select, $author_select,
$extracolumns, $displaystatus_select, $commentstatus_select, $description);
my $extracolref = {};
my($fixquotes_check,$autonode_check,$fastforward_check) = ('off','off','off');
@@ -1030,8 +1030,6 @@ sub editStory {
$sections = $slashdb->getDescriptions('sections');
- $editbuttons = editbuttons($newarticle);
-
$topic_select = selectTopic('tid', $storyref->{tid}, 1);
$section_select = selectSection('section', $storyref->{section}, $sections, 1) unless $user->{section};
@@ -1082,7 +1080,7 @@ sub editStory {
storycontent => $storycontent,
storybox => $storybox,
sid => $sid,
- editbuttons => $editbuttons,
+ newarticle => $newarticle,
topic_select => $topic_select,
section_select => $section_select,
author_select => $author_select,
@@ -1252,14 +1250,6 @@ sub updateFilter {
}
##################################################################
-sub editbuttons {
- my($newarticle) = @_;
- my $editbuttons = slashDisplay('editbuttons',
- { newarticle => $newarticle }, 1);
- return $editbuttons
-}
-
-##################################################################
sub updateStory {
my $slashdb = getCurrentDB();
View
6 plugins/Admin/templates/editStory;admin;default
@@ -52,7 +52,7 @@ __template__
<TD BGCOLOR="[% user.bg.3 %]">&nbsp; </TD>
<TD BGCOLOR="[% user.bg.3 %]">
<FONT COLOR="[% user.fg.3 %]">
- [% editbuttons %]
+ [% INCLUDE editbuttons %]
[% topic_select %]
[% UNLESS user.section %]
@@ -144,13 +144,13 @@ __template__
</TABLE>
[% END %]
-[% editbuttons %]
+[% INCLUDE editbuttons %]
Extended Copy<BR>
<TEXTAREA NAME="bodytext" COLS="70" WRAP="VIRTUAL" ROWS="10">[% FILTER strip_literal; storyref.bodytext; END %]</TEXTAREA>
<BR>
-[% editbuttons %]
+[% INCLUDE editbuttons %]
</FORM>
View
2  plugins/Admin/templates/editbuttons;admin;default
@@ -16,9 +16,9 @@ __template__
[% END %]
<INPUT TYPE="SUBMIT" NAME="op" VALUE="preview">
-<INPUT TYPE="SUBMIT" NAME="op" VALUE="update">
[% IF ! newarticle %]
+<INPUT TYPE="SUBMIT" NAME="op" VALUE="update">
<INPUT TYPE="SUBMIT" NAME="op" VALUE="delete">
[% END %]
View
2  plugins/Journal/templates/journaledit;journal;default
@@ -21,7 +21,7 @@ __template__
<INPUT TYPE="hidden" NAME="preview" VALUE="active">
<INPUT TYPE="text" NAME="description" value="[% FILTER strip_attribute; article.description; END %]">
<P>
- <TEXTAREA NAME="article" COLS="60" ROWS="20">[% FILTER strip_literal; article.article; END %]</TEXTAREA>
+ <TEXTAREA WRAP="virtual" NAME="article" COLS="60" ROWS="20">[% FILTER strip_literal; article.article; END %]</TEXTAREA>
</P>
<INPUT TYPE="submit" NAME="op" value="preview">
[% IF form.preview %]
Please sign in to comment.
Something went wrong with that request. Please try again.