CloneSyncRuleForm: show a meaningful message

This commit is contained in:
Thomas Gelf 2018-06-12 21:45:29 +02:00
parent 6325798fca
commit 1bc77ad7c6
1 changed files with 1 additions and 1 deletions
library/Director/Web/Form

View File

@ -53,7 +53,7 @@ class CloneSyncRuleForm extends Form
$newName = $this->getValue('rule_name'); $newName = $this->getValue('rule_name');
$export->rule_name = $newName; $export->rule_name = $newName;
if (SyncRule::existsWithName($newName, $this->rule->getConnection())) { if (SyncRule::existsWithName($newName, $this->rule->getConnection())) {
$this->getElement('rule_name')->addMessage('Do no'); $this->getElement('rule_name')->addMessage('Name already exists');
} }
$this->newRule = SyncRule::import($export, $this->getTargetDb()); $this->newRule = SyncRule::import($export, $this->getTargetDb());
$this->newRule->store(); $this->newRule->store();