Index: branches/1.0.x/elements/filters.elm.tpl =================================================================== --- branches/1.0.x/elements/filters.elm.tpl (revision 16608) +++ branches/1.0.x/elements/filters.elm.tpl (revision 16609) @@ -1,209 +1,209 @@ <inp2:m_DefineElement name="filter_text_block" PrefixSpecial="item-filter" filter_type="text" is_list="0"> <input type="text" name="<inp2:FilterInputName/>" id="<inp2:FilterInputName/>" value="<inp2:FilterField/>"/> </inp2:m_DefineElement> <inp2:m_DefineElement name="filter_select_block" PrefixSpecial="item-filter" filter_type="select" is_list="0"> <select name="<inp2:FilterInputName/>" id="<inp2:FilterInputName/>"> </select> </inp2:m_DefineElement> <inp2:m_DefineElement name="filter_radio_element"> <dt<inp2:m_if check="m_Param" name="selected"> class="active"</inp2:m_if>> <input type="radio"<inp2:m_if check="m_Param" name="selected"> checked</inp2:m_if> name="<inp2:FilterInputName/>" id="<inp2:FilterInputName/>_<inp2:m_param name='key'/>" value="<inp2:m_param name='key'/>"/> <label for="<inp2:FilterInputName/>_<inp2:m_param name='key'/>"><inp2:m_Param name="title"/></label> </dt> <dd<inp2:m_if check="m_Param" name="selected"> class="active"</inp2:m_if>>(<span id="filter-counter[<inp2:m_Param name='filter_field'/>][<inp2:m_param name='key'/>]" class="filter-counter"><inp2:m_Param name="count"/></span>)</dd> </inp2:m_DefineElement> <inp2:m_DefineElement name="filter_radio_block" PrefixSpecial="item-filter" filter_type="radio" is_list="0"> <dl class="manufacturer"> <inp2:ListFilterOptions render_as="filter_radio_element" pass_params="1"/> </dl> <div class="clear"></div> </inp2:m_DefineElement> <inp2:m_DefineElement name="filter_checkbox_element" form_id=""> <dt<inp2:m_if check="m_Param" name="selected"> class="active"</inp2:m_if>> <input type="checkbox"<inp2:m_if check="m_Param" name="selected"> checked</inp2:m_if> id="<inp2:FilterInputName/>_<inp2:m_param name='key'/>" value="<inp2:m_param name='key'/>"/> <label for="<inp2:FilterInputName/>_<inp2:m_param name='key'/>"><inp2:m_Param name="title"/></label> </dt> <dd<inp2:m_if check="m_Param" name="selected"> class="active"</inp2:m_if>>(<span id="filter-counter[<inp2:m_Param name='filter_field'/>][<inp2:m_param name='key'/>]" class="filter-counter"><inp2:m_Param name="count"/></span>)</dd> </inp2:m_DefineElement> <inp2:m_DefineElement name="filter_checkbox_block" PrefixSpecial="item-filter" filter_type="checkbox" is_list="0"> <dl class="manufacturer"> <inp2:ListFilterOptions render_as="filter_checkbox_element" form_id="filter-form-{$filter_field}" pass_params="1"/> </dl> <div class="clear"></div> <input type="hidden" name="<inp2:FilterInputName/>" id="<inp2:FilterInputName/>" value="<inp2:FilterField/>"/> </inp2:m_DefineElement> <inp2:m_DefineElement name="filter_range_value_element"> <li> <!--##<inp2:m_param name='key'/>; ##--><inp2:m_Param name="title"/> </li> </inp2:m_DefineElement> <inp2:m_DefineElement name="filter_range_count_element"> <li>(<span id="filter-counter[<inp2:m_Param name='filter_field'/>][<inp2:m_param name='key'/>]" class="filter-counter"><inp2:m_Param name="count"/></span>)</li> </inp2:m_DefineElement> <inp2:m_DefineElement name="filter_range_block" PrefixSpecial="item-filter" filter_type="range" is_list="0"> <div style="text-align: center; margin-bottom: 10px;"> <input type="text" class="field" id="<inp2:FilterInputName/>_start" style="width: 35px;" value=""/> - <input type="text" class="field" id="<inp2:FilterInputName/>_end" style="width: 35px;" value=""/> <a href="#" class="grey-but" id="<inp2:FilterInputName/>_apply_btn"> <span>Apply</span> </a> </div> <div class="range-block"> <ul class="range"> <inp2:ListFilterOptions render_as="filter_range_value_element" type="value" currency="selected" pass_params="1"/> </ul> <div class="slider-vertical" id="<inp2:FilterInputName/>_slider" style="height:<inp2:SliderHeight factor="26"/>px;"></div> <ul class="range2"> <inp2:ListFilterOptions render_as="filter_range_count_element" type="count" pass_params="1"/> </ul> <div class="clear"></div> </div> <script type="text/javascript"> $(document).ready( function() { var $slider_options = { - min: <inp2:m_Get name="min_range_value"/>, - max: <inp2:m_Get name="max_range_value"/>, - step: <inp2:m_Get name="range_step"/> + min: <inp2:m_Get name="min_range_value" js_escape="1"/>, + max: <inp2:m_Get name="max_range_value" js_escape="1"/>, + step: <inp2:m_Get name="range_step" js_escape="1"/> }, $options = { orientation: 'vertical', range: true, - values: [<inp2:m_Get name="selected_from_range"/>, <inp2:m_Get name="selected_to_range"/>], + values: [<inp2:m_Get name="selected_from_range" js_escape="1"/>, <inp2:m_Get name="selected_to_range" js_escape="1"/>], change: function(event, ui) { // jQuery UI slider has inverted range - fix that here var $selected_range = ListManager.invertRange($slider_options, ui.values[0], ui.values[1]); if ( $selected_range[0] == $slider_options.min && $selected_range[1] == $slider_options.max ) { $('#' + jq('<inp2:FilterInputName/>')).val(''); } else { $('#' + jq('<inp2:FilterInputName/>')).val($selected_range[0] + '-' + $selected_range[1]); } $( '#' + jq('<inp2:FilterInputName/>_start') ).val($selected_range[0]); $( '#' + jq('<inp2:FilterInputName/>_end') ).val($selected_range[1]); ListManager.updateFilterParams('<inp2:m_Param name="filter_field"/>'); } }, $values = ListManager.invertRange($slider_options, $options.values[0], $options.values[1]); $options.values[0] = $values[0]; $options.values[1] = $values[1]; $.extend($options, $slider_options); $( '#' + jq('<inp2:FilterInputName/>_start') ).val($slider_options.min); $( '#' + jq('<inp2:FilterInputName/>_end') ).val($slider_options.max); $( '#' + jq('<inp2:FilterInputName/>_slider') ).slider($options); $( '#' + jq('<inp2:FilterInputName/>_apply_btn')).click( function ($e) { var $remainder = 0, $range_from = parseFloat( $( '#' + jq('<inp2:FilterInputName/>_start') ).val() ), $range_to = parseFloat( $( '#' + jq('<inp2:FilterInputName/>_end') ).val() ); // ensure entered range is valid if ( isNaN($range_from) || $range_from < $slider_options.min ) { $range_from = $slider_options.min; } if ( isNaN($range_to) || $range_to > $slider_options.max ) { $range_to = $slider_options.max; } // changed entered range to exactly match range steps on a slider $remainder = $range_from % $slider_options.step; if ( $remainder > 0 ) { $range_from -= $remainder; } $remainder = $range_to % $slider_options.step; if ( $remainder > 0 ) { $range_to += $slider_options.step - $remainder; } // set new values to the slider var $selected_range = ListManager.invertRange($slider_options, $range_from, $range_to); $( '#' + jq('<inp2:FilterInputName/>_slider') ).slider('option', 'values', $selected_range); return false; } ); } ); - ListManager.setFilterParams('<inp2:m_Param name="filter_field"/>', {max_value: <inp2:m_Get name="max_range_value"/>}); + ListManager.setFilterParams('<inp2:m_Param name="filter_field"/>', {max_value: <inp2:m_Get name="max_range_value" js_escape="1"/>}); </script> <input type="hidden" name="<inp2:FilterInputName/>" id="<inp2:FilterInputName/>" value="<inp2:FilterField/>"/> </inp2:m_DefineElement> <inp2:m_DefineElement name="filter_element" PrefixSpecial="item-filter" prefix="" filter_field="" filter_type="" is_list="0"> <inp2:m_IFDataExists> <inp2:m_ifnot check="m_Param" name="is_list"> <inp2:ReloadItem prefix="$prefix" field="$filter_field"/> </inp2:m_ifnot> <form action="<inp2:m_FormAction/>" id="filter-form-<inp2:m_Param name='filter_field'/>" method="post" class="filter-form" filter_field="<inp2:m_Param name='filter_field'/>" filter_type="<inp2:m_Param name='filter_type'/>"> <script type="text/javascript"> var $filter_params = {}; </script> <div class="block alt-block"> <h2> <em class="filter-header"> Filter by <inp2:m_Phrase name="lu_fld_{$filter_field}"/> </em> <a href="#" class="reset-filter" style="display: none;"> <img src="<inp2:m_TemplatesBase/>img/btn_reset_filter.png" width="18" height="18" alt="Reset Filter"/> </a> </h2> <div class="block-content"> <inp2:m_RenderElement name="filter_{$filter_type}_block" pass_params="1"/> </div> </div> <script type="text/javascript"> $(document).ready( function () { ListManager.registerFilter('<inp2:m_Param name="filter_field"/>'); } ); </script> </form> </inp2:m_IFDataExists> </inp2:m_DefineElement> <inp2:m_DefineElement name="filter_counter_element"> '<inp2:m_Param name="key"/>': <inp2:m_Param name="count"/><inp2:m_ifnot check="m_Param" name="is_last">,</inp2:m_ifnot> </inp2:m_DefineElement> <inp2:m_DefineElement name="filter_counters_element"> ListManager.replaceCounters('<inp2:m_Param name="filter_field"/>', {<inp2:ListFilterOptions render_as="filter_counter_element" type="count" pass_params="1" strip_nl="2"/>}); </inp2:m_DefineElement> <inp2:m_DefineElement name="used_filter_element"> ListManager.replaceFilter('filter-form-<inp2:m_Param name="filter_field"/>', '<inp2:m_RenderElement name="filter_element" pass_params="1" js_escape="1"/>'); -</inp2:m_DefineElement> \ No newline at end of file +</inp2:m_DefineElement> Index: branches/1.0.x/elements/side_boxes/compare.elm.tpl =================================================================== --- branches/1.0.x/elements/side_boxes/compare.elm.tpl (revision 16608) +++ branches/1.0.x/elements/side_boxes/compare.elm.tpl (revision 16609) @@ -1,80 +1,80 @@ <inp2:m_if check="m_Get" name="ajax" equals_to="yes"> <inp2:m_NoDebug/> </inp2:m_if> <inp2:m_Include template="elements/content_boxes.elm" strip_nl="2"/> <inp2:m_Include template="elements/product_elements.elm" strip_nl="2"/> <inp2:p_InitList list_name="compare_products" types="compare" parent_cat_id="any"/> <div class="block no-border-bottom" id="compare-products-sidebox"<inp2:m_ifnot check="p_TotalRecords" list_name="compare_products"> style="display: none;"</inp2:m_ifnot>> <h2> <em>Comparing Products (<inp2:p_TotalRecords list_name="compare_products"/>)</em> <span class="bullet"></span> </h2> <div class="good-item border-radius-bottom comparing-items"> <inp2:p_ListProducts list_name="compare_products" render_as="compare_product_element" no_table="1"/> <p class="form buttons"> <input type="button" value="Compare" id="compare-products-btn" class="green-button" /> <input type="button" value="Clear" id="cancel-compare-btn" class="grey-button" /> </p> </div> </div> <script type="text/javascript"> $(document).ready( function () { $('.addtocart', '#compare-products-sidebox').click(add_to_cart_handler); $('#compare-products-btn').click( function () { redirect('<inp2:p_CompareLink template="products/compare" js_escape="1"/>'); } ); $('#cancel-compare-btn').click( function () { compare_product(0, 'OnCancelCompare'); } ); $('.button-delete', '#compare-products-sidebox').click( function ($e) { compare_product($(this).attr('product_id'), false); return false; } ); <inp2:m_if check="m_Get" name="result"> - var $compare_checkbox = $(".compare-checkbox[value='<inp2:m_Get name="p_id"/>']", '#products'); + var $compare_checkbox = $(".compare-checkbox[value='<inp2:m_Get name="p_id" js_escape="1"/>']", '#products'); <inp2:m_if check="m_Get" name="result" equals_to="added"> create_tooltip($compare_checkbox, 'Added to Comparison', 'formSuccess'); </inp2:m_if> <inp2:m_if check="m_Get" name="result" equals_to="removed"> create_tooltip($compare_checkbox, 'Removed from Comparison', 'formNeutral'); $compare_checkbox.prop('checked', false); </inp2:m_if> <inp2:m_if check="m_Get" name="result" equals_to="error"> create_tooltip($compare_checkbox, 'Up to <inp2:m_GetConfig name="MaxCompareProducts"/> products can be compared', 'formError'); $compare_checkbox.prop('checked', false); </inp2:m_if> <inp2:m_if check="m_Get" name="result" equals_to="all_removed"> $(".compare-checkbox:checked", '#products') .each( function () { var $me = $(this); create_tooltip($me, 'Removed from Comparison', 'formNeutral'); $me.prop('checked', false); } ); </inp2:m_if> </inp2:m_if> } ); -</script> \ No newline at end of file +</script> Index: branches/1.0.x/elements/forms.elm.tpl =================================================================== --- branches/1.0.x/elements/forms.elm.tpl (revision 16608) +++ branches/1.0.x/elements/forms.elm.tpl (revision 16609) @@ -1,496 +1,496 @@ <inp2:m_Set tab_index="1"/> <inp2:m_DefineElement name="subsection"> <tr class="subsection"> <td colspan="2"> <h2><inp2:m_Phrase label="$title"/></h2> </td> </tr> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_edit_buttons" style=""> <p class="buttons" style="<inp2:m_Param name='style'/>"> <inp2:m_Param name="content"/> </p> <div class="clear"></div> </inp2:m_DefineElement> <inp2:m_DefineElement name="form_row_full" is_last="0"> <tr class="field-row<inp2:m_if check='m_Param' name='is_last'>-last</inp2:m_if>"> <td colspan="2"> <inp2:m_Param name="content"/> </td> </tr> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_edit_field_separator" no_editing="1" is_last="0"> <inp2:m_if check="m_ParamEquals" name="is_last" value="0"> <!--<hr/>--> </inp2:m_if> </inp2:m_DefineElement> <inp2:m_DefineElement name="form_row" row_class='' prefix="" field="" error_field_suffix="" title="lu_fld_{$field}" hint_label="" is_last="0" field_type="" error_position="top" show_length="1"> <inp2:m_inc param="tab_index" by="1"/> <p class="<inp2:m_Param name='row_class'/><inp2:m_if check='{$prefix}_HasError' field='{$field}{$error_field_suffix}'> error</inp2:m_if>"> <label class="field-title" for="<inp2:{$prefix}_InputName field='{$field}{$error_field_suffix}'/>"> <inp2:m_Phrase label="$title"/><inp2:m_if check="{$prefix}_IsRequired" field="{$field}{$error_field_suffix}"> <span class="star">*</span></inp2:m_if> <inp2:m_if check="m_Param" name="error_position" equals_to="top"> <inp2:m_RenderElement name="error_msg_container" pass_params="1"/> </inp2:m_if> </label> <span class="field-content" id="<inp2:{$prefix}_InputName field='$field'/>_field_cell"> <inp2:m_Param name="content" pass_params="1"/> </span> <inp2:m_if check="{$prefix}_FieldHintLabel" title_label="$title" direct_label="$hint_label"> <a href="#"><img src="<inp2:m_TemplatesBase/>img/icon-help.png" width="16" height="16" class="help-icon" title="<inp2:$prefix_FieldHintLabel title_label='$title' direct_label='$hint_label' html_escape='1'/>" alt=""/></a> </inp2:m_if> <script type="text/javascript"> - FormManager.registerField('<inp2:m_Param name="prefix"/>', '<inp2:m_if check="{$prefix}_FieldOption" field="$field" option="formatter" equals_to="kMultiLanguage">l<inp2:m_Get name="m_lang"/>_</inp2:m_if><inp2:m_Param name="field"/>', undefined, '<inp2:m_Param name="field_type"/>'); + FormManager.registerField('<inp2:m_Param name="prefix"/>', '<inp2:m_if check="{$prefix}_FieldOption" field="$field" option="formatter" equals_to="kMultiLanguage">l<inp2:m_Get name="m_lang" js_escape="1"/>_</inp2:m_if><inp2:m_Param name="field"/>', undefined, '<inp2:m_Param name="field_type"/>'); </script> </p> </inp2:m_DefineElement> <inp2:m_DefineElement name="error_msg_container" style="" error_field_suffix=""> <em class="red" id="<inp2:{$prefix}_InputName field='$field'/>_status_cell" style="<inp2:m_Param name='style'/>"> <inp2:{$prefix}_Error field="{$field}{$error_field_suffix}"/> </em> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_label" as_label="" title="lu_fld_{$field}" currency="" show_length="0" field_type="label" no_editing="1"> <inp2:m_RenderElement design="form_row" pass_params="1"> <inp2:{$prefix}_Field field="$field" as_label="$as_label" currency="$currency"/> </inp2:m_RenderElement> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_edit_box" style="" title="lu_fld_{$field}" field_type="text" hint_label="" no_editing="1"> <inp2:m_RenderElement design="form_row" pass_params="1"> <input type="text" class="field" <inp2:m_if check="{$prefix}_FieldHintLabel" title_label="$title" direct_label="$hint_label"> title="<inp2:$prefix_FieldHintLabel title_label='$title' direct_label='$hint_label' html_escape='1'/>" </inp2:m_if/> name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field'/>" tabindex="<inp2:m_get param='tab_index'/>" <inp2:m_if check="{$prefix}_FieldOption" field="$field" option="max_len"> maxlength="<inp2:$prefix_FieldOption field='$field' option='max_len'/>" </inp2:m_if> style="<inp2:m_param name='style'/>" /> </inp2:m_RenderElement> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_edit_rating" style="" title="lu_fld_{$field}" field_type="text" hint_label="" no_editing="1"> <inp2:m_RenderElement design="form_row" pass_params="1"> <img src="<inp2:m_TemplatesBase/>img/star-small.jpg" width="18" height="18" alt="" /><img src="<inp2:m_TemplatesBase/>img/star-small.jpg" width="18" height="18" alt="" /><img src="<inp2:m_TemplatesBase/>img/star-small.jpg" width="18" height="18" alt="" /><img src="<inp2:m_TemplatesBase/>img/star-small.jpg" width="18" height="18" alt="" /><img src="<inp2:m_TemplatesBase/>img/star-small.jpg" width="18" height="18" alt="" /> </inp2:m_RenderElement> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_edit_address" style="" title="lu_fld_{$field}" field_type="text" hint_label="" no_editing="1"> <inp2:m_RenderElement design="form_row" pass_params="1"> <input type="text" class="field" <inp2:m_if check="{$prefix}_FieldHintLabel" title_label="$title" direct_label="$hint_label"> title="<inp2:$prefix_FieldHintLabel title_label='$title' direct_label='$hint_label' html_escape='1'/>" </inp2:m_if/> name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field'/>" tabindex="<inp2:m_get param='tab_index'/>" <inp2:m_if check="{$prefix}_FieldOption" field="$field" option="max_len"> maxlength="<inp2:$prefix_FieldOption field='$field' option='max_len'/>" </inp2:m_if> style="<inp2:m_param name='style'/>" /><br/> <input type="text" class="field" <inp2:m_if check="{$prefix}_FieldHintLabel" title_label="$title" direct_label="$hint_label"> title="<inp2:$prefix_FieldHintLabel title_label='$title' direct_label='$hint_label' html_escape='1'/>" </inp2:m_if/> name="<inp2:{$prefix}_InputName field='$field2'/>" id="<inp2:{$prefix}_InputName field='$field2'/>" value="<inp2:{$prefix}_Field field='$field2'/>" tabindex="<inp2:m_get param='tab_index'/>" <inp2:m_if check="{$prefix}_FieldOption" field="$field2" option="max_len"> maxlength="<inp2:$prefix_FieldOption field='$field2' option='max_len'/>" </inp2:m_if> style="<inp2:m_param name='style'/>" /> </inp2:m_RenderElement> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_edit_password_single" style="" title="lu_fld_{$field}" field_type="text" hint_label="" no_editing="1"> <inp2:m_RenderElement design="form_row" pass_params="1"> <input type="password" class="field" <inp2:m_if check="{$prefix}_FieldHintLabel" title_label="$title" direct_label="$hint_label"> title="<inp2:$prefix_FieldHintLabel title_label='$title' direct_label='$hint_label' html_escape='1'/>" </inp2:m_if/> name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field'/>" tabindex="<inp2:m_get param='tab_index'/>" <inp2:m_if check="{$prefix}_FieldOption" field="$field" option="max_len"> maxlength="<inp2:$prefix_FieldOption field='$field' option='max_len'/>" </inp2:m_if> style="<inp2:m_param name='style'/>" /> </inp2:m_RenderElement> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_edit_password" title="lu_fld_{$field}" verify_title="lu_fld_Verify{$field}" style="" field_type="text" no_editing="1"> <inp2:m_ifnot check="m_Get" name="password_js_included"> <script src="<inp2:m_Compress files='inc/js/passwordStrengthMeter.js'/>" type="text/javascript"></script> <inp2:m_Set password_js_included="1"/> </inp2:m_ifnot> <div id="password-block" class="password-block"> <inp2:m_RenderElement design="form_row" row_class="pasfield1" error_position="none" pass_params="1"> <input type="password" class="field" <inp2:m_if check="{$prefix}_FieldHintLabel" title_label="$title" direct_label="$hint_label"> title="<inp2:$prefix_FieldHintLabel title_label='$title' direct_label='$hint_label' html_escape='1'/>" </inp2:m_if/> name="<inp2:$prefix_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field name='{$field}_plain'/>" tabindex="<inp2:m_get param='tab_index'/>" style="<inp2:m_param name='style'/>" /> </inp2:m_RenderElement> <inp2:m_RenderElement design="form_row" row_class="pasfield2" field="Verify{$field}" title="$verify_title" error_position="none" pass_params="1"> <input type="password" class="field" <inp2:m_if check="{$prefix}_FieldHintLabel" title_label="$title" direct_label="$hint_label"> title="<inp2:$prefix_FieldHintLabel title_label='$title' direct_label='$hint_label' html_escape='1'/>" </inp2:m_if/> name="<inp2:$prefix_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field name='{$field}_plain'/>" tabindex="<inp2:m_get param='tab_index'/>" style="<inp2:m_param name='style'/>" /> </inp2:m_RenderElement> <div class="clear"></div> <div class="password-strength" id="<inp2:{$prefix}_InputName field='$field'/>_strength">Enter your password</div> <inp2:m_RenderElement name="error_msg_container" style="padding: 0px; display: block;" pass_params="1"/> <inp2:m_RenderElement name="error_msg_container" field="Verify{$field}" style="padding: 0px; display: block;" pass_params="1"/> <script type="text/javascript"> new PasswordStrengthMeter( { inputSelector: '#' + jq('<inp2:{$prefix}_InputName field="$field"/>'), phrases: { 'short': '<inp2:m_Phrase name="lu_PasswordStrengthShort" js_escape="1"/>', 'bad': '<inp2:m_Phrase name="lu_PasswordStrengthBad" js_escape="1"/>', 'good': '<inp2:m_Phrase name="lu_PasswordStrengthGood" js_escape="1"/>', 'strong': '<inp2:m_Phrase name="lu_PasswordStrengthStrong" js_escape="1"/>' } } ); </script> </div> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_edit_upload" title="lu_fld_{$field}" style="" field_type="upload" hint_label="" no_editing="1"> <inp2:m_RenderElement design="form_row" pass_params="1"> <input type="file" class="field" <inp2:m_if check="{$prefix}_FieldHintLabel" title_label="$title" direct_label="$hint_label"> title="<inp2:$prefix_FieldHintLabel title_label='$title' direct_label='$hint_label' html_escape='1'/>" </inp2:m_if/> name="<inp2:{$prefix}_InputName field='$field'/>" tabindex="<inp2:m_get param='tab_index'/>" style="<inp2:m_param name='style'/>" /> <inp2:m_if check="{$prefix}_FieldEquals" name="$field" value="" inverse="inverse"> (<inp2:{$prefix}_Field field="$field"/>) </inp2:m_if> <input type="hidden" name="<inp2:{$prefix}_InputName field="$field"/>[upload]" value="<inp2:{$prefix}_Field field="$field"/>" /> </inp2:m_RenderElement> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_edit_hidden" db=""> <input type="hidden" name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>" value="<inp2:{$prefix}_Field field="$field" db="$db"/>" /> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_edit_date" title="lu_fld_{$field}" style="" no_editing="1" field_type="date" error_field_suffix="_date"> <inp2:m_RenderElement design="form_row" pass_params="1"> <input type="text" class="field" title="<inp2:{$prefix}_Format field='{$field}_date' input_format='1' human='true'/>" name="<inp2:{$prefix}_InputName field="{$field}_date"/>" id="<inp2:{$prefix}_InputName field="{$field}_date"/>" value="<inp2:{$prefix}_Field field="{$field}_date" format="_regional_InputDateFormat"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:{$prefix}_Format field="{$field}_date" input_format="1" edit_size="edit_size"/>" style="<inp2:m_param name="style"/>" datepickerIcon="<inp2:m_TemplatesBase module="In-Portal"/>img/calendar_icon.gif" /> <input type="hidden" name="<inp2:{$prefix}_InputName field="{$field}_time"/>" id="<inp2:{$prefix}_InputName field="{$field}_time" input_format="1"/>" value="" /> <script type="text/javascript"> $( '#' + jq('<inp2:{$prefix}_InputName field="{$field}_date"/>') ).datepicker( { inline: true, dateFormat: get_jq_date_format('<inp2:$prefix_Format name="{$field}_date" input_format="1"/>'), showOn: 'button', buttonImage: '<inp2:m_TemplatesBase/>img/calendar_btn.gif', buttonImageOnly: true, onSelect: function(dateText, inst) { if ( dateText != '' ) { $(this).focus(); } } } ); </script> </inp2:m_RenderElement> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_edit_time" title="lu_fld_{$field}" style="" no_editing="1" field_type="time" error_field_suffix="_time"> <inp2:m_RenderElement design="form_row" pass_params="1"> <input type="text" class="field" title="<inp2:{$prefix}_Format field='{$field}_time' input_format='1' human='true'/>" name="<inp2:{$prefix}_InputName field='{$field}_time'/>" id="<inp2:{$prefix}_InputName field='{$field}_time'/>" value="<inp2:{$prefix}_Field field='{$field}_time' format='_regional_InputTimeFormat'/>" tabindex="<inp2:m_get param='tab_index'/>" size="<inp2:{$prefix}_Format field='{$field}_time' input_format='1' edit_size='edit_size'/>" style="<inp2:m_param name='style'/>"> <input type="hidden" name="<inp2:{$prefix}_InputName field="{$field}_date"/>" id="<inp2:{$prefix}_InputName field="{$field}_date" input_format="1"/>" value="" /> </inp2:m_RenderElement> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_edit_date_time" title="lu_fld_{$field}" style="" field_type="date_time" no_editing="1"> <inp2:m_RenderElement design="form_row" pass_params="1"> <input type="text" class="field" title="<inp2:{$prefix}_Format field='{$field}_date' input_format='1' human='true'/>" name="<inp2:{$prefix}_InputName field="{$field}_date"/>" id="<inp2:{$prefix}_InputName field="{$field}_date"/>" value="<inp2:{$prefix}_Field field="{$field}_date" format="_regional_InputDateFormat"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:{$prefix}_Format field="{$field}_date" input_format="1" edit_size="edit_size"/>" style="<inp2:m_param name="style"/>" datepickerIcon="<inp2:m_ProjectBase/>core/admin_templates/img/calendar_icon.gif" /> <script type="text/javascript"> initCalendar("<inp2:{$prefix}_InputName field="{$field}_date"/>", "<inp2:{$prefix}_Format field="{$field}_date" input_format="1"/>"); </script> <input type="text" class="field" title="<inp2:{$prefix}_Format field='{$field}_time' input_format='1' human='true'/>" name="<inp2:{$prefix}_InputName field='{$field}_time'/>" id="<inp2:{$prefix}_InputName field='{$field}_time'/>" value="<inp2:{$prefix}_Field field='{$field}_time' format='_regional_InputTimeFormat'/>" tabindex="<inp2:m_get param='tab_index'/>" size="<inp2:{$prefix}_Format field='{$field}_time' input_format='1' edit_size='edit_size'/>" style="<inp2:m_param name='style'/>" /> </inp2:m_RenderElement> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_edit_textarea" title="lu_fld_{$field}" style="width: 100%;" cols="" rows="" format="" error_position="top" field_type="textarea" hint_label="" no_editing="1"> <inp2:m_RenderElement design="form_row" pass_params="1"> <textarea class="field" <inp2:m_if check="{$prefix}_FieldHintLabel" title_label="$title" direct_label="$hint_label"> title="<inp2:$prefix_FieldHintLabel title_label='$title' direct_label='$hint_label' html_escape='1'/>" </inp2:m_if/> tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" cols="<inp2:m_param name='cols'/>" rows="<inp2:m_param name='rows'/>" style="<inp2:m_param name='style'/>" ><inp2:{$prefix}_Field field="$field" format="$format"/></textarea> </inp2:m_RenderElement> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_option_item"> <option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_param name="option"/></option> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_option_phrase"> <option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_phrase label="$option"/></option> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_edit_options" title="lu_fld_{$field}" style="" has_empty="0" empty_value="" empty_label="" field_type="select" no_editing="1"> <inp2:m_RenderElement design="form_row" pass_params="1"> <select class="field" tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>" style="<inp2:m_param name="style"/>"> <inp2:m_if check="{$prefix}_FieldOption" field="$field" option="use_phrases"> <inp2:{$prefix}_PredefinedOptions field="$field" block="inp_option_phrase" selected="selected" has_empty="$has_empty" empty_value="$empty_value" empty_label="$empty_label"/> <inp2:m_else/> <inp2:{$prefix}_PredefinedOptions field="$field" block="inp_option_item" selected="selected" has_empty="$has_empty" empty_value="$empty_value" empty_label="$empty_label"/> </inp2:m_if> </select> </inp2:m_RenderElement> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_edit_country" title="lu_fld_{$field}" state_field="" style="" has_empty="0" empty_value="" empty_label="" field_type="select" no_editing="1"> <inp2:m_RenderElement design="form_row" pass_params="1"> <select class="field" tabindex="<inp2:m_get param="tab_index"/>" state_field="<inp2:m_Param name='state_field'/>" name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>" style="<inp2:m_param name="style"/>"> <inp2:{$prefix}_PredefinedOptions field="$field" block="inp_option_item" selected="selected" has_empty="$has_empty" empty_value="$empty_value" empty_label="$empty_label"/> </select> <script type="text/javascript"> function transform_state_control($control, $has_options) { var $id = $control.attr('id'), $tab_index = $control.attr('tabindex'), $was_dropdown = $control.is('select'), $is_dropdown = $was_dropdown; if ( !$has_options && $was_dropdown ) { // convert to textbox $control.replaceWith('<input type="text" class="field" id="' + $id + '" name="' + $id + '" tabindex="' + $tab_index + '" value=""/>'); $is_dropdown = false; } else if ( $has_options && !$was_dropdown ) { // convert to dropdown $control.replaceWith('<select class="field" id="' + $id + '" name="' + $id + '" tabindex="' + $tab_index + '"></select>'); $is_dropdown = true; } if ( $was_dropdown != $is_dropdown ) { $('#' + jq($id)).blur( function ($e) { FormManager.checkField(this); } ); } } $(document).ready( function () { var $field_mask = '<inp2:$prefix_InputName field="#FIELD_NAME#" js_escape="1"/>'; $( get_control($field_mask, '<inp2:m_Param name="field"/>') ).change( function ($e) { var $me = $(this), $state_control = $( get_control($field_mask, $me.attr('state_field')) ), $url = '<inp2:m_Link country-state_event="OnGetStatesJSON" country_iso="#ISO#" pass="m,country-state" no_amp="1" js_escape="1"/>'; $.getJSON( $url.replace('#ISO#', $me.val()), function ($states) { var $selected = $state_control.val(); transform_state_control($state_control, !$.isArray($states)); $state_control = $( get_control($field_mask, $me.attr('state_field')) ); if ( $state_control.is('select') ) { $state_control.empty().append('<option value=""></option>'); if ( !$.isArray($states) ) { for (var $state_iso in $states) { $state_control.append('<option value="' + $state_iso + '">' + $states[$state_iso] + '</option>'); } } } $state_control.val($selected); } ); } ); } ); </script> </inp2:m_RenderElement> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_edit_state" title="lu_fld_{$field}" state_field="" style="" has_empty="0" empty_value="" empty_label="" field_type="select" no_editing="1"> <inp2:m_RenderElement design="form_row" pass_params="1"> <inp2:m_if check="{$prefix}_FieldOption" field="$field" option="options"> <select class="field" tabindex="<inp2:m_get param='tab_index'/>" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>"> <inp2:{$prefix}_PredefinedOptions field="$field" block="inp_option_item" selected="selected" has_empty="$has_empty" empty_value="$empty_value" empty_label="$empty_label"/> </select> <inp2:m_else/> <input type="text" class="field" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field'/>" tabindex="<inp2:m_get param='tab_index'/>"/> </inp2:m_if> </inp2:m_RenderElement> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_radio_item" style="" onclick="" has_br="0"> <input type="radio" tabindex="<inp2:m_get param="tab_index"/>" style="<inp2:m_param name="style"/>" <inp2:m_param name="checked"/> name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>"><label for="<inp2:{$prefix}_InputName field="$field"/>_<inp2:m_param name="key"/>"> <inp2:m_param name="option"/></label><inp2:m_if check="m_Param" name="has_br"><br/><inp2:m_else/> </inp2:m_if> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_radio_phrase" style="" onclick="" has_br="0"> <input type="radio" tabindex="<inp2:m_get param="tab_index"/>" style="<inp2:m_param name="style"/>" <inp2:m_param name="checked"/> name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>"><label for="<inp2:{$prefix}_InputName field="$field"/>_<inp2:m_param name="key"/>"> <inp2:m_phrase label="$option"/></label><inp2:m_if check="m_Param" name="has_br"><br/><inp2:m_else/> </inp2:m_if> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_edit_radio" title="lu_fld_{$field}" style="" pass_tabindex="" onclick="" onchange="" field_type="radio" has_br="0" no_editing="1"> <inp2:m_RenderElement design="form_row" pass_params="1"> <inp2:m_if check="{$prefix}_FieldOption" field="$field" option="use_phrases"> <inp2:{$prefix}_PredefinedOptions field="$field" block="inp_radio_phrase" selected="checked" has_br="$has_br"/> <inp2:m_else /> <inp2:{$prefix}_PredefinedOptions field="$field" block="inp_radio_item" selected="checked" has_br="$has_br"/> </inp2:m_if> </inp2:m_RenderElement> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_edit_captcha" style="" field="Captcha" title="lu_fld_Captcha" no_editing="1" field_type="captcha" is_last="0"> <inp2:m_RenderElement design="form_row" pass_params="1"> <img src="<inp2:m_Link template="platform/inc/captcha_image.elm" var="{$prefix}_captcha_code" w="150" h="30"/>" alt="<inp2:m_Phrase name="$title" no_editing="1"/>"/><br /> <br /> <input type="text" class="input-text" name="<inp2:{$prefix}_InputName field="Captcha"/>" id="<inp2:{$prefix}_InputName field="Captcha"/>" value="<inp2:{$prefix}_Field field="Captcha"/>" tabindex="<inp2:m_get param="tab_index"/>" style="<inp2:m_Param name="style"/>"/> </inp2:m_RenderElement> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_edit_checkbox" title="lu_fld_{$field}" style="" field_type="checkbox" no_editing="1"> <inp2:m_RenderElement design="form_row" pass_params="1"> <input type="hidden" id="<inp2:{$prefix}_InputName field="$field"/>" name="<inp2:{$prefix}_InputName field="$field"/>" value="<inp2:{$prefix}_Field field="$field" db="db"/>" /> <input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:{$prefix}_InputName field="$field"/>" name="_cb_<inp2:{$prefix}_InputName field="$field"/>" <inp2:{$prefix}_Field field="$field" checked="checked" db="db"/> style="<inp2:m_param name="style"/>" onchange="update_checkbox(this, document.getElementById('<inp2:{$prefix}_InputName field="$field"/>'));"> </inp2:m_RenderElement> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_checkbox_item"> <input type="checkbox" <inp2:m_param name='checked'/> id="<inp2:{$prefix}_InputName field='$field'/>_<inp2:m_param name='key'/>" value="<inp2:m_param name='key'/>" onclick="update_checkbox_options(/^<inp2:{$prefix}_InputName field='$field' as_preg='1'/>_([0-9A-Za-z-]+)/, '<inp2:{$prefix}_InputName field='$field'/>');"><label for="<inp2:{$prefix}_InputName field='$field'/>_<inp2:m_param name='key'/>"><inp2:m_param name="option"/></label><inp2:m_if check="m_Param" name="has_br"><br/><inp2:m_else/> </inp2:m_if> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_checkbox_phrase"> <input type="checkbox" <inp2:m_param name='checked'/> id="<inp2:{$prefix}_InputName field='$field'/>_<inp2:m_param name='key'/>" value="<inp2:m_param name='key'/>" onclick="update_checkbox_options(/^<inp2:{$prefix}_InputName field='$field' as_preg='1'/>_([0-9A-Za-z-]+)/, '<inp2:{$prefix}_InputName field='$field'/>');"><label for="<inp2:{$prefix}_InputName field='$field'/>_<inp2:m_param name='key'/>"><inp2:m_phrase label="$option"/></label><inp2:m_if check="m_Param" name="has_br"><br/><inp2:m_else/> </inp2:m_if> </inp2:m_DefineElement> <inp2:m_DefineElement name="inp_edit_checkboxes" title="lu_fld_{$field}" no_empty="" pass_tabindex="" field_type="checkboxes" show_length="0" has_br="0"> <inp2:m_RenderElement design="form_row" pass_params="1"> <inp2:m_if check="{$prefix}_FieldOption" field="$field" option="use_phrases"> <inp2:{$prefix}_PredefinedOptions field="$field" no_empty="$no_empty" tabindex="$pass_tabindex" block="inp_checkbox_phrase" selected="checked" has_br="$has_br"/> <inp2:m_else/> <inp2:{$prefix}_PredefinedOptions field="$field" no_empty="$no_empty" tabindex="$pass_tabindex" block="inp_checkbox_item" selected="checked" has_br="$has_br"/> </inp2:m_if> <inp2:m_RenderElement prefix="$prefix" name="inp_edit_hidden" field="$field" db="db"/> </inp2:m_RenderElement> -</inp2:m_DefineElement> \ No newline at end of file +</inp2:m_DefineElement>