%perl>;
my $wf = Bric::Biz::Workflow->lookup
({ id => get_state_data($widget, 'work_id')});
my $site_id = $wf->get_site_id;
$m->comp('/widgets/wrappers/sharky/table_top.mc',
'caption' => 'Properties',
'number' => 1);
$m->out($ieSpacer);
$m->comp('/widgets/profile/displayFormElement.mc',
key => 'site',
readOnly => 1,
objref => $wf
);
$m->out($ieSpacer);
if ($param->{tplate_type}) {
# Output a hidden field for the template type.
$m->comp('/widgets/profile/hidden.mc',
name => 'tplate_type',
value => $param->{tplate_type});
if ($param->{tplate_type} ==
Bric::Biz::Asset::Formatting::ELEMENT_TEMPLATE) {
# It's an element template. Offer them a list of elements to
# choose from. Get the top-level elements for this site, and then
# all of the subelements.
$m->comp('/widgets/select_object/select_object.mc',
object => 'element',
name => $widget.'|at_id',
field => 'name',
reset_key => $rk,
exclude => $excl_media_sub,
objs => $get_elems->($site_id),
disp => 'Element');
} elsif ($param->{tplate_type} ==
Bric::Biz::Asset::Formatting::UTILITY_TEMPLATE) {
# It's a utiltiy template. Offer a name field.
$m->comp('/widgets/profile/text.mc',
disp => 'Name',
req => 1,
name => "$widget|name");
} else {
# Do nothing for a category template. This should never happen.
}
} else {
# Let them decide what type of template they want.
$m->comp('/widgets/profile/displayFormElement.mc',
vals => Bric::Biz::Asset::Formatting->my_meths->{tplate_type},
key => 'tplate_type'
);
}
$m->out($ieSpacer);
$m->comp('/widgets/profile/displayFormElement.mc',
key => "file_type",
vals => {
disp => "File Type",
value => 'mc',
props => {
type => 'select',
vals => Bric::Util::Burner->list_file_types
}
});
$m->out($ieSpacer);
$m->comp('/widgets/select_object/select_object.mc',
'object' => 'output_channel',
'name' => $widget.'|oc_id',
'field' => 'name',
'reset_key' => $rk,
selected => $param->{"$widget|oc_id"},
constrain => { active => 1 , site_id => $site_id},
req => 1,
'disp' => 'Output Channel');
$m->out($ieSpacer);
$m->comp('/widgets/select_object/select_object.mc',
'object' => 'category',
'name' => $widget.'|cat_id',
selected => $param->{"$widget|cat_id"},
'reset_key' => $rk,
'field' => 'uri',
sort_field => 'uri',
constrain => { site_id => $site_id },
exclude => $excl_sub,
req => 1,
'disp' => 'Category');
$m->out($ieSpacer);
$m->comp('/widgets/profile/displayFormElement.mc',
key => "priority",
vals => $pmeth);
$m->out($ieSpacer . "
");
$m->comp('/widgets/wrappers/sharky/table_bottom.mc');
$m->comp("/widgets/wrappers/sharky/table_top.mc",
caption => "Submit",
number => 2,
ghostly => 1);
$m->comp('/widgets/profile/create_button.html',
widget => $widget,
button => $button,
cb => $cb);
%perl>
<%args>
$widget
$param
%args>
<%init>;
my $rk = get_state_data($widget, 'reset_key');
# browser spacing stuff
my $agent = detect_agent();
my $ieSpacer = ($agent->ie) ? qq{
![]() |