propose un champe vide par défaut

This commit is contained in:
Yannick Francois 2019-03-19 14:09:21 +01:00
parent 50e56a0396
commit 4a6b039fa9
3 changed files with 9 additions and 3 deletions

View File

@ -19,7 +19,7 @@
<section> <section>
<p> <p>
Je m'appelle <input type="text" name="name" id="name" value="Henri" class="nfl-textfield"> Je m'appelle <input type="text" name="name" id="name" value="" class="nfl-textfield">
et le titre de ce sondage et le titre de ce sondage
<select id="type_sondage"> <select id="type_sondage">
<option>classique</option> <option>classique</option>

View File

@ -12,7 +12,7 @@ const debugStorage = () => {
const useTextInsteadOfInputFor = (textField) => { const useTextInsteadOfInputFor = (textField) => {
let $name = $(`#${textField.name}`); let $name = $(`#${textField.name}`);
$name.outerHTML = `<span id="${textField.name}" class="toggle-field">${$name.getAttribute('value')}</span>`; $name.outerHTML = `<span id="${textField.name}" class="champ-vide-long toggle-field">${$name.getAttribute('value')}</span>`;
return textField; return textField;
} }

View File

@ -43,6 +43,12 @@ button:hover,
text-decoration: none; text-decoration: none;
} }
.champ-vide-long {
min-width: 100px;
display: inline-block;
height: 20px;
}
.btn.btn-primary { .btn.btn-primary {
color: #fff; color: #fff;
background-color: #4a90e2; background-color: #4a90e2;
@ -192,4 +198,4 @@ a {
} }
a:hover { a:hover {
color: #4a90e2; color: #4a90e2;
} }