[-] BO : Do not copy link_rewrite from title if cms already has one

This commit is contained in:
gRoussac
2013-09-12 10:50:04 +02:00
parent 3870388e1c
commit 90091d4f2c
2 changed files with 4 additions and 3 deletions

View File

@@ -110,10 +110,10 @@ class AdminCmsControllerCore extends AdminController
'type' => 'text',
'label' => $this->l('Meta title:'),
'name' => 'meta_title',
'id' => 'name', // for copy2friendlyUrl compatibility
'id' => 'name', // for copyMeta2friendlyURL compatibility
'lang' => true,
'required' => true,
'class' => 'copy2friendlyUrl',
'class' => 'copyMeta2friendlyURL',
'hint' => $this->l('Invalid characters:').' <>;=#{}',
'size' => 50
),

View File

@@ -119,7 +119,8 @@ function copy2friendlyURL()
function copyMeta2friendlyURL()
{
$('#input_link_rewrite_' + id_language).val(str2url($('#name_' + id_language).val().replace(/^[0-9]+\./, ''), 'UTF-8'));
if (!$('input[name="id_cms"]').length)
$('#link_rewrite_' + id_language).val(str2url($('#name_' + id_language).val().replace(/^[0-9]+\./, ''), 'UTF-8'));
}
function updateCurrentText()