summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c299277)
raw | patch | inline | side by side (parent: c299277)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Oct 2005 09:01:06 +0000 (09:01 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Oct 2005 09:01:06 +0000 (09:01 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1478 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/gofon/phoneaccount/class_phoneAccount.inc | patch | blob | history | |
plugins/gofon/phoneaccount/generic.tpl | patch | blob | history |
diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc
index 2a862b040f1eeb33610ffd79b98e3e156d80222f..ca9520191afd3d6bdd6f3f0509f2ad7bf6a0ea2e 100644 (file)
var $hardware_list = array();
var $used_hardware = array();
var $goFonMacro = "";
- var $macro = 0; // Selected Macro
+ var $macro = 0; // Selected Macroi
+ var $lastmacro = "";
var $macros = array(); // List of macros for smarty select box
var $macroarray = array(); // All needed macro informations
var $macrostillavailable = false;
}
}
}
+ $this->lastmacro=$this->macro;
@mysql_close($r_con) ;
}
$macrotab ="<table summary=\""._("Parameter")."\">";
/* for every single parameter-> display textfile,combo, or true false switch*/
+ foreach($this->phoneNumbers as $phonenum){
+ $tmp[] = $phonenum;
+ }
- /* Automatic fill out */
- if(isset($_POST['fillout'])){
-
- foreach($this->phoneNumbers as $phonenum){
- $tmp[] = $phonenum;
- }
-
+
+
+ if($this->macro != $this->lastmacro){
/* Go through all params */
foreach($this->macroarray[$this->macro] as $key => $paras){
$string = $paras['default'];
$string=preg_replace("/%uid/i",$this->uid,$string);
-
+
if(isset($this->cn)){
$string=preg_replace("/%cn/i",$this->cn,$string);
}
$smarty->assign ("hardware_list", $hl);
/* Show main page */
-
+ $this->lastmacro = $this->macro;
$display.= $smarty->fetch(get_template_path('generic.tpl', TRUE, dirname(__FILE__)));
return($display);
}
index 382b55f72e97efbe5f46402473c2827817ef74f3..43ad90d25dd87db669a9c8cc952186698c24a1c9 100644 (file)
<option disabled> </option>
</select>
<input type="submit" name="refresh" value="{t}Refresh{/t}" {$goFonMacroACL}>
- <input type="submit" name="fillout" value="{t}Complete{/t}" {$goFonMacroACL}>
</td>
</tr>
</table>