%# BEGIN LICENSE BLOCK %# %# Copyright (c) 2002-2003 Jesse Vincent %# %# This program is free software; you can redistribute it and/or modify %# it under the terms of version 2 of the GNU General Public License %# as published by the Free Software Foundation. %# %# A copy of that license should have arrived with this %# software, but in any event can be snarfed from www.gnu.org. %# %# This program is distributed in the hope that it will be useful, %# but WITHOUT ANY WARRANTY; without even the implied warranty of %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %# GNU General Public License for more details. %# %# END LICENSE BLOCK <& /RTFM/Elements/Tabs, Title => loc('Create a new article') &>
<&|/l&>Name
<&|/l&>Summary
<&|/l&>Class <%$ClassObj->Name%>
% while (my $CustomField = $CustomFields->Next) { <%$CustomField->Name%> - <%$CustomField->Type%>
% if ($CustomField->Type eq 'FreeformSingle') { % } elsif ($CustomField->Type eq 'FreeformMultiple') { % } % elsif ($CustomField->Type =~ /(?:TextSingle)$/) { % } % elsif ($CustomField->Type =~ /^Select/) { % my $CustomFieldValues = $CustomField->ValuesObj(); % } % }

<&|/l&>Relationships

<&|/l&>Enter Articles or URIs to link Articles to. Seperate multiple entries with spaces.
<&|/l&>Refers to:
<&|/l&>Referred to by:
<%ARGS> $ArticleObj => undef <& /Elements/Submit, Label => loc('Create'), color => "#993333" &>
<%INIT> my %cfcontent; foreach my $arg (sort keys %ARGS) { if ($arg =~ /^Transaction-(\d+)$/) { my $trans = RT::Transaction->new($session{'CurrentUser'}); $trans->Load($1); $cfcontent{$ARGS{$arg}} .= $trans->Content; } } my $ClassObj = RT::FM::Class->new($session{'CurrentUser'}); $ClassObj->Load($Class); unless ($ClassObj->Id) { $m->comp("/RTFM/Elements/Error", Why => "'%1' isn't a valid class identifier", $Class); } my $CustomFields = $ClassObj->CustomFields(); <%ARGS> $Class=>undef