ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilUploadDefinitionForm.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
5 require_once './Services/Form/classes/class.ilPropertyFormGUI.php';
6 
17 {
19  protected $form;
20 
22  protected $lng;
23 
24  public function __construct()
25  {
26  global $DIC;
28  $this->lng = $DIC['lng'];
29  }
30 
31  public function getForm($action)
32  {
33  $this->form = new ilPropertyFormGUI();
34  $this->form->setFormAction($action);
35  $this->form->setTitle($this->lng->txt('upload_process'));
36 
37  $upload_input = new ilFileInputGUI($this->lng->txt('process_definition_file'), 'process_file');
38  $upload_input->setSuffixes(array('xml','bpmn','bpmn2'));
39  $upload_input->setInfo($this->lng->txt('process_definition_file_info'));
40  $upload_input->setRequired(true);
41  $this->form->addItem($upload_input);
42 
43  $this->form->addCommandButton('upload', $this->lng->txt('upload_process'));
44  $this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
45 
46  return $this->form;
47  }
48 }
This class represents a property form user interface.
$action
global $DIC
Definition: saml.php:7
This class represents a file property in a property form.
setSuffixes($a_suffixes)
Set Accepted Suffixes.