diff --git a/plugins/admin/applications/class_applicationParameters.inc b/plugins/admin/applications/class_applicationParameters.inc
index 12e055a77083a36f1d51d95e6181fa2c9c7a280b..426bbf190dbc186b959cff38298291b332907d54 100644 (file)
$this->option_name[]= "";
$this->option_value[]= "";
}
+
+ $mode= "";
+ if (chkacl($this->acl, "create") != ""){
+ $mode= "disabled";
+ }
+
$table= "<table summary=\"\"><tr><td>"._("Variable")."</td><td>"._("Default value")."</td><td></td></tr>";
if (count ($this->option_name)){
for ($i= 0; $i < count($this->option_name); $i++){
$table.="<tr><td><input name=\"option$i\" size=25 maxlength=50 ".
- "value=\"".$this->option_name[$i]."\"></td><td><input name=\"value$i\" ".
- "size=60 maxlength=250 value=\"".$this->option_value[$i]."\"><br></td><td>".
+ "value=\"".$this->option_name[$i]."\" $mode></td><td><input name=\"value$i\" ".
+ "size=60 maxlength=250 value=\"".$this->option_value[$i]."\" $mode><br></td><td>".
"<input type=\"submit\" name=\"remove$i\" value=\"".
- _("Remove")."\"></td></tr>";
+ _("Remove")."\" $mode></td></tr>";
}
}
$table.= "</table>";
- $table.="<input type=\"submit\" name=\"add_option\" value=\""._("Add option")."\">";
+
+ if ($mode == ""){
+ $table.="<input type=\"submit\" name=\"add_option\" value=\""._("Add option")."\">";
+ }
/* Show main page */
$smarty= get_smarty();
@DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__,
$this->attributes, "Save");
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Removing application parameters failed"));
/* Optionally execute a command after we're done */
$this->handle_post_events('remove');
@DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__,
$this->attributes, "Save");
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving applications parameters failed"));
/* Optionally execute a command after we're done */
$this->handle_post_events('modify');