summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 73b1fb8)
raw | patch | inline | side by side (parent: 73b1fb8)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 2 Apr 2008 11:47:52 +0000 (11:47 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 2 Apr 2008 11:47:52 +0000 (11:47 +0000) |
-Object properties will be shown now.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10112 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10112 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/sudo/class_sudoGeneric.inc | patch | blob | history | |
gosa-core/plugins/admin/sudo/generic.tpl | patch | blob | history |
diff --git a/gosa-core/plugins/admin/sudo/class_sudoGeneric.inc b/gosa-core/plugins/admin/sudo/class_sudoGeneric.inc
index d6426384a624e028b88164196b901043879f4ee5..9fc17326466cf815a6a18439b1e3359c97397483 100644 (file)
{
/* Call parent execute */
plugin::execute();
+
+
+
+
+
+
+
+
+
+
+
+
+
$smarty = get_smarty();
foreach($this->attributes as $attr){
- $smart->assign($attr,$this->$attr);
+ $smarty->assign($attr,$this->$attr);
+ }
+
+ $divlist_sudoUser = new divSelectBox("divlist_sudoUser");
+ $divlist_sudoUser->SetHeight("90");
+ $divlist_sudoHost = new divSelectBox("divlist_sudoHost");
+ $divlist_sudoHost->Setheight("90");
+ $divlist_sudoRunas = new divSelectBox("divlist_sudoRunas");
+ $divlist_sudoRunas->Setheight("90");
+ $divlist_sudoOption = new divSelectBox("divlist_sudoOption");
+ $divlist_sudoOption->Setheight("90");
+ $divlist_sudoCommand = new divSelectBox("divlist_sudoCommand");
+ $divlist_sudoCommand->Setheight("90");
+
+ $neg_img= "<img src='images/negate.png' alt='!' class='center'>";
+ $option = "<input type='image' src='images/negate.png' name='del_%ATTR%_%KEY%' class='center'>";
+ $option.= "<input type='image' src='images/edittrash.png' name='neg_%ATTR%_%KEY%' class='center'>";
+ foreach(array("sudoUser","sudoCommand","sudoOption","sudoHost","sudoRunas") as $attr){
+ foreach($this->$attr as $key => $entry){
+ $entry = preg_replace("/^!/",$neg_img,$entry);
+
+ $list_name = "divlist_".$attr;
+ $$list_name->AddEntry(
+ array(
+ array("string" => $entry),
+ array("string" => preg_replace(array("/%KEY%/","/%ATTR%/"),array($key,$attr),$option),
+ "attach" => "style='width:40px; border-right: 0px;'")));
+ }
}
+ $smarty->assign("divlist_sudoUser",$divlist_sudoUser->DrawList());
+ $smarty->assign("divlist_sudoHost",$divlist_sudoHost->DrawList());
+ $smarty->assign("divlist_sudoRunas",$divlist_sudoRunas->DrawList());
+ $smarty->assign("divlist_sudoOption",$divlist_sudoOption->DrawList());
+ $smarty->assign("divlist_sudoCommand",$divlist_sudoCommand->DrawList());
+
return($smarty->fetch(get_template_path('generic.tpl', TRUE)));
}
index 72508bd1b8ffb151bbad91649adc80baecc7cf91..6f13ff04a9f4133813ee4e7453145627be125799 100644 (file)
<h2>Sudo generic</h2>
-
-<table style="width: 100%;">
+<table style="width: 90%;">
<tr>
<td style="width:50%"><b>Generic</b>
<table>
<tr>
<td>
- {t}Description{/t}
+ {t}Name{/t}
</td>
<td>
- <input type="text" name="description" value="{descriptioncn}">
+ <input type="text" name="cn" value="{$cn}">
</td>
</tr>
<tr>
<td>
- {t}Name{/t}
+ {t}Description{/t}
</td>
<td>
- <input type="text" name="cn" value="{$cn}">
+ <input type="text" name="description" value="{$description}">
</td>
</tr>
</table>
</td>
- <td style="border-left: solid 1px #AAAAAA;"><b>Commands</b>
- </td>
</tr>
<tr>
<td style="width:50%"><b>User / Groups</b>
- {$sudoUser}
+ {$divlist_sudoUser}
</td>
<td style="border-left: solid 1px #AAAAAA;"><b>Commands</b>
+ {$divlist_sudoCommand}
</td>
</tr>
- <tr><td colspan="2"><p class="seperator"> </p></td></tr>
+ <tr><td style="width:100%;"colspan="2"><p class="seperator"> </p></td></tr>
<tr>
<td colspan="2"><b>Flags</b>
+ {$divlist_sudoOption}
</td>
</tr>
- <tr><td colspan="2"><p class="seperator"> </p></td></tr>
+ <tr><td style="width:100%;"colspan="2"><p class="seperator"> </p></td></tr>
<tr>
<td><b>Hosts</b>
+ {$divlist_sudoHost}
</td>
<td style="border-left: solid 1px #AAAAAA;"><b>Run as</b>
+ {$divlist_sudoRunas}
</td>
</tr>
</table>