/
New dimensions control for administrative console

New dimensions control for administrative console

Imported From: http://groups.google.com/group/in-portal-dev/browse_thread/thread/e50b533a293aac38#

I've used control below in one of my projects and I thought, that it can be useful for others too, where you need to enter dimensions:

<inp2:m_DefineElement name="inp_edit_dimensions" caption_render_as="default_field_caption_element" field_prefix="" class="" is_last="" onblur="" onchange="" onkeyup="" hint_label="" style="width: 50px;"> 
	<inp2:m_if check="{$prefix}_FieldVisible" field="{$field_prefix}Width"> 
		<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>" id="<inp2:$prefix_InputName field='{$field_prefix}Width'/>_row"> 
            <inp2:m_RenderElement name="inp_edit_field_caption" caption_render_as="$caption_render_as" prefix="$prefix" field="{$field_prefix}Width" title="$title" hint_label="$hint_label" is_last="$is_last"/> 
            <td class="control-cell"> 
                <input style="<inp2:m_Param name='style'/>" type="text" name="<inp2:{$prefix}_InputName field='{$field_prefix}Width'/>" id="<inp2:{$prefix}_InputName field='{$field_prefix}Width'/>" value="<inp2:{$prefix}_Field field='{$field_prefix}Width'/>" tabindex="<inp2:m_get param='tab_index'/>" class="<inp2:m_param name='class'/>" onblur="<inp2:m_Param name='onblur'/>" onkeyup="<inp2:m_Param name='onkeyup'/>" onchange="<inp2:m_Param name='onchange'/>"/> 
                x 
                <input style="<inp2:m_Param name='style'/>" type="text" name="<inp2:{$prefix}_InputName field='{$field_prefix}Height'/>" id="<inp2:{$prefix}_InputName field='{$field_prefix}Height'/>" value="<inp2:{$prefix}_Field field='{$field_prefix}Height'/>" tabindex="<inp2:m_get param='tab_index'/>" class="<inp2:m_param name='class'/>" onblur="<inp2:m_Param name='onblur'/>" onkeyup="<inp2:m_Param name='onkeyup'/>" onchange="<inp2:m_Param name='onchange'/>"/> 
                x 
                <input style="<inp2:m_Param name='style'/>" type="text" name="<inp2:{$prefix}_InputName field='{$field_prefix}Depth'/>" id="<inp2:{$prefix}_InputName field='{$field_prefix}Depth'/>" value="<inp2:{$prefix}_Field field='{$field_prefix}Depth'/>" tabindex="<inp2:m_get param='tab_index'/>" class="<inp2:m_param name='class'/>" onblur="<inp2:m_Param name='onblur'/>" onkeyup="<inp2:m_Param name='onkeyup'/>" onchange="<inp2:m_Param name='onchange'/>"/> 
            </td> 
            <inp2:m_RenderElement name="inp_edit_error" field="{$field_prefix}Width" pass_params="1"/> 
        </tr> 
    </inp2:m_if> 
</inp2:m_DefineElement>