-17 Removals
+15 Additions

Created by:phpboost

1<script> 1<script>
2<!-- 2<!--
3var ContactFormFieldRecipientsPossibleValues = function(){ 3var ContactFormFieldRecipientsPossibleValues = function(){
4 this.integer = {NBR_FIELDS}; 4 this.integer = {NBR_FIELDS};
5 this.id_input = ${escapejs(HTML_ID)}; 5 this.id_input = ${escapejs(HTML_ID)};
6 this.max_input = {MAX_INPUT}; 6 this.max_input = {MAX_INPUT};
7}; 7};
8 8
9ContactFormFieldRecipientsPossibleValues.prototype = { 9ContactFormFieldRecipientsPossibleValues.prototype = {
10 add : function () { 10 add : function () {
11 if (this.integer <= this.max_input) { 11 if (this.integer <= this.max_input) {
12 var id = this.id_input + '_' + this.integer; 12 var id = this.id_input + '_' + this.integer;
13 13
14 jQuery('<div/>', {'id' : id}).appendTo('#input_fields_' + this.id_input); 14 jQuery('<div/>', {'id' : id}).appendTo('#input_fields_' + this.id_input);
15 15
16 jQuery('<div/>', {id : 'checkbox_' + this.integer, class: 'form-field-checkbox'}).appendTo('#' + id); 16 jQuery('<div/>', {id : 'checkbox_' + this.integer, class: 'form-field-checkbox-mini possible-values'}).appendTo('#' + id);
17 jQuery('<input/>', {type : 'checkbox', id : 'field_is_default_' + this.id_input + this.integer, name : 'field_is_default_' + this.id_input, value : '1', 'class' : 'per-default'}).appendTo('#checkbox_' + this.integer); 17 jQuery('<input/>', {type : 'checkbox', id : 'field_is_default_' + this.id_input + this.integer, name : 'field_is_default_' + this.id_input, value : '1', 'class' : 'per-default'}).appendTo('#checkbox_' + this.integer);
18 jQuery('<label/>', {for : 'field_is_default_' + this.id_input + this.integer}).appendTo('#checkbox_' + this.integer); 18 jQuery('<label/>', {for : 'field_is_default_' + this.id_input + this.integer}).appendTo('#checkbox_' + this.integer);
19 jQuery('<span/>', {class : 'is-default-title hidden-large-screens'}).html('${LangLoader::get_message('field.possible_values.is_default', 'admin-user-common')}').appendTo('#checkbox_' + this.integer);
20 jQuery('#checkbox_' + this.integer).after(' '); 19 jQuery('#checkbox_' + this.integer).after(' ');
21 20
22 jQuery('<input/>', {type : 'text', id : 'field_name_' + id, name : 'field_name_' + id, required : "required", placeholder : '{@field.name}'}).appendTo('#' + id); 21 jQuery('<input/>', {type : 'text', id : 'field_name_' + id, name : 'field_name_' + id, required : "required", placeholder : '{@field.name}'}).appendTo('#' + id);
23 jQuery('#' + id).append(' '); 22 jQuery('#' + id).append(' ');
24 23
25 jQuery('<input/>', {type : 'email', id : 'field_email_' + id, name : 'field_email_' + id, placeholder : "${LangLoader::get_message('field.possible_values.email', 'common', 'contact')}", required : "required", multiple : "multiple"}).appendTo('#' + id); 24 jQuery('<input/>', {type : 'email', id : 'field_email_' + id, name : 'field_email_' + id, placeholder : "${LangLoader::get_message('field.possible_values.email', 'common', 'contact')}", required : "required", multiple : "multiple"}).appendTo('#' + id);
26 jQuery('#' + id).append(' '); 25 jQuery('#' + id).append(' ');
27 26
28 jQuery('<a/>', {href : 'javascript:ContactFormFieldRecipientsPossibleValues.delete('+ this.integer +');', 'title' : "${LangLoader::get_message('delete', 'common')}"}).html('<i class="fa fa-delete"></i>').appendTo('#' + id); 27 jQuery('<a/>', {href : 'javascript:ContactFormFieldRecipientsPossibleValues.delete('+ this.integer +');', 'aria-label' : "${LangLoader::get_message('delete', 'common')}"}).html('<i class="fa fa-delete" aria-hidden="true" title="' + ${escapejs(LangLoader::get_message('delete', 'common'))} + '"></i>').appendTo('#' + id);
29 28
30 this.integer++; 29 this.integer++;
31 } 30 }
32 if (this.integer == this.max_input) { 31 if (this.integer == this.max_input) {
33 jQuery('#add-' + this.id_input).hide(); 32 jQuery('#add-' + this.id_input).hide();
34 } 33 }
35 }, 34 },
36 delete : function (id) { 35 delete : function (id) {
37 var id = this.id_input + '_' + id; 36 var id = this.id_input + '_' + id;
38 jQuery('#' + id).remove(); 37 jQuery('#' + id).remove();
39 this.integer--; 38 this.integer--;
40 jQuery('#add-' + this.id_input).show(); 39 jQuery('#add-' + this.id_input).show();
41 }, 40 },
42}; 41};
43 42
44var ContactFormFieldRecipientsPossibleValues = new ContactFormFieldRecipientsPossibleValues(); 43var ContactFormFieldRecipientsPossibleValues = new ContactFormFieldRecipientsPossibleValues();
45--> 44-->
46</script> 45</script>
47 46
48<div id="input_fields_${escape(HTML_ID)}"> 47<div id="input_fields_${escape(HTML_ID)}">
49<span class="text-strong is-default-title hidden-small-screens">{@field.possible_values.is_default}</span> 48<span class="text-strong is-default-title">{@field.possible_values.is_default}</span>
50# START fieldelements # 49# START fieldelements #
51 <div id="${escape(HTML_ID)}_{fieldelements.ID}"> 50 <div id="${escape(HTML_ID)}_{fieldelements.ID}">
52 <div class="form-field-checkbox"> 51 <div class="form-field-checkbox-mini possible-values">
53 <input type="checkbox" name="field_is_default_${escape(HTML_ID)}_{fieldelements.ID}" id="field_is_default_${escape(HTML_ID)}_{fieldelements.ID}" value="1"# IF fieldelements.IS_DEFAULT # checked="checked"# ENDIF # class="per-default"> 52 <input type="checkbox" name="field_is_default_${escape(HTML_ID)}_{fieldelements.ID}" id="field_is_default_${escape(HTML_ID)}_{fieldelements.ID}" value="1"# IF fieldelements.IS_DEFAULT # checked="checked"# ENDIF # class="per-default">
54 <label for="field_is_default_${escape(HTML_ID)}_{fieldelements.ID}"></label> 53 <label for="field_is_default_${escape(HTML_ID)}_{fieldelements.ID}"></label>
55 <span class="is-default-title hidden-large-screens">{@field.possible_values.is_default}</span>
56 </div> 54 </div>
57 <input type="text" name="field_name_${escape(HTML_ID)}_{fieldelements.ID}" id="field_name_${escape(HTML_ID)}_{fieldelements.ID}" value="{fieldelements.NAME}" placeholder="{@field.name}"> 55 <input type="text" name="field_name_${escape(HTML_ID)}_{fieldelements.ID}" id="field_name_${escape(HTML_ID)}_{fieldelements.ID}" value="{fieldelements.NAME}" placeholder="{@field.name}">
58 <input type="email" name="field_email_${escape(HTML_ID)}_{fieldelements.ID}" id="field_email_${escape(HTML_ID)}_{fieldelements.ID}" value="{fieldelements.EMAIL}" placeholder="${LangLoader::get_message('field.possible_values.email', 'common', 'contact')}" multiple="multiple"# IF NOT fieldelements.C_DELETABLE # disabled="disabled"# ENDIF #> 56 <input type="email" name="field_email_${escape(HTML_ID)}_{fieldelements.ID}" id="field_email_${escape(HTML_ID)}_{fieldelements.ID}" value="{fieldelements.EMAIL}" placeholder="${LangLoader::get_message('field.possible_values.email', 'common', 'contact')}" multiple="multiple"# IF NOT fieldelements.C_DELETABLE # disabled="disabled"# ENDIF #>
59 # IF fieldelements.C_DELETABLE #<a href="javascript:ContactFormFieldRecipientsPossibleValues.delete({fieldelements.ID});" title="${LangLoader::get_message('delete', 'common')}" data-confirmation="delete-element"><i class="fa fa-delete"></i></a># ENDIF # 57 # IF fieldelements.C_DELETABLE #<a href="javascript:ContactFormFieldRecipientsPossibleValues.delete({fieldelements.ID});" aria-label="${LangLoader::get_message('delete', 'common')}" data-confirmation="delete-element"><i class="fa fa-delete" aria-hidden="true" title="${LangLoader::get_message('delete', 'common')}"></i></a># ENDIF #
60 </div> 58 </div>
61# END fieldelements # 59# END fieldelements #
62</div> 60</div>
63<a href="javascript:ContactFormFieldRecipientsPossibleValues.add();" id="add-${escape(HTML_ID)}" class="form-field-checkbox-more-value" title="${LangLoader::get_message('add', 'common')}"><i class="fa fa-plus"></i></a> 61<a href="javascript:ContactFormFieldRecipientsPossibleValues.add();" id="add-${escape(HTML_ID)}" class="form-field-checkbox-more-value" aria-label="${LangLoader::get_message('add', 'common')}"><i class="fa fa-plus" aria-hidden="true" title="${LangLoader::get_message('add', 'common')}"></i></a>
Editor
Original Text
Changed Text
Recommended videos