%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
%# END BPS TAGGED BLOCK }}}
<table>
<tr>
-<td align="right">
-<&|/l&>Name</&>:
-</td>
-<td>
-<input name="Name" value="<%$Name%>" size="20" /><br />
-</td>
+<td class="label"><&|/l&>Name</&>:</td>
+<td class="value"><input name="Name" value="<%$Name||''%>" size="80" /></td>
</tr>
<tr>
-<td align="right">
-<&|/l&>Description</&>:
-</td>
-<td>
-<input name="Description" value="<%$Description%>" size="80" /><br />
-</td>
+<td class="label"><&|/l&>Description</&>:</td>
+<td class="value"><input name="Description" value="<%$Description||''%>" size="80" /></td>
</tr>
<tr>
-<td align="right" valign="top">
-<&|/l&>Content</&>:<br />
-</td>
-<td>
-<textarea name="Content" rows="25" cols="80" wrap="soft">
-<%$Content%></textarea>
+<td class="label"><&|/l&>Type</&>:</td>
+<td class="value">
+
+<input type="radio" name="Type" id="Type-Perl" value="Perl" <% $Type eq "Perl" ? 'checked="checked"' : "" |n %>></input>
+<label for="Type-Perl"><&|/l&>Perl</&></label><br />
+
+<input type="radio" name="Type" id="Type-Simple" value="Simple" <% $Type eq "Simple" ? 'checked="checked"' : "" |n %>>
+<label for="Type-Simple"><&|/l&>Simple</&></label><br />
+
</td>
</tr>
+<tr>
+<td class="label" valign="top"><&|/l&>Content</&>:</td>
+<td class="value"><textarea name="Content" rows="25" cols="80" wrap="soft">
+<%$Content||''%></textarea></td>
+</tr>
</table>
<%INIT>
+unless ($Type) {
+ $Type = $session{'CurrentUser'}->HasRight(Right => 'ExecuteCode', Object => $RT::System) ?
+ 'Perl' : 'Simple';
+}
+
</%INIT>
<%ARGS>
-$Name => undef
-$Description => undef
-$Content => undef
+$Name => ''
+$Description => ''
+$Content => ''
+$Type => ''
</%ARGS>