index d50f410078326a1cf24ae246da14e87e1867c499..cf90a8d01284605c60424d83be2aa24e1a46d768 100644 (file)
var $HideFilterPart = false;
var $SaveAdditionalVars = array(); // Additional Post vars to store
var $HideFilterPart = false;
var $SaveAdditionalVars = array(); // Additional Post vars to store
+ var $module= "";
function ClearElementsList()
{
function ClearElementsList()
{
}
/* Contrucktion */
}
/* Contrucktion */
- function MultiSelectWindow($config,$filterName)
+ function MultiSelectWindow($config, $filterName, $module)
{
$this->config = $config;
{
$this->config = $config;
+ $this->module = $module;
$this->SaveButtonString = _("Save");
$this->CloseButtonString = _("Close");
$this->filterName = $filterName;
$this->SaveButtonString = _("Save");
$this->CloseButtonString = _("Close");
$this->filterName = $filterName;
/* Check if box is checked */
if($box['default'] == true){
/* Check if box is checked */
if($box['default'] == true){
- $boxes .="<input type='checkbox' name='".$box['name']."' value='1' title='".$box['value']."' checked ".$boxClick."> ".$box['string']."<br>";
+ $boxes .="<input type='checkbox' name=\"".$box['name']."\" value='1' title=\"".htmlentities($box['value'])."\" checked ".$boxClick."> ".$box['string']."<br>";
}else{
}else{
- $boxes .="<input type='checkbox' name='".$box['name']."' value='1' title='".$box['value']."'".$boxClick.";> ".$box['string']."<br>";
+ $boxes .="<input type='checkbox' name=\"".$box['name']."\" value='1' title=\"".htmlentities($box['value'])."\" ".$boxClick."> ".$box['string']."<br>";
}
}
$smarty->assign("CheckBoxes", $boxes);
}
}
$smarty->assign("CheckBoxes", $boxes);
</label>
</td>
<td width=\"99%\">
</label>
</td>
<td width=\"99%\">
- <input type='text' style='width:99%' name='".$regex['name']."' maxlength='20'
- value='".$regex['value']."' title=\"".$regex['string']."\">
+ <input type=\"text\" style='width:99%' name=\"".$regex['name']."\" maxlength='20'
+ value=\"".htmlentities($regex['value'])."\" title=\"".htmlentities($regex['string'])."\">
</td>
</tr>
</table>";
</td>
</tr>
</table>";
Store data also into a session var, to keep the checkboxes check after reload */
function save_object()
{
Store data also into a session var, to keep the checkboxes check after reload */
function save_object()
{
+ /* Get up to date config */
+ if(isset($this->parent->config)){
+ $this->config = $this->parent->config;
+ }
+
/* Update current base */
if($this->DepartmentsAdded){
$s_action ="";
/* Update current base */
if($this->DepartmentsAdded){
$s_action ="";
/* Create header snapshot value */
function get_snapshot_header()
{
/* Create header snapshot value */
function get_snapshot_header()
{
- $str = "";
+ $str = " ";
if($this->parent->snapshotEnabled()){
$ok = false;
foreach($this->parent->get_used_snapshot_bases() as $base){
if($this->parent->snapshotEnabled()){
$ok = false;
foreach($this->parent->get_used_snapshot_bases() as $base){
title='"._("Restore snapshopts of already deleted objects")."'
alt='"._("Restore")."' name='RestoreDeletedSnapShot'> ";
}else{
title='"._("Restore snapshopts of already deleted objects")."'
alt='"._("Restore")."' name='RestoreDeletedSnapShot'> ";
}else{
- $str = "<img class='center' src='images/restore_grey.png'> ";
+ $str = "<img class='center' src='images/restore_grey.png' alt=''> ";
}
}
- $str .= "<img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ";
+# $str .= "<img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ";
}
return($str);
}
}
return($str);
}
function GetSnapShotActions($dn)
{
function GetSnapShotActions($dn)
{
- $str = "";
+ $str= "";
if($this->parent->snapshotEnabled()){
if($this->parent->snapshotEnabled()){
- $str= "<input class='center' type='image' src='images/snapshot.png'
- alt='"._("Create snapshot")."' name='CreateSnapShotDialog_".base64_encode($dn)."' title='"._("Create a new snapshot from this object")."'> ";
-
if(count($this->parent->Available_SnapsShots($dn))){
if(count($this->parent->Available_SnapsShots($dn))){
- $str= "<input class='center' type='image' src='images/restore.png'
+ $str.= "<input class='center' type='image' src='images/restore.png'
alt='"._("Restore snapshot")."' name='RestoreSnapShotDialog_".base64_encode($dn)."' title='"._("Restore snapshot")."'> ";
alt='"._("Restore snapshot")."' name='RestoreSnapShotDialog_".base64_encode($dn)."' title='"._("Restore snapshot")."'> ";
+ } else {
+ $str = "<img class='center' src='images/restore_grey.png' alt=''> ";
}
}
+
+ $str.= "<input class='center' type='image' src='images/snapshot.png'
+ alt='"._("Create snapshot")."' name='CreateSnapShotDialog_".base64_encode($dn)."' title='"._("Create a new snapshot from this object")."'> ";
}
return($str);
}
return($str);
$this->departments = array();
/* Get all departments within this subtree */
$this->departments = array();
/* Get all departments within this subtree */
- $deps= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->ui->subtreeACL,
- $base, array("ou", "description"), GL_SIZELIMIT | GL_CONVERT);
+ $deps= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base,
+ array("ou", "description"), GL_SIZELIMIT | GL_CONVERT);
/* Edit delete link for system types
*/
/* Edit delete link for system types
*/
/* Add deps to this dialog object list */
foreach($this->departments as $key=> $val){
/* Add deps to this dialog object list */
foreach($this->departments as $key=> $val){
+
/* Add missing entries ... */
if(!isset($this->config->departments[trim($key)])){
$this->config->departments[trim($key)]="";
/* Add missing entries ... */
if(!isset($this->config->departments[trim($key)])){
$this->config->departments[trim($key)]="";