summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4227a75)
raw | patch | inline | side by side (parent: 4227a75)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 17 Apr 2007 06:56:27 +0000 (06:56 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 17 Apr 2007 06:56:27 +0000 (06:56 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6060 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/addons/gotomasses/class_gotomasses.inc | patch | blob | history | |
plugins/addons/gotomasses/contents.tpl | patch | blob | history |
diff --git a/plugins/addons/gotomasses/class_gotomasses.inc b/plugins/addons/gotomasses/class_gotomasses.inc
index a8230776f8aad1208e5f1a077a762390f0128261..09e80b8e89414eec28567d86b2768faf03550514 100644 (file)
/* Add a new empty entry to the list */
if(isset($_POST['add_new_entry'])){
- $this->contents[] = array("MAC" => "", "OG" => "");
+ $this->contents[] = array("MAC" => "", "OG" => "","VALID_MAC" => FALSE);
}
/* Call parent execute */
$mac = preg_replace("/(,|;).*$/","",$str);
if(!empty($og) || !empty($mac)){
- $this->contents[] = array("MAC" => $mac , "OG" => $og);
+ $this->contents[] = array("MAC" => $mac , "OG" => $og,"VALID_MAC" => is_mac($mac));
}
}
fclose($fp);
$mac = preg_replace("/(,|;).*$/","",$str);
if(!empty($og) || !empty($mac)){
- $this->contents[] = array("MAC" => $mac , "OG" => $og);
+ $this->contents[] = array("MAC" => $mac , "OG" => $og, "VALID_MAC" => is_mac($mac));
}
}
}
$ogs = $this->get_object_groups();
foreach($this->contents as $id => $data){
if(isset($_POST['mac_'.$id])){
- $this->contents[$id]['MAC'] = $_POST['mac_'.$id];
+ $this->contents[$id]['MAC'] = $_POST['mac_'.$id];
+ $this->contents[$id]['VALID_MAC'] = is_mac($_POST['mac_'.$id]);
}
if(isset($_POST['og_'.$id]) && in_array_ics($_POST['og_'.$id],$ogs)){
$this->contents[$id]['OG'] = $_POST['og_'.$id];
index f2d108f58839f293092818d36354909bc7a5fcc1..de4f1e9f4e5462a7d6d0b8e5f06b0e816d07a10d 100644 (file)
<p> </p>
<table summary="" width="100%" class="contentboxb" cellspacing=0>
<tr>
- <td>
+ <td style='width:40px'>
<b>{t}No.{/t}</b>
</td>
- <td>
+ <td style='width:200px'>
<b>{t}Mac address{/t}</b>
</td>
- <td>
+ <td>
+ </td>
+ <td style='width:40%;'>
<b>{t}Object group{/t}</b>
</td>
- <td style='text-align:right'>
+ <td style='text-align:right ; width:20%;'>
<b>{t}Options{/t}</b>
</td>
</tr>
<td>
{$key+1}
</td>
+
+ {if !$contents.$key.VALID_MAC}
+ <td style='background-color: #FF0000;' >
+ {else}
+ <td>
+ {/if}
+ <input name='mac_{$key}' type='text' value='{$contents.$key.MAC}' style='width:200px'>
+ </td>
<td>
- <input name='mac_{$key}' type='text' value='{$contents.$key.MAC}'>
</td>
<td>
<select name='og_{$key}' title='{t}Select object group{/t}'>
<td>
-
</td>
+ <td>
+ -
+ </td>
<td style='text-align:right'>
<input type='submit' name='add_new_entry' value='{t}New entry{/t}'>
</td>