summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1471d5d)
raw | patch | inline | side by side (parent: 1471d5d)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 Mar 2010 09:59:23 +0000 (09:59 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 Mar 2010 09:59:23 +0000 (09:59 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17431 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc | patch | blob | history | |
gosa-plugins/goto/admin/mimetypes/generic.tpl | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc
index 168488df7d14355653a651d90650fee5faa73546..966186251f808778b8985f655ca3b2311642d5aa 100644 (file)
var $orig_dn = "";
var $orig_base = "";
+ var $baseSelector;
+
function mimetype(&$config,$dn= NULL)
{
plugin::plugin ($config, $dn);
}
session::set('binary',$this->iconData);
session::set('binarytype',"image/jpeg");
+
+ /* Instanciate base selector */
+ $this->baseSelector= new baseSelector($this->get_allowed_bases(), $this->base);
+ $this->baseSelector->setSubmitButton(false);
+ $this->baseSelector->setHeight(300);
+ $this->baseSelector->update(true);
+
$this->orig_base = $this->base;
}
plugin::execute();
$smarty = get_smarty();
+ /* Assign base ACL */
+ $smarty->assign("base", $this->baseSelector->render());
+
if(!$this->view_logged){
$this->view_logged =TRUE;
new log("view","mimetypes/".get_class($this),$this->dn);
}
+ /* Refresh base */
+ if ($this->acl_is_moveable($this->base)){
+ if (!$this->baseSelector->update()) {
+ msg_dialog::display(_("Error"), msgPool::permMove(), ERROR_DIALOG);
+ }
+ if ($this->base != $this->baseSelector->getBase()) {
+ $this->base= $this->baseSelector->getBase();
+ $this->is_modified= TRUE;
+ }
+ }
+
/* Save radio buttons */
if($this->acl_is_writeable("gotoMimeLeftClickAction")){
if(isset($_POST['gotoMimeLeftClickAction_IE'])){
$message[] = msgPool::required(_("File pattern"));
}
+ // Check if a wrong base was supplied
+ if(!$this->baseSelector->checkLastBaseUpdate()){
+ $message[]= msgPool::check_base();;
+ }
+
/* Check if there is already a mime type with this cn */
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->config->current["BASE"]);
diff --git a/gosa-plugins/goto/admin/mimetypes/generic.tpl b/gosa-plugins/goto/admin/mimetypes/generic.tpl
index 24a3be19c3d5b2130cbf357a3adb3b0ccc6a059d..488e4d7a40e847f046de7ed2a7a1245c1b532b50 100644 (file)
+<h3>{t}Generic{/t}</h3>
+
<table style="width:100%" summary="{t}Mimetype generic{/t}">
- <tr>
- <td colspan="2">
- <h3>{t}Generic{/t}
- </h3>
- </td>
- </tr>
<tr>
<td style='width:50%; '>
+
<table summary="{t}Mimetype settings{/t}">
<tr>
- <td>{t}Mime type{/t}
- {$must}
- </td>
+ <td>{t}Mime type{/t}{$must}</td>
<td>
{render acl=$cnACL}
<input type="text" name='cn' value="{$cn}" title='{t}Please enter a name for the mime type here{/t}'>
</td>
</tr>
<tr>
- <td>{t}Mime group{/t}
- </td>
+ <td>{t}Mime group{/t}</td>
<td>
{render acl=$gotoMimeGroupACL}
<select name='gotoMimeGroup' title='{t}Categorize this mime type{/t}' size=1>
</td>
</tr>
<tr>
- <td>{t}Description{/t}
- </td>
+ <td>{t}Description{/t}</td>
<td>
{render acl=$descriptionACL}
<input type="text" name='description' value="{$description}" title='{t}Please specify a description{/t}'>
{if !$isReleaseMimeType}
<tr>
- <td><LABEL for="base">{t}Base{/t}
- {$must}</LABEL>
- </td>
+ <td><br><LABEL for="base">{t}Base{/t}</LABEL>{$must}</td>
<td>
- {render acl=$baseACL}
- <select size="1" id="base" name="base" title="{t}Choose subtree to place application in{/t}">
- {html_options options=$bases selected=$base_select}
- </select>
- {/render}
-
- {if !$isReleaseMimeType}
- {render acl=$baseACL disable_picture='images/lists/folder_grey.png'}
- {image path="images/lists/folder.png" action="chooseBase" title="{t}Select a base{/t}"}
- {/render}
-
- {/if}
+ <br>
+{render acl=$baseACL}
+ {$base}
+{/render}
</td>
</tr>
-
{/if}
</table>
+
</td>
<td class='left-border'>
+
<table summary="{t}Picture settings{/t}">
<tr>
<td><LABEL for="picture_file">{t}Icon{/t}</LABEL>
</select>
{/render}
{render acl=$gotoMimeEmbeddedApplicationACL}
- <input type='text' name='NewEmbeddedApplication' value='' title='{t}Enter an application name here{/t}'>
+ <input type='text' name='NewEmbeddedApplication' value='' title='{t}Enter an application name here{/t}'>
{/render}
{render acl=$gotoMimeEmbeddedApplicationACL}
- <button type='submit' name='AddNewEmbeddedApplication'>
- {msgPool type=addButton}</button>title='{t}Add application{/t}'>
+ <button type='submit' name='AddNewEmbeddedApplication'
+ title='{t}Add application{/t}'>{msgPool type=addButton}</button>
{/render}
</td>
</tr>
</table>
<input type="hidden" name="MimeGeneric" value="1"><!-- Place cursor -->
-<script language="JavaScript" type="text/javascript"><!-- // First input field on page focus_field('cn'); --></script>
\ No newline at end of file
+<script language="JavaScript" type="text/javascript"><!-- // First input field on page focus_field('cn'); --></script>