suppression du message formulaire (ref #240)

This commit is contained in:
afornerot 2021-04-01 10:53:30 +02:00
parent 1209c90388
commit 3fc0a1b809
2 changed files with 5 additions and 2 deletions

View File

@ -300,7 +300,9 @@ class FileController extends Controller
$urlsource= $fulldirectory."/".$oldname;
$urldestination = $fulldirectory."/".$data["subdirectory"];
if($urlsource!=$urldestination) {
if($fs->exists($urldestination)) {
$form->addError(new FormError('Ce nom existe déjà'));
$this->get('session')->getFlashBag()->clear();
@ -325,7 +327,7 @@ class FileController extends Controller
if($fs->exists($urlsource))
$fs->rename($urlsource,$urldestination,true);
}
$toclose=true;
}
}

View File

@ -46,7 +46,8 @@
$('document').ready(function(){
{% if toclose %}
parent.location.reload();
href=parent.location.href;
parent.location.href=href;
{% endif %}
$("#form_subdirectory").focus();