[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rt-devel
Subject:    [Rt-devel] Edit TransactionCustomFields in Update.html
From:       "=?ISO-8859-1?Q?R=E9mi?=" <mirebob () gmail ! com>
Date:       2008-12-11 14:29:07
Message-ID: 5a4fb0f70812110629o47b96612u80f9f10f83a1c572 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


hi rt-devels

I've made a little patch for Ticket/Update.html to disable the display of
TransactionCustomFields when a user doesn't have the right to modify it (so
there si no need to diplay it!).


% if (my $TxnCFs = $TicketObj->TransactionCustomFields) {
%    while (my $CF = $TxnCFs->Next()) {
*%        next unless $CF->CurrentUserHasRight('ModifyCustomField');*
<tr>
<td class="label"><% $CF->Name %>:</td>
<td><& /Elements/EditCustomField, CustomField => $CF, NamePrefix =>
    "Object-RT::Transaction--CustomField-" &><em><% $CF->FriendlyType
%></em></td>
</tr>
%    } # end if while
% } # end of if


$ diff Update.html /usr/share/request-tracker3.8/html/Ticket/Update.html
103d102
< %        next unless $CF->CurrentUserHasRight('ModifyCustomField');


Rémi

[Attachment #5 (text/html)]

hi rt-devels<br><br>I&#39;ve made a little patch for Ticket/Update.html to disable \
the display of TransactionCustomFields when a user doesn&#39;t have the right to \
modify it (so there si no need to diplay it!).<br><br><br> % if (my $TxnCFs = \
$TicketObj-&gt;TransactionCustomFields) {<br>%&nbsp;&nbsp;&nbsp; while (my $CF = \
$TxnCFs-&gt;Next()) {<br><b>%&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; next unless \
$CF-&gt;CurrentUserHasRight(&#39;ModifyCustomField&#39;);</b><br>&lt;tr&gt;<br>&lt;td \
class=&quot;label&quot;&gt;&lt;% $CF-&gt;Name %&gt;:&lt;/td&gt;<br> \
&lt;td&gt;&lt;&amp; /Elements/EditCustomField, CustomField =&gt; $CF, NamePrefix \
=&gt;<br>&nbsp;&nbsp;&nbsp; &quot;Object-RT::Transaction--CustomField-&quot; \
&amp;&gt;&lt;em&gt;&lt;% $CF-&gt;FriendlyType \
%&gt;&lt;/em&gt;&lt;/td&gt;<br>&lt;/tr&gt;<br> %&nbsp;&nbsp;&nbsp; } # end if \
while<br>% } # end of if<br><br><br>$ diff Update.html \
/usr/share/request-tracker3.8/html/Ticket/Update.html<br>103d102<br>&lt; \
%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; next unless \
$CF-&gt;CurrentUserHasRight(&#39;ModifyCustomField&#39;);<br> <br><br>Rémi<br>



_______________________________________________
List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic