Index: extensions/Piwecard/admin/template/admin_configuration.tpl
===================================================================
--- extensions/Piwecard/admin/template/admin_configuration.tpl	(revision 20421)
+++ extensions/Piwecard/admin/template/admin_configuration.tpl	(revision 27594)
@@ -6,4 +6,5 @@
 {combine_script id='colorpicker' load="footer" path='plugins/Piwecard/js/colorpicker/js/colorpicker.js'}
 {combine_css path="plugins/Piwecard/js/colorpicker/css/colorpicker.css"}
+{combine_css path='themes/default/js/plugins/jquery.tokeninput.css'}
 
 {footer_script require="piwecard"}
@@ -136,5 +137,5 @@
 jQuery(document).ready(function() {ldelim}
 	jQuery('select[name="ecard_validity_list"]').tokenInput(
-		[{foreach from=$validity item=validity name=validity}{ldelim}"{$validity|@escape:'javascript'}"{rdelim}{if !$smarty.foreach.validity.last},{/if}{/foreach}],
+		[{foreach from=$validity item=validity_item name=validity}{ldelim}"{$validity_item|@escape:'javascript'}"{rdelim}{if !$smarty.foreach.validity.last},{/if}{/foreach}],
     {ldelim}
 		searchDelay: 0,
@@ -146,5 +147,5 @@
 		animateDropdown: false,
 		preventDuplicates: true,
-		allowCreation: true,
+		allowFreeTagging: true,
 		onAdd:function(item){ldelim}$("<option value=\""+item.name+"\">"+((item.name == '0') ? "{'piwecard_nolimit'|@translate}" : item.name+" {'piwecard_days'|@translate}")+"</option>").appendTo("#ecard_validity_default");{rdelim},
 		onDelete:function(item){ldelim}$("#ecard_validity_default option[value="+item.name+"]").remove();{rdelim},
@@ -170,6 +171,6 @@
 				<span class="ecard_error" id="ecard_validity_list_error" style="{$ecard_errors.validity.style_error_text}">{'piwecard_error'|@translate} {'piwecard_error_validity_list'|@translate}</span>
 				<select id="ecard_validity_list" name="ecard_validity_list">
-					{foreach from=$ecard_validity_list item=ecard_validity_list}
-						<option value="{$ecard_validity_list}">{$ecard_validity_list}</option>
+					{foreach from=$ecard_validity_list item=ecard_validity_item}
+						<option value="{$ecard_validity_item}">{$ecard_validity_item}</option>
 					{/foreach}
 				</select>
@@ -178,6 +179,6 @@
 				{'piwecard_validity_default'|@translate}
 				<select id="ecard_validity_default" name="ecard_validity_default">
-					{foreach from=$ecard_validity item=ecard_validity}
-						<option value="{$ecard_validity.id}" {$ecard_validity.selected}>{$ecard_validity.name}</option>
+					{foreach from=$ecard_validity item=ecard_validity_item}
+						<option value="{$ecard_validity_item.id}" {$ecard_validity_item.selected}>{$ecard_validity_item.name}</option>
 					{/foreach}
 				</select>
@@ -239,6 +240,6 @@
 				</div>
 				<div>
-					{foreach from=$ecard_email_format item=ecard_email_format}
-						<span><input type="checkbox" name="ecard_email_format[{$ecard_email_format.id}]" id="ecard_email_format_{$ecard_email_format.id}" value="{$ecard_email_format.id}" {$ecard_email_format.selected}/><label for="ecard_email_format_{$ecard_email_format.id}"> {$ecard_email_format.language_string|@translate}</label></span>
+					{foreach from=$ecard_email_format item=ecard_email_format_item}
+						<span><input type="checkbox" name="ecard_email_format[{$ecard_email_format_item.id}]" id="ecard_email_format_{$ecard_email_format_item.id}" value="{$ecard_email_format_item.id}" {$ecard_email_format_item.selected}/><label for="ecard_email_format_{$ecard_email_format_item.id}"> {$ecard_email_format_item.language_string|@translate}</label></span>
 					{/foreach}
 				</div>
@@ -247,6 +248,6 @@
 				</div>
 				<div>
-					{foreach from=$ecard_email_format_default item=ecard_email_format_default}
-						<span id="ecard_form_line_default_{$ecard_email_format_default.id}"><input type="radio" name="ecard_email_format_default" id="ecard_email_format_default_{$ecard_email_format_default.id}" value="{$ecard_email_format_default.id}" {$ecard_email_format_default.selected_default}/><label for="ecard_email_format_default_{$ecard_email_format_default.id}"> {$ecard_email_format_default.language_string|@translate}</label></span>
+					{foreach from=$ecard_email_format_default item=ecard_email_format_default_item}
+						<span id="ecard_form_line_default_{$ecard_email_format_default_item.id}"><input type="radio" name="ecard_email_format_default" id="ecard_email_format_default_{$ecard_email_format_default_item.id}" value="{$ecard_email_format_default_item.id}" {$ecard_email_format_default_item.selected_default}/><label for="ecard_email_format_default_{$ecard_email_format_default_item.id}"> {$ecard_email_format_default_item.language_string|@translate}</label></span>
 					{/foreach}
 					<span class="ecard_error" id="ecard_email_format_default_error" style="{$piwecard_errors.email_format_default.style_error_text}">{'piwecard_error'|@translate} {'piwecard_email_format_default_error'|@translate}</span>
