X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FAdmin%2FArticles%2FClasses%2FModify.html;h=ef3f50317781331b5aa224060c73b4934490202c;hp=8dbd2897d69a6a9f9cfcb4eb3e724c2884fc8966;hb=187086c479a09629b7d180eec513fb7657f4e291;hpb=6587f6ba7d047ddc1686c080090afe7d53365bd4 diff --git a/rt/share/html/Admin/Articles/Classes/Modify.html b/rt/share/html/Admin/Articles/Classes/Modify.html index 8dbd2897d..ef3f50317 100644 --- a/rt/share/html/Admin/Articles/Classes/Modify.html +++ b/rt/share/html/Admin/Articles/Classes/Modify.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2018 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -68,29 +68,60 @@   -> <&|/l&>Enabled (Unchecking this box disables this class) + + > + +   -> <&|/l&>All Articles in this class should be listed in a dropdown of the ticket reply page + + > + + -

When inserting articles in this class into emails:

+

<&|/l&>When inserting articles in this class into emails:

+% if ( @$subject_cfs ) { +

<&|/l&>Change email subject:

+

<&|/l&>If a Custom Field is selected, the Subject of your outgoing email will be overridden by this article.

+ +<& /Widgets/Form/Select, + Name => 'SubjectOverride', + DefaultLabel => loc('No Subject Override'), + Values => $subject_cfs, + ValuesLabel => $subject_cf_labels, + CurrentValue => $ClassObj->SubjectOverride, +&> +% } + %$m->callback( CallbackName => 'BeforeSubmit', CustomFields => $cfs, ClassObj => $ClassObj ); % if ( $Create ) { @@ -132,8 +163,17 @@ if ($Create) { } if ($ClassObj->Id()) { + + if ($ARGS{SubjectOverride}) { + $ARGS{SubjectOverride} = $m->comp('/Widgets/Form/Select:Process', + Arguments => \%ARGS, + Name => 'SubjectOverride', + DefaultValue => (''), + ); + } + $ARGS{HotList} ||= 0 if $Submitted; - my @attribs= qw(Description Name HotList); + my @attribs= qw(Description Name HotList SubjectOverride); $m->callback( CallbackName => 'AttributeList', Attributes => \@attribs, ARGSRef => \%ARGS ); push @results, UpdateRecordObject( AttributesRef => \@attribs, Object => $ClassObj, @@ -148,11 +188,17 @@ if ((defined $Enabled && $Enabled == 1) or (not defined $Enabled and $Create)) { } my %include = (Name => 1, Summary => 1); +my $subject_cfs = []; +my $subject_cf_labels = {}; my $cfs; if ( $ClassObj->id ) { $cfs = $ClassObj->ArticleCustomFields; - $include{"CF-Title-".$_->Id} = $include{"CF-Value-".$_->Id} = 1 while $_ = $cfs->Next; + while ( my $cf = $cfs->Next ) { + $include{"CF-Title-".$cf->Id} = $include{"CF-Value-".$cf->Id} = 1; + push @$subject_cfs,$cf->Id; + $subject_cf_labels->{$cf->Id} = $cf->Name; + } } if ( $ClassObj->id && $Submitted ) {