Commit 5df4afc8 authored by Théo GUILLON's avatar Théo GUILLON
Browse files

Correction : retour à la ligne sur le champ label

parent cde32a53
......@@ -694,7 +694,7 @@ let createForm = function(typeCreateForm) {
'Contenu' +
'<span class="obligatoire"> *</span>' +
'</label>' +
'<textarea class="form-control texteForm" name="content-texte" id="content-texte">' + $(idContainer).find('.ui-selected').find('h5').html() + '</textarea>' +
'<textarea class="form-control texteForm" name="content-texte" id="content-texte">' + $(idContainer).find('.ui-selected').find('h5').text() + '</textarea>' +
'</div>' +
'</div>' +
btnGroupsTrashApplicable
......@@ -1244,7 +1244,12 @@ let createForm = function(typeCreateForm) {
// Attribution les valeurs au champ "Label"
if ($(this).hasClass('texte')) {
$(idContainer).find('.ui-selected').find('h5').html(newContenuField);
let breakTag = (newContenuField || typeof newContenuField === 'undefined') ? '<br ' + '/>' : '<br>'
let test = (newContenuField + '').replace(/(\r\n|\n\r|\r|\n)/g, breakTag + '$1');
console.log(test);
$(idContainer).find('.ui-selected').find('h5').html(test);
// $(idContainer).find('.ui-selected').find('h5').html(newContenuField);
}
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment