summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e20a9f8)
raw | patch | inline | side by side (parent: e20a9f8)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 1 Oct 2009 12:33:07 +0000 (12:33 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 1 Oct 2009 12:33:07 +0000 (12:33 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14442 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/opsi/admin/opsiLicenses/class_licensePoolGeneric.inc | patch | blob | history |
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_licensePoolGeneric.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_licensePoolGeneric.inc
index b42007a147c759812f266465f091a0588872e25b..eef2354fe4d3166f840461bcdc68acde73c35b53 100644 (file)
$list = new divSelectBox("test");
$list->setHeight(100);
if($this->acl_is_readable("licenses")){
+ $editlink = "<a href='?plug=".$_GET['plug']."&act=edit&id=%s'>%s</a>";
foreach($this->licenses as $i => $license){
$link = "<input type='image' class='center' src='images/lists/edit.png' name='editLicense_{$i}'>";
if(preg_match("/w/", $this->getacl("licenses"))){
$link.= "<input type='image' class='center' src='images/lists/trash.png' name='removeLicense_{$i}'>";
}
- $f1 = array("string" => $license['cn']);
$maxInst = "";
if($license['maximumInstallations'] == 0){
$maxInst = $license['maximumInstallations'];
}
+
$map = array(
"VOLUME" => sprintf(_("Volume license (#%s)"), $maxInst),
"OEM"=>_("OEM"),
"RETAIL"=>_("Retail"),
"CONCURRENT"=>_("Concurrent"));
- $f2 = array("string" => $map[$license['licenseModel']]);
+ $f1 = array("string" => sprintf($editlink,$i,$license['cn']));
+ $f2 = array("string" => sprintf($editlink,$i,$map[$license['licenseModel']]));
$f6 = array("string" => $link, "attach" => "style='border-right: 0px; width:32px;'");
$list->addEntry(array($f1,$f2,$f6));
}
*/
function save_object()
{
+ // Allow license edit via href links
+ if(isset($_GET['act']) && $_GET['act'] == 'edit' && isset($_GET['id'])){
+ $id = trim($_GET['id']);
+ if(isset($this->licenses[$id])){
+ $this->dialog = new licenseGeneric($this->config,$this->dn,$this->licenses[$id], $this->opsiHosts);
+ $this->dialog->set_acl_base($this->config->current['BASE']);
+ }
+ }
+
// Close license edit dialogs.
if($this->dialog instanceOf plugin && isset($_POST['license_cancel'])){
$this->dialog = NULL;
$this->dialog->set_acl_base($this->config->current['BASE']);
}
}
-
+
// Search post for image button clicks.
if(preg_match("/r/",$this->getacl("licenses"))){
foreach($_POST as $name => $value){