Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1949895
coupon_edit.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
Thu, Oct 29, 8:52 AM
Size
5 KB
Mime Type
text/html
Expires
Sat, Oct 31, 8:52 AM (1 d, 18 h)
Engine
blob
Format
Raw Data
Handle
963258
Attached To
rMINC Modules.In-Commerce
coupon_edit.tpl
View Options
<
inp2:m_RequireLogin
permissions
=
"in-commerce:coupons.view"
system
=
"1"
/>
<
inp2:m_include
t
=
"incs/header"
nobody
=
"yes"
/>
<
body
topmargin
=
"0"
leftmargin
=
"8"
marginheight
=
"0"
marginwidth
=
"8"
bgcolor
=
"#FFFFFF"
>
<
inp2:m_ParseBlock
name
=
"section_header"
prefix
=
"coup"
icon
=
"icon46_discounts"
module
=
"in-commerce"
title
=
"!la_title_Coupons!"
/>
<
inp2:m_include
t
=
"in-commerce/discounts/coupons_tabs"
/>
<
inp2:m_ParseBlock
name
=
"blue_bar"
prefix
=
"coup"
title_preset
=
"coupons_edit"
module
=
"in-commerce"
icon
=
"icon46_discounts"
/>
<!-- 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
(
'coup'
,
'<inp2:coup_SaveEvent/>'
);
}
)
);
a_toolbar
.
AddButton
(
new
ToolBarButton
(
'cancel'
,
'<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>'
,
function
()
{
submit_event
(
'coup'
,
'OnCancel'
);
}
)
);
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
(
'coup'
,
'<inp2:d_PrevId/>'
);
}
)
);
a_toolbar
.
AddButton
(
new
ToolBarButton
(
'next'
,
'<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>'
,
function
()
{
go_to_id
(
'coup'
,
'<inp2:d_NextId/>'
);
}
)
);
//a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar
.
Render
();
<
inp2
:
m_if
prefix
=
"coup"
function
=
"IsSingle"
/>
a_toolbar
.
HideButton
(
'prev'
);
a_toolbar
.
HideButton
(
'next'
);
a_toolbar
.
HideButton
(
'sep1'
);
//a_toolbar.HideButton('sep2');
<
inp2
:
m_else
/>
<
inp2
:
m_if
prefix
=
"coup"
function
=
"IsLast"
/>
a_toolbar
.
DisableButton
(
'next'
);
<
inp2
:
m_endif
/>
<
inp2
:
m_if
prefix
=
"coup"
function
=
"IsFirst"
/>
a_toolbar
.
DisableButton
(
'prev'
);
<
inp2
:
m_endif
/>
<
inp2
:
m_endif
/>
</
script
>
</
td
>
</
tr
>
</
tbody
>
</
table
>
<
script
language
=
"JavaScript"
>
function
Random
(
N
)
{
return
Math
.
floor
(
N
*
(
Math
.
random
()
%
1
));
}
function
generateRandomCode
(
elementId
){
var
j
,
S
=
""
,
d
;
for
(
j
=
0
;
j
<
10
;
j
++
)
{
d
=
Random
(
2
);
if
(
d
==
1
)
S
+=
String
.
fromCharCode
(
65
+
Random
(
26
));
else
S
+=
String
(
Random
(
9
));
}
document
.
getElementById
(
elementId
).
value
=
S
;
}
</
script
>
<
inp2:m_block
name
=
"inp_edit_box_generate"
/>
<
tr
class
=
"<inp2:m_odd_even odd="
table-color1
"
even
=
"table-color2"
/>
">
<
inp2:m_ParseBlock
name
=
"inp_edit_field_caption"
prefix
=
"
$
prefix"
field
=
"
$
fi
eld"
title_phrase
=
"
$
title_phrase"
title
=
"
$
title"
is_last
=
"
$
is_last"
/>
<
td
>
<
input
type
=
"text"
name
=
"<inp2:
$
prefix_InputName field="
$
fi
eld
"
/>
" id="
<
inp2:
$
prefix_InputName
field
=
"
$
fi
eld"
/>
" value="
<
inp2:
$
prefix_Field
field
=
"
$
fi
eld"
/>
" tabindex="
<
inp2:m_get
param
=
"tab_index"
/>
" size="
<
inp2:m_param
name
=
"size"
/>
" maxlength="
<
inp2:m_param
name
=
"maxlength"
/>
" class="
<
inp2:m_param
name
=
"class"
/>
" onblur="
<
inp2:m_Param
name
=
"onblur"
/>
">
</
td
>
<
td
class
=
"error"
><
inp2:
$
prefix_Error
field
=
"
$
fi
eld"
/>
<
input
type
=
"button"
class
=
"button"
onClick
=
"generateRandomCode('<inp2:
$
prefix_InputName field="
$
fi
eld
"
/>
')" value="
<
inp2:m_Phrase
label
=
"la_GenerateCode"
/>
" />
</
td
>
</
tr
>
<
inp2:m_blockend
/>
<
inp2:m_block
name
=
"inp_edit_box_comment"
/>
<
tr
class
=
"<inp2:m_odd_even odd="
table-color1
"
even
=
"table-color2"
/>
">
<
inp2:m_ParseBlock
name
=
"inp_edit_field_caption"
prefix
=
"
$
prefix"
field
=
"
$
fi
eld"
title_phrase
=
"
$
title_phrase"
title
=
"
$
title"
is_last
=
"
$
is_last"
/>
<
td
>
<
input
type
=
"text"
name
=
"<inp2:
$
prefix_InputName field="
$
fi
eld
"
/>
" id="
<
inp2:
$
prefix_InputName
field
=
"
$
fi
eld"
/>
" value="
<
inp2:
$
prefix_Field
field
=
"
$
fi
eld"
/>
" tabindex="
<
inp2:m_get
param
=
"tab_index"
/>
" size="
<
inp2:m_param
name
=
"size"
/>
" maxlength="
<
inp2:m_param
name
=
"maxlength"
/>
" class="
<
inp2:m_param
name
=
"class"
/>
" onblur="
<
inp2:m_Param
name
=
"onblur"
/>
">
<
inp2:m_Phrase
label
=
"la_comment_LeaveBlank"
/>
</
td
>
<
td
class
=
"error"
><
inp2:
$
prefix_Error
field
=
"
$
fi
eld"
/>
</
td
>
</
tr
>
<
inp2:m_blockend
/>
<
inp2:coup_SaveWarning
name
=
"grid_save_warning"
/>
<
table
width
=
"100%"
border
=
"0"
cellspacing
=
"0"
cellpadding
=
"4"
class
=
"tableborder"
>
<
inp2:m_ParseBlock
name
=
"subsection"
title
=
"!la_section_General!"
/>
<
inp2:m_ParseBlock
name
=
"inp_label"
prefix
=
"coup"
field
=
"CouponId"
title
=
"!la_fld_CouponId!"
/>
<
inp2:m_ParseBlock
name
=
"inp_edit_radio"
prefix
=
"coup"
field
=
"Status"
title
=
"!la_fld_Status!"
/>
<
inp2:m_ParseBlock
name
=
"inp_edit_box"
prefix
=
"coup"
field
=
"Name"
title
=
"!la_fld_Name!"
size
=
"35"
/>
<
inp2:m_ParseBlock
name
=
"inp_edit_box_generate"
prefix
=
"coup"
field
=
"Code"
title
=
"!la_fld_CouponCode!"
size
=
"35"
/>
<
inp2:m_ParseBlock
name
=
"inp_edit_date_time"
prefix
=
"coup"
field
=
"Expiration"
title
=
"!la_fld_Expiration!"
size
=
"10"
/>
<
inp2:m_ParseBlock
name
=
"inp_edit_options"
use_phrases
=
"1"
prefix
=
"coup"
field
=
"Type"
title
=
"!la_fld_Type!"
/>
<
inp2:m_ParseBlock
name
=
"inp_edit_box"
prefix
=
"coup"
field
=
"Amount"
title
=
"!la_fld_Amount!"
size
=
"4"
/>
<
inp2:m_ParseBlock
name
=
"inp_label"
prefix
=
"coup"
field
=
"LastUsedBy"
title
=
"!la_fld_LastUsedBy!"
size
=
"15"
/>
<
inp2:m_ParseBlock
name
=
"inp_label"
prefix
=
"coup"
field
=
"LastUsedOn"
title
=
"!la_fld_LastUsedOn!"
size
=
"10"
/>
<
inp2:m_ParseBlock
name
=
"inp_edit_box_comment"
prefix
=
"coup"
field
=
"NumberOfUses"
title
=
"!la_fld_NumberOfUses!"
size
=
"4"
/>
</
table
>
<
inp2:m_include
t
=
"incs/footer"
/>
Event Timeline
Log In to Comment