@@ -3976,42 +3976,11 @@ public function showFormHelpdesk($ID, $ticket_template = false)
3976
3976
$ url_validate = Ticket::getSearchURL () . "? " . Toolbox::append_params ($ opt );
3977
3977
}
3978
3978
3979
- $ email = UserEmail::getDefaultForUser ($ ID );
3980
- $ default_use_notif = Entity::getUsedConfig ('is_notif_enable_default ' , $ _SESSION ['glpiactive_entity ' ], '' , 1 );
3981
-
3982
3979
// Set default values...
3983
- $ default_values = [
3984
- '_users_id_requester_notif ' => [
3985
- 'use_notification ' => (($ email == "" ) ? 0 : $ default_use_notif ),
3986
- ],
3987
- 'nodelegate ' => 1 ,
3988
- '_users_id_requester ' => 0 ,
3989
- '_users_id_observer ' => 0 ,
3990
- '_users_id_observer_notif ' => [
3991
- 'use_notification ' => $ default_use_notif ,
3992
- ],
3993
- 'name ' => '' ,
3994
- 'content ' => '' ,
3995
- 'itilcategories_id ' => 0 ,
3996
- 'locations_id ' => 0 ,
3997
- 'urgency ' => 3 ,
3998
- 'items_id ' => [],
3999
- 'entities_id ' => $ _SESSION ['glpiactive_entity ' ],
4000
- 'plan ' => [],
4001
- '_add_validation ' => 0 ,
4002
- 'type ' => Entity::getUsedConfig (
4003
- 'tickettype ' ,
4004
- $ _SESSION ['glpiactive_entity ' ],
4005
- '' ,
4006
- Ticket::INCIDENT_TYPE
4007
- ),
4008
- '_right ' => "id " ,
4009
- '_content ' => [],
4010
- '_tag_content ' => [],
4011
- '_filename ' => [],
4012
- '_tag_filename ' => [],
4013
- '_tasktemplates_id ' => [],
4014
- ];
3980
+ $ default_values = self ::getDefaultValues ();
3981
+ $ default_values ['nodelegate ' ] = 1 ;
3982
+ $ default_values ['_right ' ] = "id " ;
3983
+
4015
3984
$ options = [];
4016
3985
4017
3986
// Get default values from posted values on reload form
0 commit comments