File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,15 @@ public function displaySimplified($options = []) {
234234 $ satisfaction = new TicketSatisfaction ();
235235 if ($ satisfaction ->getFromDB ($ options ['id ' ])) {
236236 // show survey form, if any
237- $ satisfaction ->showForm ($ item );
237+ // @see Ticket::displayTabContentForItem()
238+ $ duration = Entity::getUsedConfig ('inquest_duration ' , $ item ->fields ['entities_id ' ]);
239+ $ date2 = strtotime ($ satisfaction ->fields ['date_begin ' ]);
240+ if (($ duration == 0 )
241+ || (strtotime ("now " ) - $ date2 ) <= $ duration *DAY_TIMESTAMP ) {
242+ $ satisfaction ->showForm ($ item );
243+ } else {
244+ echo "<p class='center b'> " .__ ('Satisfaction survey expired ' )."</p> " ;
245+ }
238246 }
239247
240248 echo "<div class='timeline_box'> " ;
You can’t perform that action at this time.
0 commit comments