BUG 13546 "Creacion de una nueva plantilla sin..." SOLVED
- Creacion de una nueva plantilla sin nombre. - Problema resuelto, cuando se crea una nueva plantilla y no se coloca nada en la caja de texto, al hacer click en el boton "create" le mostrara un mensaje indicando que introduzca un nombre. Cuando se tiene creado varios plantillas y se quiere crear uno que ya existe, se mostrara un mensaje indicando que el file ya existe.
This commit is contained in:
@@ -700,18 +700,11 @@ try {
|
||||
$status = "OK";
|
||||
|
||||
$filename = $_POST["filename"];
|
||||
|
||||
$pathDirectory = PATH_DATA_MAILTEMPLATES . $_REQUEST["pro_uid"] . PATH_SEP;
|
||||
|
||||
if (is_dir($pathDirectory)) {
|
||||
$myDirectory = opendir($pathDirectory);
|
||||
|
||||
while ($myFile = readdir($myDirectory)) {
|
||||
if ($myFile == $filename) {
|
||||
$status = "ERROR";
|
||||
}
|
||||
}
|
||||
|
||||
closedir($myDirectory);
|
||||
if (file_exists($pathDirectory . PATH_SEP . $filename)) {
|
||||
$status = "ERROR";
|
||||
}
|
||||
|
||||
$response["status"] = $status;
|
||||
|
||||
@@ -187,12 +187,12 @@ function saveEmptyFile(){
|
||||
}.extend(this);
|
||||
oRPC.make();
|
||||
} else {
|
||||
new leimnud.module.app.alert().make({label: "The file exists."});
|
||||
new leimnud.module.app.alert().make({label: _("ID_EXISTS_FILES")});
|
||||
}
|
||||
}.extend(this);
|
||||
rpcAjax.make();
|
||||
} else {
|
||||
new leimnud.module.app.alert().make({label: "File name required."});
|
||||
new leimnud.module.app.alert().make({label: _("ID_FILENAME_REQUIRED")});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user