(bug #4052) fix mandatory field/subfield deletion

this fix the way to delete repeatable mandatory fields, the minus char is now shown only on repeatable fields, even if they are mandatory or not.
If the last field is mandatory it won't be deleted.
This commit is contained in:
Nahuel ANGELINETTI 2010-01-19 13:50:37 +01:00 committed by Henri-Damien LAURENT
parent 6b88ea88bb
commit 365feb4185

View file

@ -721,10 +721,8 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
<!-- /TMPL_UNLESS -->
<!-- TMPL_IF name="repeatable" -->
<a href="#" tabindex="1" class="buttonPlus" onclick="CloneField('tag_<!-- TMPL_VAR name="tag"-->_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->'); return false;" title="Repeat this Tag">+</a>
<!-- /TMPL_IF -->
<!-- TMPL_UNLESS name="mandatory" -->
<a href="#" tabindex="1" class="buttonMinus" onclick="UnCloneField('tag_<!-- TMPL_VAR name="tag"-->_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->'); return false;" title="Delete this Tag">&#8722;</a>
<!-- /TMPL_UNLESS -->
<!-- /TMPL_IF -->
</div>
@ -761,10 +759,9 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
<!-- TMPL_IF NAME="repeatable" -->
<span class="buttonPlus" onclick="CloneSubfield('subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->')">+</span>
<!-- /TMPL_IF -->
<!-- TMPL_UNLESS NAME="mandatory" -->
<span class="buttonMinus" onclick="UnCloneField('subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->')">&#8722;</span>
<!-- /TMPL_UNLESS -->
<!-- /TMPL_IF -->
</div>
<!-- End of the line -->