index 3a7e455e04ec40b4096785692bfde0700b3bdde4..c73d2e886a54b9820edeac61c0aa99266349e588 100644 (file)
var $FAIscript = "";
var $description = "";
var $status = "new";
+
+ var $FAIstate = "";
function faiHookEntry ($config, $dn= NULL,$object=false)
{
$oname = $name;
$this->$oname=$value;
}
+
+ if(isset($this->attrs['FAIstate'][0])){
+ $this->FAIstate = $this->attrs['FAIstate'][0];
+ }
+
}elseif(is_array($object)){
if(count($object)){
$this->orig_cn= $object['cn'];
}
}
+ /* Create download button*/
+ if($this->dn != "new"){
+ $smarty->assign("DownMe","<a href='getFAIscript.php?id=".base64_encode($this->dn)."'>
+ <input type='button' value='"._("Download")."'>
+ </a>");
+ }else{
+ $smarty->assign("DownMe","");
+ }
+
$used_tasks = $this->parent->getUsedFAItask($this->cn);
$tasks = $this->tasks;
foreach($this->tasks as $id => $task){
}
}
+ foreach($this->attributes as $attr){
+ if(($this->FAIstate == "freeze") || (chkacl($this->acl,$attr)!= "")){
+ $smarty->assign($attr."ACL"," disabled ");
+ }else{
+ $smarty->assign($attr."ACL"," ");
+ }
+ }
+
$display.= $smarty->fetch(get_template_path('faiHookEntry.tpl', TRUE));
return($display);
}
/* Save data to object */
function save_object()
{
- if(isset($_POST['SubObjectFormSubmitted'])){
+ if((isset($_POST['SubObjectFormSubmitted'])) && ($this->FAIstate != "freeze")){
foreach($this->attributes as $attrs){
if(isset($_POST[$attrs])){
$this->$attrs = $_POST[$attrs];
/* Check supplied data */
function check()
{
- $message= array();
+ /* Call common method to give check the hook */
+ $message= plugin::check();
+
if(empty($this->FAIscript)) {
$message[]=_("Please enter a value for script.");
}