4include_once 
"./Services/License/classes/class.ilLicense.php";
 
   50        $this->lng->loadLanguageModule(
"license");
 
   51        $this->parent_gui = $a_parent_gui;
 
   52        $this->license = 
new ilLicense($this->parent_gui->object->getId());
 
   58        global $rbacsystem, 
$ilErr;
 
   61        if (!$rbacsystem->checkAccess(
"edit_permission", $this->parent_gui->object->getRefId())) {
 
   62            $ilErr->raiseError($this->lng->txt(
"permission_denied"), 
$ilErr->MESSAGE);
 
   65        $cmd = $this->ctrl->getCmd(
"editLicense");
 
   74        include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
 
   76        $form->setFormAction($this->ctrl->getFormAction($this, 
"updateLicense"));
 
   77        $form->setTitle($this->lng->txt(
'edit_license'));
 
   79        $exist = 
new ilNumberInputGUI($this->lng->txt(
"existing_licenses"), 
"licenses");
 
   80        $exist->setInfo($this->lng->txt(
"zero_licenses_explanation"));
 
   81        $exist->setMaxLength(10);
 
   83        $exist->setValue($this->license->getLicenses());
 
   84        $form->addItem($exist);
 
   87        $info_used->setInfo($this->lng->txt(
"used_licenses_explanation"));
 
   88        $info_used->setValue($this->license->getAccesses());
 
   89        $form->addItem($info_used);
 
   91        $remaining_licenses = ($this->license->getLicenses() == 
"0") ? $this->lng->txt(
"arbitrary") : $this->license->getRemainingLicenses();
 
   94        $info_remain->setInfo($this->lng->txt(
"remaining_licenses_explanation"));
 
   95        $info_remain->setValue($remaining_licenses);
 
   96        $form->addItem($info_remain);
 
   99        $info_potential->setInfo($this->lng->txt(
"potential_accesses_explanation"));
 
  100        $info_potential->setValue($this->license->getPotentialAccesses());
 
  101        $form->addItem($info_potential);
 
  105        $comm->setValue($this->license->getRemarks());
 
  106        $form->addItem($comm);
 
  108        $form->addCommandButton(
'updateLicense', $this->lng->txt(
'save'));
 
  123        $this->tpl->setContent($a_form->getHTML());
 
  133        if (
$form->checkInput()) {
 
  134            $this->license->setLicenses(
$form->getInput(
"licenses"));
 
  135            $this->license->setRemarks(
$form->getInput(
"remarks"));
 
  136            $this->license->update();
 
  139            $this->ctrl->redirect($this, 
"editLicense");
 
  142        $form->setValuesByPost();
 
An exception for terminatinating execution or to throw for unit testing.
__construct(ilObjectGUI $a_parent_gui)
ilLicenseGUI constructor.
updateLicense()
Save the license form.
editLicense(ilPropertyFormGUI $a_form=null)
This class represents a non editable value in a property form.
Class ilObjectGUI Basic methods of all Output classes.
This class represents a text area property in a property form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
if(isset($_POST['submit'])) $form