diff --git a/plugins/admin/fai/class_faiScriptEntry.inc b/plugins/admin/fai/class_faiScriptEntry.inc
index f52c123c5671ace45eb057bb540b64450f2ce0f8..617de2612d6d27e72b8d0ec6a1192ccc35c730b9 100644 (file)
var $description = "";
var $status = "new";
+ var $FAIstate = "";
function faiScriptEntry ($config, $dn= NULL,$object=false)
{
$oname = $name;
$this->$oname=$value;
}
+
+ if(isset($this->attrs['FAIstate'][0])){
+ $this->FAIstate = $this->attrs['FAIstate'][0];
+ }
+
}else{
if(is_array($object)&&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)."' target='_blank'>
+ $smarty->assign("DownMe","<a href='getFAIscript.php?id=".base64_encode($this->dn)."'>
<input type='button' value='"._("Download")."'>
</a>");
}else{
for($i =0 ; $i < 100 ; $i++){
$FAIprioritys[$i]=$i;
}
+
+ foreach($this->attributes as $attr){
+ if(($this->FAIstate == "freeze") || (chkacl($this->acl,$attr)!= "")){
+ $smarty->assign($attr."ACL"," disabled ");
+ }else{
+ $smarty->assign($attr."ACL"," ");
+ }
+ }
+
$smarty->assign("FAIprioritys",$FAIprioritys);
$display.= $smarty->fetch(get_template_path('faiScriptEntry.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->cn)){
$message[] = _("Please enter a name.");