diff options
Diffstat (limited to 'rt/share/html/Articles/Article')
-rw-r--r-- | rt/share/html/Articles/Article/Edit.html | 1 | ||||
-rw-r--r-- | rt/share/html/Articles/Article/Elements/EditTopics | 55 | ||||
-rw-r--r-- | rt/share/html/Articles/Article/ExtractIntoClass.html | 2 |
3 files changed, 28 insertions, 30 deletions
diff --git a/rt/share/html/Articles/Article/Edit.html b/rt/share/html/Articles/Article/Edit.html index 756aa2cc9..d14c33076 100644 --- a/rt/share/html/Articles/Article/Edit.html +++ b/rt/share/html/Articles/Article/Edit.html @@ -157,6 +157,7 @@ elsif ( $id eq 'new' ) { my $cfid = $1; my $cf = RT::CustomField->new( $session{'CurrentUser'} ); + $cf->SetContextObject( $ArticleObj ); $cf->Load( $cfid ); unless ( $cf->id ) { $RT::Logger->error( "Couldn't load custom field #". $cfid ); diff --git a/rt/share/html/Articles/Article/Elements/EditTopics b/rt/share/html/Articles/Article/Elements/EditTopics index 807360bf2..82e907135 100644 --- a/rt/share/html/Articles/Article/Elements/EditTopics +++ b/rt/share/html/Articles/Article/Elements/EditTopics @@ -47,35 +47,32 @@ %# END BPS TAGGED BLOCK }}} <input type="hidden" name="EditTopics" value="1" /> <select multiple size="10" name="Topics"> -<%perl> -if (@Classes) { - $m->print("<optgroup label=\"Current classes (".join (' ',map {$_->Name} @Classes).")\">") - unless $OnlyThisClass; - $inTree->traverse(sub { - my $tree = shift; - my $topic = $tree->getNodeValue; - $m->print("<option value=\"".$topic->Id."\"" - .(exists $topics{$topic->Id} ? " selected" : "").">" - .(" " x ($tree->getDepth*5)).($topic->Name || loc("(no name)"))."</option>\n"); - }); -} -unless ($OnlyThisClass) { - my $class = $Classes[-1]->Id; - $otherTree->traverse(sub { - my $tree = shift; - my $topic = $tree->getNodeValue; - unless ($topic->ObjectId == $class) { - $class = $topic->ObjectId; - $m->print("</optgroup>\n"); - my $c = RT::Class->new($session{'CurrentUser'}); - $c->Load($topic->ObjectId); - $m->print("<optgroup label=\"".$c->Name."\">\n"); - } - $m->print("<option value=\"".$topic->Id."\"" - .(exists $topics{$topic->Id} ? " selected" : "").">" - .(" " x ($tree->getDepth*5)).($topic->Name || loc("(no name)"))."</option>\n"); - }); -</%perl> +% if (@Classes) { +% unless ($OnlyThisClass) { +<optgroup label="Current classes (<% join(" ", map {$_->Name} @Classes) %>)"> +% } +% $inTree->traverse(sub { +% my $tree = shift; +% my $topic = $tree->getNodeValue; +<option value="<% $topic->Id %>" <% exists $topics{$topic->Id} ? "selected" : "" %> >\ +<% " " x ($tree->getDepth*5) |n %><% $topic->Name || loc("(no name)") %></option> +% }); +% } +% unless ($OnlyThisClass) { +% my $class = $Classes[-1]->Id; +% $otherTree->traverse(sub { +% my $tree = shift; +% my $topic = $tree->getNodeValue; +% unless ($topic->ObjectId == $class) { +% $class = $topic->ObjectId; +</optgroup> +% my $c = RT::Class->new($session{'CurrentUser'}); +% $c->Load($topic->ObjectId); +<optgroup label="<% $c->Name %>"> +% } +<option value="<% $topic->Id %>" <% exists $topics{$topic->Id} ? "selected" : "" %> >\ +<% " " x ($tree->getDepth*5) |n %><% $topic->Name || loc("(no name)") %></option> +% }); </optgroup> % } </select> diff --git a/rt/share/html/Articles/Article/ExtractIntoClass.html b/rt/share/html/Articles/Article/ExtractIntoClass.html index adf23fc0f..f3618feda 100644 --- a/rt/share/html/Articles/Article/ExtractIntoClass.html +++ b/rt/share/html/Articles/Article/ExtractIntoClass.html @@ -54,7 +54,7 @@ % my $Classes = RT::Classes->new($session{'CurrentUser'}); % $Classes->LimitToEnabled(); % while (my $Class = $Classes->Next) { -<li><a href="ExtractIntoTopic.html?Ticket=<%$Ticket%>&Class=<%$Class->Id%>" onclick="document.getElementById('topics-<% $Class->Id %>').style.display = (document.getElementById('topics-<% $Class->Id %>').style.display == 'block') ? 'none' : 'block'; return false;"><%$Class->Name%></a>: +<li><a href="ExtractIntoTopic.html?Ticket=<%$Ticket%>&Class=<%$Class->Id%>" onclick="document.getElementById('topics-'+<% $Class->Id |n,j%>).style.display = (document.getElementById('topics-'+<% $Class->Id |n,j%>).style.display == 'block') ? 'none' : 'block'; return false;"><%$Class->Name%></a>: <%$Class->Description%> <div id="topics-<%$Class->Id%>" style="display: none"> <form action="ExtractFromTicket.html"> |