fix ticket creation, from #9260
[freeside.git] / rt / share / html / Ticket / Elements / EditCustomFields
index c3a44ee..28d9e18 100755 (executable)
@@ -45,6 +45,7 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
+% $m->callback( %ARGS, CallbackName => 'BeforeCustomFields' );
 <table>
 % my $i = 0;
 % while ( my $CustomField = $CustomFields->Next ) {
@@ -85,6 +86,7 @@
 % }
 
 </table>
+% $m->callback( %ARGS, CallbackName => 'AfterCustomFields', TicketObj => $TicketObj, QueueObj => $QueueObj );
 <%INIT>
 my $CustomFields;
 
@@ -98,6 +100,13 @@ if ($TicketObj && !$OnCreate) {
 
 $m->callback( %ARGS, CallbackName => 'MassageCustomFields', CustomFields => $CustomFields );
 
+# show hints for missing required fields
+if ( $TicketObj ) {
+    foreach my $field ( $TicketObj->MissingRequiredFields ) {
+        $m->notes('InvalidField-' . $field->Id => 'Required to resolve');
+    }
+}
+
 </%INIT>
 <%ARGS>
 $NamePrefix => ''