Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1172387
shipping_brackets.tpl
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Sep 29, 6:42 PM
Size
11 KB
Mime Type
text/html
Expires
Wed, Oct 1, 6:42 PM (1 d, 20 h)
Engine
blob
Format
Raw Data
Handle
759789
Attached To
rMINC Modules.In-Commerce
shipping_brackets.tpl
View Options
<
inp2:adm_SetPopupSize
width
=
"850"
height
=
"610"
/>
<
inp2:m_include
t
=
"incs/header"
/>
<
inp2:m_RenderElement
name
=
"combined_header"
prefix
=
"s"
section
=
"in-commerce:shipping"
title_preset
=
"brackets"
tab_preset
=
"Default"
/>
<!-- ToolBar -->
<
table
class
=
"toolbar"
height
=
"30"
cellspacing
=
"0"
cellpadding
=
"0"
width
=
"100%"
border
=
"0"
>
<
tbody
>
<
tr
>
<
td
>
<
script
type
=
"text/javascript"
>
a_toolbar
=
new
ToolBar
();
a_toolbar
.
AddButton
(
new
ToolBarButton
(
'select'
,
'<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>'
,
function
()
{
submit_event
(
's'
,
'<inp2:s_SaveEvent/>'
);
}
)
);
a_toolbar
.
AddButton
(
new
ToolBarButton
(
'cancel'
,
'<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>'
,
function
()
{
submit_event
(
's'
,
'OnCancelEdit'
);
}
)
);
a_toolbar
.
AddButton
(
new
ToolBarSeparator
(
'sep1'
)
);
a_toolbar
.
AddButton
(
new
ToolBarButton
(
'prev'
,
'<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>'
,
function
()
{
go_to_id
(
's'
,
'<inp2:s_PrevId/>'
);
}
)
);
a_toolbar
.
AddButton
(
new
ToolBarButton
(
'next'
,
'<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>'
,
function
()
{
go_to_id
(
's'
,
'<inp2:s_NextId/>'
);
}
)
);
a_toolbar
.
AddButton
(
new
ToolBarSeparator
(
'sep2'
)
);
function
add_brackets
()
{
submit_event
(
'br'
,
'OnMoreBrackets'
)
}
a_toolbar
.
AddButton
(
new
ToolBarButton
(
'in-commerce:more_brackets'
,
'<inp2:m_phrase label="la_ToolTip_MoreBrackets" escape="1"/>'
,
add_brackets
)
);
function
infinity
()
{
submit_event
(
'br'
,
'OnInfinity'
);
}
a_toolbar
.
AddButton
(
new
ToolBarButton
(
'in-commerce:infinity'
,
'<inp2:m_phrase label="la_ToolTip_Infinity" escape="1"/>'
,
infinity
)
);
function
arrange_brackets
()
{
submit_event
(
'br'
,
'OnArrange'
)
}
a_toolbar
.
AddButton
(
new
ToolBarButton
(
'in-commerce:arrange'
,
'<inp2:m_phrase label="la_ToolTip_Arrange" escape="1"/>'
,
arrange_brackets
)
);
a_toolbar
.
Render
();
<
inp2
:
m_if
check
=
"s_IsSingle"
>
a_toolbar
.
HideButton
(
'prev'
);
a_toolbar
.
HideButton
(
'next'
);
a_toolbar
.
HideButton
(
'sep1'
);
<
inp2
:
m_else
/>
<
inp2
:
m_if
check
=
"s_IsLast"
>
a_toolbar
.
DisableButton
(
'next'
);
<
/inp2:m_if>
<
inp2
:
m_if
check
=
"s_IsFirst"
>
a_toolbar
.
DisableButton
(
'prev'
);
<
/inp2:m_if>
<
/inp2:m_if>
</
script
>
</
td
>
</
tr
>
</
tbody
>
</
table
>
<
inp2:m_DefineElement
name
=
"br_edit_box"
>
<
td
>
<
input
type
=
"text"
size
=
"<inp2:m_param name="
size
"
/>
" name="
<
inp2:m_param
name
=
"PrefixSpecial"
/>
[
<
inp2:m_param
name
=
"id"
/>
][
<
inp2:m_param
name
=
"field"
/>
]"
id="
<
inp2:m_param
name
=
"PrefixSpecial"
/>
[
<
inp2:m_param
name
=
"id"
/>
][
<
inp2:m_param
name
=
"field"
/>
]"
tabindex="
<
inp2:m_get
param
=
"tab_index"
/>
"
value="
<
inp2:m_param
name
=
"
$
fi
eld"
/>
"
>
</
inp2:m_DefineElement
>
<
inp2:m_DefineElement
name
=
"br_edit_max"
>
<
td
>
<
inp2:m_if
check
=
"s_FieldEquals"
name
=
"Type"
value
=
"1"
>
<
inp2:m_if
check
=
"lang.current_FieldEquals"
field
=
"UnitSystem"
value
=
"1"
>
<
input
type
=
"text"
<
inp2:m_inc
param
=
"tab_index"
by
=
"1"
/>
tabindex="
<
inp2:m_get
param
=
"tab_index"
/>
"
name="
<
inp2:m_param
name
=
"PrefixSpecial"
/>
[
<
inp2:m_param
name
=
"id"
/>
][
<
inp2:m_param
name
=
"field"
/>
]"
id="
<
inp2:m_param
name
=
"PrefixSpecial"
/>
[
<
inp2:m_param
name
=
"id"
/>
][
<
inp2:m_param
name
=
"field"
/>
]"
value="
<
inp2:m_param
name
=
"max"
/>
" size="10"
<
inp2:m_if
check
=
"m_ParamEquals"
param
=
"next_min_id"
value
=
""
>
<
inp2:m_else
/>
onchange="set_start(
<
inp2:m_param
name
=
"id"
/>
,
<
inp2:m_param
name
=
"next_min_id"
/>
,'
<
inp2:m_param
name
=
"PrefixSpecial"
/>
', 'Start', 'End')"
</
inp2:m_if
>
/>
<
inp2:m_phrase
label
=
"la_kg"
/>
</
inp2:m_if
>
<
inp2:m_if
check
=
"lang.current_FieldEquals"
field
=
"UnitSystem"
value
=
"2"
>
<
input
type
=
"text"
<
inp2:m_inc
param
=
"tab_index"
by
=
"1"
/>
tabindex="
<
inp2:m_get
param
=
"tab_index"
/>
"
name="
<
inp2:m_param
name
=
"PrefixSpecial"
/>
[
<
inp2:m_param
name
=
"id"
/>
][
<
inp2:m_param
name
=
"field"
/>
_a]"
id="
<
inp2:m_param
name
=
"PrefixSpecial"
/>
[
<
inp2:m_param
name
=
"id"
/>
][
<
inp2:m_param
name
=
"field"
/>
_a]"
value="
<
inp2:m_param
name
=
"max_a"
/>
" size="10"
<
inp2:m_if
check
=
"m_ParamEquals"
param
=
"next_min_id"
value
=
""
>
<
inp2:m_else
/>
onchange="set_start(
<
inp2:m_param
name
=
"id"
/>
,
<
inp2:m_param
name
=
"next_min_id"
/>
,'
<
inp2:m_param
name
=
"PrefixSpecial"
/>
', 'Start_a', 'End_a')"
</
inp2:m_if
>
/>
<
inp2:m_phrase
label
=
"la_lbs"
/>
<
input
type
=
"text"
<
inp2:m_inc
param
=
"tab_index"
by
=
"1"
/>
tabindex="
<
inp2:m_get
param
=
"tab_index"
/>
"
name="
<
inp2:m_param
name
=
"PrefixSpecial"
/>
[
<
inp2:m_param
name
=
"id"
/>
][
<
inp2:m_param
name
=
"field"
/>
_b]"
id="
<
inp2:m_param
name
=
"PrefixSpecial"
/>
[
<
inp2:m_param
name
=
"id"
/>
][
<
inp2:m_param
name
=
"field"
/>
_b]"
value="
<
inp2:m_param
name
=
"max_b"
/>
" size="10"
<
inp2:m_if
check
=
"m_ParamEquals"
param
=
"next_min_id"
value
=
""
>
<
inp2:m_else
/>
onchange="set_start(
<
inp2:m_param
name
=
"id"
/>
,
<
inp2:m_param
name
=
"next_min_id"
/>
,'
<
inp2:m_param
name
=
"PrefixSpecial"
/>
', 'Start_b', 'End_b')"
</
inp2:m_if
>
/>
<
inp2:m_phrase
label
=
"la_oz"
/>
</
inp2:m_if
>
<
inp2:m_else
/>
<
input
type
=
"text"
size
=
"10"
<
inp2:m_inc
param
=
"tab_index"
by
=
"1"
/>
tabindex="
<
inp2:m_get
param
=
"tab_index"
/>
"
name="
<
inp2:m_param
name
=
"PrefixSpecial"
/>
[
<
inp2:m_param
name
=
"id"
/>
][
<
inp2:m_param
name
=
"field"
/>
]"
id="
<
inp2:m_param
name
=
"PrefixSpecial"
/>
[
<
inp2:m_param
name
=
"id"
/>
][
<
inp2:m_param
name
=
"field"
/>
]"
value="
<
inp2:m_param
name
=
"max"
/>
"
<
inp2:m_if
check
=
"m_ParamEquals"
param
=
"next_min_id"
value
=
""
>
<
inp2:m_else
/>
onchange="set_start(
<
inp2:m_param
name
=
"id"
/>
,
<
inp2:m_param
name
=
"next_min_id"
/>
,'
<
inp2:m_param
name
=
"PrefixSpecial"
/>
', 'Start', 'End')"
</
inp2:m_if
>
/>
</
inp2:m_if
>
</
td
>
</
inp2:m_DefineElement
>
<
inp2:m_DefineElement
name
=
"br_edit_min"
>
<
td
>
<
input
type
=
"hidden"
name
=
"<inp2:m_param name="
PrefixSpecial
"
/>
[
<
inp2:m_param
name
=
"id"
/>
][
<
inp2:m_param
name
=
"IdField"
/>
]" id="
<
inp2:m_param
name
=
"PrefixSpecial"
/>
[
<
inp2:m_param
name
=
"id"
/>
][
<
inp2:m_param
name
=
"IdField"
/>
]" value="
<
inp2:m_param
name
=
"id"
/>
">
<
inp2:m_if
check
=
"s_FieldEquals"
name
=
"Type"
value
=
"1"
>
<
inp2:m_if
check
=
"lang.current_FieldEquals"
field
=
"UnitSystem"
value
=
"1"
>
<
input
type
=
"text"
<
inp2:m_if
check
=
"m_ParamEquals"
param
=
"first"
value
=
"1"
>
<
inp2:m_inc
param
=
"tab_index"
by
=
"1"
/>
tabindex="
<
inp2:m_get
param
=
"tab_index"
/>
"
<
inp2:m_else
/>
readonly
</
inp2:m_if
>
name="
<
inp2:m_param
name
=
"PrefixSpecial"
/>
[
<
inp2:m_param
name
=
"id"
/>
][
<
inp2:m_param
name
=
"field"
/>
]"
id="
<
inp2:m_param
name
=
"PrefixSpecial"
/>
[
<
inp2:m_param
name
=
"id"
/>
][
<
inp2:m_param
name
=
"field"
/>
]"
value="
<
inp2:m_param
name
=
"min"
/>
" size="10"
<
inp2:m_if
check
=
"m_ParamEquals"
param
=
"first"
value
=
"1"
><
inp2:m_else
/>
disabled
</
inp2:m_if
>
/>
<
inp2:m_phrase
label
=
"la_kg"
/>
</
inp2:m_if
>
<
inp2:m_if
check
=
"lang.current_FieldEquals"
field
=
"UnitSystem"
value
=
"2"
>
<
input
type
=
"text"
<
inp2:m_if
check
=
"m_ParamEquals"
param
=
"first"
value
=
"1"
>
<
inp2:m_inc
param
=
"tab_index"
by
=
"1"
/>
tabindex="
<
inp2:m_get
param
=
"tab_index"
/>
"
<
inp2:m_else
/>
readonly
</
inp2:m_if
>
name="
<
inp2:m_param
name
=
"PrefixSpecial"
/>
[
<
inp2:m_param
name
=
"id"
/>
][
<
inp2:m_param
name
=
"field"
/>
_a]"
id="
<
inp2:m_param
name
=
"PrefixSpecial"
/>
[
<
inp2:m_param
name
=
"id"
/>
][
<
inp2:m_param
name
=
"field"
/>
_a]"
value="
<
inp2:m_param
name
=
"min_a"
/>
" size="10"
<
inp2:m_if
check
=
"m_ParamEquals"
param
=
"first"
value
=
"1"
><
inp2:m_else
/>
disabled
</
inp2:m_if
>
/>
<
inp2:m_phrase
label
=
"la_lbs"
/>
<
input
type
=
"text"
<
inp2:m_if
check
=
"m_ParamEquals"
param
=
"first"
value
=
"1"
>
<
inp2:m_inc
param
=
"tab_index"
by
=
"1"
/>
tabindex="
<
inp2:m_get
param
=
"tab_index"
/>
"
<
inp2:m_else
/>
readonly
</
inp2:m_if
>
name="
<
inp2:m_param
name
=
"PrefixSpecial"
/>
[
<
inp2:m_param
name
=
"id"
/>
][
<
inp2:m_param
name
=
"field"
/>
_b]"
id="
<
inp2:m_param
name
=
"PrefixSpecial"
/>
[
<
inp2:m_param
name
=
"id"
/>
][
<
inp2:m_param
name
=
"field"
/>
_b]"
value="
<
inp2:m_param
name
=
"min_b"
/>
" size="10"
<
inp2:m_if
check
=
"m_ParamEquals"
param
=
"first"
value
=
"1"
><
inp2:m_else
/>
disabled
</
inp2:m_if
>
/>
<
inp2:m_phrase
label
=
"la_oz"
/>
</
inp2:m_if
>
<
inp2:m_else
/>
<
input
type
=
"text"
size
=
"10"
<
inp2:m_if
check
=
"m_ParamEquals"
param
=
"first"
value
=
"1"
>
<
inp2:m_inc
param
=
"tab_index"
by
=
"1"
/>
tabindex="
<
inp2:m_get
param
=
"tab_index"
/>
"
<
inp2:m_else
/>
readonly
</
inp2:m_if
>
name="
<
inp2:m_param
name
=
"PrefixSpecial"
/>
[
<
inp2:m_param
name
=
"id"
/>
][
<
inp2:m_param
name
=
"field"
/>
]"
id="
<
inp2:m_param
name
=
"PrefixSpecial"
/>
[
<
inp2:m_param
name
=
"id"
/>
][
<
inp2:m_param
name
=
"field"
/>
]"
value="
<
inp2:m_param
name
=
"min"
/>
"
<
inp2:m_if
check
=
"m_ParamEquals"
param
=
"first"
value
=
"1"
><
inp2:m_else
/>
disabled
</
inp2:m_if
>
/>
</
inp2:m_if
>
</
td
>
</
inp2:m_DefineElement
>
<
inp2:m_DefineElement
name
=
"bracket"
>
<
tr
class
=
"<inp2:m_odd_even odd="
table-color1
"
even
=
"table-color2"
/>
">
<
inp2:m_RenderElement
name
=
"br_edit_min"
IdField
=
"
$
IdField"
PrefixSpecial
=
"
$
PrefixSpecial"
field
=
"Start"
size
=
"40"
pass_params
=
"true"
/>
<
inp2:m_RenderElement
name
=
"br_edit_max"
IdField
=
"
$
IdField"
PrefixSpecial
=
"
$
PrefixSpecial"
field
=
"End"
size
=
"40"
pass_params
=
"true"
/>
</
tr
>
</
inp2:m_DefineElement
>
<
script
type
=
"text/javascript"
>
NumberFormatter
.
ThousandsSep
=
'<inp2:lang.current_Field name="ThousandSep" js_escape="1"/>'
;
NumberFormatter
.
DecimalSep
=
'<inp2:lang.current_Field name="DecimalPoint" js_escape="1"/>'
;
function
set_start
(
id
,
next_id
,
prefix_special
,
start_field
,
end_field
)
{
//var next_id = id - 1;
var
input_id
=
prefix_special
+
'['
+
next_id
+
']['
+
start_field
+
']'
;
//var orig_id = prefix_special + '[' + id + '][Start]';
//alert('here');
if
(
document
.
getElementById
(
input_id
)
!=
null
)
{
var
new_value
=
NumberFormatter
.
Parse
(
document
.
getElementById
(
prefix_special
+
'['
+
id
+
']['
+
end_field
+
']'
).
value
);
//alert(prefix_special + '[' + id + '][' + end_field + ']');
if
(
isNaN
(
new_value
)
)
new_value
=
0
;
document
.
getElementById
(
prefix_special
+
'['
+
id
+
']['
+
end_field
+
']'
).
value
=
NumberFormatter
.
Format
(
new_value
);
document
.
getElementById
(
input_id
).
value
=
NumberFormatter
.
Format
(
new_value
);
}
}
function
enableKernelFormFields
()
{
var
kForm
=
document
.
forms
.
kernel_form
;
var
elem
=
false
;
for
(
var
i
=
0
;
i
<
kForm
.
elements
.
length
;
i
++
){
elem
=
kForm
.
elements
[
i
];
if
(
elem
.
type
==
"text"
&&
elem
.
disabled
==
true
){
elem
.
disabled
=
false
;
}
}
}
</
script
>
<
inp2:m_DefineElement
name
=
"br_grid_th"
>
<
td
class
=
"columntitle_small"
><
inp2:m_phrase
label
=
"
$
phrase"
/></
td
>
</
inp2:m_DefineElement
>
<
inp2:br_SaveWarning
name
=
"grid_save_warning"
/>
<
inp2:br_ErrorWarning
name
=
"form_error_warning"
/>
<
div
id
=
"scroll_container"
>
<
table
width
=
"100%"
border
=
"0"
cellspacing
=
"0"
cellpadding
=
"4"
class
=
"tableborder"
>
<
tr
nowrap
=
"nowrap"
class
=
"grid-header-row-0"
>
<
inp2:m_RenderElement
name
=
"br_grid_th"
phrase
=
"column:la_fld_Start"
/>
<
inp2:m_RenderElement
name
=
"br_grid_th"
phrase
=
"column:la_fld_End"
/>
</
tr
>
<
inp2:br_ShowBracketsForm
block
=
"bracket"
IdField
=
"BracketId"
/>
</
table
>
</
div
>
<
inp2:m_include
t
=
"incs/footer"
/>
<
script
>
document
.
forms
.
kernel_form
.
onsubmit
=
enableKernelFormFields
;
</
script
>
Event Timeline
Log In to Comment