summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ab4627e)
raw | patch | inline | side by side (parent: ab4627e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 1 Jun 2010 11:32:58 +0000 (11:32 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 1 Jun 2010 11:32:58 +0000 (11:32 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18812 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/dyngroup/addons/dyngroup/classDynamicLdapGroup.inc | patch | blob | history | |
gosa-plugins/dyngroup/addons/dyngroup/dyngroup.tpl | patch | blob | history |
diff --git a/gosa-plugins/dyngroup/addons/dyngroup/classDynamicLdapGroup.inc b/gosa-plugins/dyngroup/addons/dyngroup/classDynamicLdapGroup.inc
index 35a925ec6f11e7785d86a86c8c68cc76d3955539..b8bf59797567df14cb2a39df7f63cc2b968dba04 100644 (file)
public function check ()
{
- return Array();
+ $messages = plugin::check();
+
+ // At least one entry is required.
+ if(!count($this->labeledURIparsed)){
+ $messages[] = msgPool::required(_("Labeled Uri"));
+ }
+
+ // Check entries
+ foreach($this->labeledURIparsed as $key => $entry){
+ $nr = $key +1;
+
+ // A base is required
+ if(empty($entry['base'])){
+ $messages[] = msgPool::required(_("Base")." {$nr}");
+ }
+
+ // Check for invalid attributes
+ if(empty($entry['attr'])){
+ $messages[] = msgPool::required(_("Attribute")." {$nr}");
+ }elseif(in_array(strtolower($entry['attr']), array('objectclass'))){
+ $messages[] = msgPool::reserved(_("Attribute")." {$nr}");
+ }
+
+ // A filter is required
+ if(empty($entry['filter'])){
+ $messages[] = msgPool::required(_("Filter")." {$nr}");
+ }
+ }
+
+ return($messages);
}
diff --git a/gosa-plugins/dyngroup/addons/dyngroup/dyngroup.tpl b/gosa-plugins/dyngroup/addons/dyngroup/dyngroup.tpl
index c50aa14df7472337d0565afa62a5a447f6eb5625..ad5dfc69a5cbb549a592363fca19977227fd4787 100644 (file)
{foreach item=item key=key from=$labeledURIparsed}
<tr>
<td>
- <input type='text' value='{$item.base}'>
+ <input type='text' value='{$item.base}' name='base_{$key}'>
</td>
<td>
- <select name='scope' size='1'>
+ <select name='scope_{$key}' size='1'>
{html_options options=$scopes selected=$item.scope}
</select>
</td>