summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3961fd0)
raw | patch | inline | side by side (parent: 3961fd0)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 12 Mar 2008 17:14:25 +0000 (17:14 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 12 Mar 2008 17:14:25 +0000 (17:14 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9722 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/applications/class_applicationGeneric.inc | patch | blob | history | |
gosa-plugins/goto/admin/systems/goto/workstation.tpl | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc b/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc
index 198d1114a32d0d16ad5393cd59223382570a4ef3..dffce7a49d032a267829e90e6b1caede90a98206 100644 (file)
this application is still in use.
*/
if(count($found)){
- $objs = "";
- $cnt = 3;
- for($i = 0 ; $i < $cnt ; $i++ ){
- if(isset($found[$i])){
- $objs .= " ".$found[$i].",";
- }
- }
- if(count($found) > $cnt){
- $objs .= "... ";
- }
- $objs = trim($objs,", ");
- print_red(sprintf(_("Can not remove application, it is still in use by these objects: %s."),$objs));
+ msg_dialog::display(_("Error"), sprintf(_("Cannot remove application - it is still in use by these objects: %s"), "<br>".msgPool::buildList($found)), ERROR_DIALOG);
return(FALSE);
}
$ldap->rmDir($this->dn);
new log("remove","application/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
if (!$ldap->success()){
- msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()), ERROR_DIALOG);
}
/* Optionally execute a command after we're done */
unset($og->member[$this->dn]);
$og->save ();
if (!$ldap->success()){
- msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()), ERROR_DIALOG);
}
}
}
if (isset($_FILES['picture_file']['name']) && $_FILES['picture_file']['name'] != ""){
if (!is_uploaded_file($_FILES['picture_file']['tmp_name'])) {
- print_red (_("The specified picture has not been uploaded correctly."));
+ msg_dialog::display(_("Error"), msgPool::incorrectUpload(), ERROR_DIALOG);
}
if (!function_exists("imagick_blob2image")){
/* Load the new uploaded Photo */
if(!$handle = imagick_ReadImage($_FILES['picture_file']['tmp_name'])){
- print_red(_("Can't access uploaded image."));
+ msg_dialog::display(_("Error"), msgPool::incorrectUpload(_("no read permission")), ERROR_DIALOG);
}
/* Resizing image to 147x200 and blur */
if(!imagick_resize($handle,48,48,IMAGICK_FILTER_GAUSSIAN,0)){
- print_red(_("Uploaded image could not be resized, possilby the image magick extension is missing."));
+ msg_dialog::display(_("Error"), msgPool::incorrectUpload(_("cannot resize image")), ERROR_DIALOG);
}
/* Converting image to JPEG */
if(!imagick_convert($handle,"PNG")) {
- print_red(_("Could not convert image to png, possilby the image magick extension is missing."));
+ msg_dialog::display(_("Error"), msgPool::incorrectUpload(_("cannot convert image")), ERROR_DIALOG);
}
if(!imagick_writeimage($handle,$_FILES['picture_file']['tmp_name'])){
- print_red(sprintf(_("Could not save uploaded image to %s."),$_FILES['picture_file']['tmp_name']));
+ msg_dialog::display(_("Error"), msgPool::incorrectUpload(sprintf(_("cannot save image to '%s'"), $_FILES['picture_file']['tmp_name'])), ERROR_DIALOG);
}
imagick_free($handle);
$this->handle_post_events("add");
}
if (!$ldap->success()){
- msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()), ERROR_DIALOG);
}
}
diff --git a/gosa-plugins/goto/admin/systems/goto/workstation.tpl b/gosa-plugins/goto/admin/systems/goto/workstation.tpl
index 1ea980e7698ec9aca367ff5c9cc8a5b91129698e..d9b31dd27074bf0167674b897d79645d13f89aaf 100644 (file)
<table summary="">
<tr>
<td>
-{if $currently_installing}
- <i>{t}System installation in progress, the FAI state cannot be changed right now.{/t}</i>
-{else}
{render acl=$FAIstateACL}
<select size="1" name="saction" title="{t}Select action to execute for this terminal{/t}">
<option> </option>
{/render}
</td>
<td>
+{if $currently_installing}
+{render acl=r}
+ <input type=submit name="action" value="{t}Execute{/t}">
+{/render}
+{else}
{render acl=$FAIstateACL}
<input type=submit name="action" value="{t}Execute{/t}">
{/render}
- </td>
{/if}
+ </td>
</tr>
</table>
{/if}