summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d026a49)
raw | patch | inline | side by side (parent: d026a49)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 19 Mar 2010 14:53:40 +0000 (14:53 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 19 Mar 2010 14:53:40 +0000 (14:53 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16958 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/apache2/admin/systems/services/apache2/class_servApacheEditVhost.inc b/gosa-plugins/apache2/admin/systems/services/apache2/class_servApacheEditVhost.inc
index 1726c72c7272aef658060713fe5a85d24ece043f..d00bc8de1f83e0325abaf5693c6a17ea2672479e 100644 (file)
$once = false;
$id = preg_replace("/^SAup_/","",$name);
$id = preg_replace("/_.*$/","",$id);
- $id = base64_decode($id);
+ $id = postDecode($id);
$this->apacheServerAlias = $this->ArrayUp(($id+1),$this->apacheServerAlias);
}
$id = preg_replace("/^SAdown_/","",$name);
$id = preg_replace("/_.*$/","",$id);
- $id = base64_decode($id);
+ $id = postDecode($id);
$this->apacheServerAlias = $this->ArrayDown(($id+1),$this->apacheServerAlias);
}
$once = false;
$id = preg_replace("/^SAdel_/","",$name);
$id = preg_replace("/_.*$/","",$id);
- $id = base64_decode($id);
+ $id = postDecode($id);
unset($this->apacheServerAlias[$id]);
$tmp =array();
foreach($this->apacheServerAlias as $entry){
$once = false;
$id = preg_replace("/^SCup_/","",$name);
$id = preg_replace("/_.*$/","",$id);
- $id = base64_decode($id);
+ $id = postDecode($id);
$this->apacheScriptAlias = $this->ArrayUp(($id+1),$this->apacheScriptAlias);
}
$once = false;
$id = preg_replace("/^SCdown_/","",$name);
$id = preg_replace("/_.*$/","",$id);
- $id = base64_decode($id);
+ $id = postDecode($id);
$this->apacheScriptAlias = $this->ArrayDown(($id+1),$this->apacheScriptAlias);
}
$once = false;
$id = preg_replace("/^SCdel_/","",$name);
$id = preg_replace("/_.*$/","",$id);
- $id = base64_decode($id);
+ $id = postDecode($id);
unset($this->apacheScriptAlias[$id]);
$tmp =array();
foreach($this->apacheScriptAlias as $entry){
$div->setHeight(120);
$recs = $this->apacheServerAlias;
- $oneup = "<input name='SAup_%s' type='image' src='images/lists/sort-up.png' title='"._("Up")."' class='center'> ";
- $onedown = "<input name='SAdown_%s' type='image' src='images/lists/sort-down.png' title='"._("Down")."' class='center'> ";
- $onedel = "<input name='SAdel_%s' type='image' src='images/lists/trash.png' title='"._("Delete")."' class='center'>";
+ $oneup = image('images/lists/sort-up.png','SAup_%s',_("Up"), "top");
+ $onedown = image('images/lists/sort-down.png','SAdown_%s',_("Down"), "bottom");
+ $onedel = image('images/lists/trash.png','SAdel_%s',_("Delete"));
+
foreach($recs as $key => $rec){
$div ->AddEntry(array(
array("string"=>$rec),
- array("string"=>str_replace("%s",base64_encode($key),$oneup.$onedown.$onedel),
- "attach"=>"style='width:70px;border-right:0px;'")
+ array("string"=>str_replace("%s",postEncode($key),$oneup.$onedown.$onedel),
+ "attach"=>"style='width:50px;border-right:0px;'")
));
}
$smarty->assign("apacheServerAlias", $div->DrawList());
$div->setHeight(120);
$recs = $this->apacheScriptAlias;
- $oneup = "<input name='SCup_%s' type='image' src='images/lists/sort-up.png' title='"._("Up")."' class='center'> ";
- $onedown = "<input name='SCdown_%s' type='image' src='images/lists/sort-down.png' title='"._("Down")."' class='center'> ";
- $onedel = "<input name='SCdel_%s' type='image' src='images/lists/trash.png' title='"._("Delete")."' class='center'>";
-
+ $oneup = image('images/lists/sort-up.png','SCup_%s',_("Up"), "top");
+ $onedown = image('images/lists/sort-down.png','SCdown_%s',_("Down"), "bottom");
+ $onedel = image('images/lists/trash.png','SCdel_%s',_("Delete"));
+
foreach($recs as $key => $rec){
$div ->AddEntry(array(
array("string"=>$rec),
- array("string"=>str_replace("%s",base64_encode($key),$oneup.$onedown.$onedel),
- "attach"=>"style='width:70px;border-right:0px;'")
+ array("string"=>str_replace("%s",postEncode($key),$oneup.$onedown.$onedel),
+ "attach"=>"style='width:50px;border-right:0px;'")
));
}
$smarty->assign("apacheScriptAlias", $div->DrawList());
return($ret);
}
+ function acl_is_writeable($attribute,$skip_write = FALSE)
+ {
+ if($this->read_only) return(FALSE);
+ $ui= get_userinfo();
+ return preg_match('/w/', $ui->get_permissions($this->acl_base,
+ $this->acl_category."servapache", $attribute, $skip_write));
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/gosa-plugins/apache2/admin/systems/services/apache2/class_servApacheVhost.inc b/gosa-plugins/apache2/admin/systems/services/apache2/class_servApacheVhost.inc
index 1a26d45f80198c89d05f2c077a3b499b6548a57f..fd400896a8970bf24172838131cbd9811cd93896 100644 (file)
*/
if(isset($_POST['AddVhost']) && $this->acl_is_writeable("VirtualHosts")){
$this->dialog = new servapacheVhostEdit($this->config,$this->dn);
+ $this->dialog->set_acl_category('server');
}
/* Check for edit vhost request
$tmp = preg_replace("/^editVhost_/","",$name);
$tmp = base64_decode(preg_replace("/_.*$/","",$tmp));
$this->dialog= new servapacheVhostEdit($this->config,$this->dn,$this->Vhosts[$tmp]);
+ $this->dialog->set_acl_category('server');
}
/* check posts for delete vhost
/* Create Listbox with existing Vhosts
*/
$VhostList = new divSelectBox("apacheConfigs");
- $VhostList -> SetHeight(254);
+ $VhostList -> SetHeight(140);
/* Add entries to divlist
*/
- $editImg = "<input type='image' src='images/lists/edit.png' name='editVhost_%s'>
- <input type='image' src='images/lists/trash.png' name='delVhost_%s'>";
+ $editImg =
+ image('images/lists/edit.png','editVhost_%s').
+ image('images/lists/trash.png','delVhost_%s');
+
foreach($this->Vhosts as $vhost => $values ){
$VhostList->AddEntry(array(
array("string" => $vhost),
- array("string" => str_replace("%s",base64_encode($vhost),$editImg))
+ array("string" => str_replace("%s",postEncode($vhost),$editImg),
+ "attach" => "style='width:40px;'")
));
}
diff --git a/gosa-plugins/apache2/admin/systems/services/apache2/servApacheVhost.tpl b/gosa-plugins/apache2/admin/systems/services/apache2/servApacheVhost.tpl
index 0537d9d2f6c8f437666808b3c44057632ae85c8f..285803f980110dfe954e513cbb76fc4ea0172800 100644 (file)
<table summary="" width="100%">
<tr>
<td style='width:100%;'>
-
{$VhostList}
-
{render acl=$VirtualHostACL}
- <button type='submit' name='AddVhost'>{t}Add{/t}</button>
-
+ <button type='submit' name='AddVhost'>{t}Add{/t}</button>
{/render}
</td>
</tr>
</table>
+
<script language="JavaScript" type="text/javascript">
<!-- // First input field on page
document.mainform.AddVhost.focus();
-->
</script>
-<input type="hidden" name="servapache" value="1">
+<input type="hidden" name="servapache" value="1">
<hr>
-<br>
-<div style="width:100%; text-align:right;">
- <button type='submit' name='SaveService'>{msgPool type=saveButton}</button>
-
-
- <button type='submit' name='CancelService'>{msgPool type=cancelButton}</button>
-
+<div class="plugin-actions">
+ <button type='submit' name='SaveService'>{msgPool type=saveButton}</button>
+ <button type='submit' name='CancelService'>{msgPool type=cancelButton}</button>
</div>
diff --git a/gosa-plugins/apache2/admin/systems/services/apache2/servApacheVhostEdit.tpl b/gosa-plugins/apache2/admin/systems/services/apache2/servApacheVhostEdit.tpl
index 4c01a63424f7870c36d3e32bdbe8e42272e37f32..3178b89bb964e43a21a6af9700c7f62c11121eb7 100644 (file)
<h3>{t}Generic{/t}</h3>
-<table summary="" width="100%">
- <tr>
- <td style='width:50%;' class='right-border'>
<table summary="">
<tr>
</td>
</tr>
</table>
- </td>
- <td>
-
- <table summary="" width="100%">
- <tr>
- <td style='width:100%;' class='right-border'>
-
- <h3>{t}Server Alias{/t}</h3>
- <table width="100%">
- <tr>
- <td>
- {$apacheServerAlias}
- </td>
- </tr>
- <tr>
- <td>
- <table width="100%">
- <tr>
- <td style='width:30%;'>
-
- <h3>{t}URL Alias{/t}</h3>
- </td>
- <td>
- <h3>{t}Directory Path{/t}</h3>
- </td>
- </tr>
- <tr>
- <td style='width:30%;'>
-
- <input type="text" name="StrSAAlias" value="">
- </td>
- <td>
- <input type="text" name="StrSADir" value="">
- <button type='submit' name='AddSARecord'>{t}Add{/t}</button>
-
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
-</table>
<hr>
-<br>
<table summary="" width="100%">
- <tr>
+ <tr>
+ <td style='width:50%;' class='right-border'>
+
+ <h3>{t}Server Alias{/t}</h3>
+
+ {$apacheServerAlias}
+ <table width="100%" summary="{t}Server Alias{/t}">
+ <tr>
+ <td style='width:30%;'>
+
+ <h3>{t}URL Alias{/t}</h3>
+ </td>
+ <td>
+ <h3>{t}Directory Path{/t}</h3>
+ </td>
+ </tr>
+ <tr>
+ <td style='width:30%;'>
+
+ <input type="text" name="StrSAAlias" value="">
+ </td>
+ <td>
+ <input type="text" name="StrSADir" value="">
+ <button type='submit' name='AddSARecord'>{t}Add{/t}</button>
+
+ </td>
+ </tr>
+ </table>
+
+ </td>
<td style='width:50%;' class='right-border'>
<h3>{t}Script Alias{/t}</h3>
- <table width="100%">
- <tr>
- <td>
- {$apacheScriptAlias}
- </td>
- </tr>
- <tr>
- <td>
- <table width="100%">
- <tr>
- <td style='width:30%;'>
-
- <h3>{t}Alias Directory{/t}</h3>
- </td>
- <td>
- <h3>{t}Script Directory{/t}</h3>
- </td>
- </tr>
- <tr>
- <td style='width:30%;'>
-
- <input type="text" name="StrSCAlias" value="">
- </td>
- <td>
- <input type="text" name="StrSCDir" value="">
- <button type='submit' name='AddSCRecord'>{t}Add{/t}</button>
-
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- <td>
+ {$apacheScriptAlias}
+
+ <table width="100%" summary="{t}Script Alias{/t}">
+ <tr>
+ <td style='width:30%;'>
+ <h3>{t}Alias Directory{/t}</h3>
+ </td>
+ <td>
+ <h3>{t}Script Directory{/t}</h3>
+ </td>
+ </tr>
+ <tr>
+ <td style='width:30%;'>
+
+ <input type="text" name="StrSCAlias" value="">
+ </td>
+ <td>
+ <input type="text" name="StrSCDir" value="">
+ <button type='submit' name='AddSCRecord'>{t}Add{/t}</button>
+
+ </td>
+ </tr>
+ </table>
</td>
</tr>