>
<& '/widgets/profile/text.mc',
name => $widget.'|simple',
value => $state->{simple} || '',
useTable => 0 &>
% # This hidden field is required to make the form submit when the user hits
% # the "enter" key.
<& '/widgets/profile/hidden.mc',
id => 'search-type',
name => $widget.'|media_cb',
value => 'simple' &>
<& '/widgets/profile/button.mc',
disp => $lang->maketext('Search'),
name => 'simple_search',
button => 'search_red',
js => qq{onclick="\$('search-type').value = 'simple'"},
useTable => 0 &>
Show more options »
>
<& /widgets/profile/text.mc,
disp => $lang->maketext('Title'),
name => $widget.'|name',
value => $state->{name} || '' &>
<& /widgets/profile/text.mc,
disp => $lang->maketext('URI'),
name => $widget.'|uri',
value => $state->{uri} || '' &>
<& /widgets/profile/text.mc,
disp => $lang->maketext('Keyword'),
name => $widget.'|keyword',
value => $state->{keyword} || '' &>
<& /widgets/profile/text.mc,
disp => $lang->maketext('Text to search'),
name => $widget.'|data_text',
value => $state->{data_text} || '' &>
<& /widgets/profile/select.mc,
disp => $lang->maketext('Type'),
name => $widget.'|element_type_id',
value => $state->{element_type_id} || '',
options => $asset_opts,
localize => 0 &>
% my $active_checked = $state->{active} ? 1 : 0;
<& /widgets/profile/checkbox.mc,
disp => $lang->maketext('Include deleted'),
name => $widget . '|active',
value => 'tf', # XXX: 't' and 'f' (see Bric::App::Callback::Search)
checked => $active_checked,
localize => 0,
useTable => 1,
&>
% if (get_pref("Filter by Site Context")) {
<& /widgets/profile/hidden.mc,
name => "$widget|site_id",
value => $c->get_user_cx(get_user_id) &>
% } elsif (@$sites > 1) {
<& /widgets/profile/select.mc,
disp => $lang->maketext('Site'),
name => $widget.'|site_id',
value => $state->{site_id} || '',
options => [ [ '' => $lang->maketext('All Sites') ],
map { [$_->get_id => $_->get_name] } @$sites ],
localize => 0 &>
% }
<% $lang->maketext('Cover Date') %>:
<& '/widgets/select_time/select_time.mc',
base_name => "$widget|cover_date_start",
indent => 1,
no_hour => 1,
no_min => 1,
repopulate => 0,
def_date => $state->{cover_date_start} ||'',
compact => 1,
style => 'inline',
&>
—<& '/widgets/select_time/select_time.mc',
base_name => "$widget|cover_date_end",
indent => 1,
no_hour => 1,
no_min => 1,
repopulate => 0,
def_date => $state->{cover_date_end} ||'',
compact => 1,
style => 'inline',
&>
<% $lang->maketext('Publish Date') %>:
<& '/widgets/select_time/select_time.mc',
base_name => "$widget|publish_date_start",
indent => 1,
no_hour => 1,
no_min => 1,
repopulate => 0,
def_date => $state->{publish_date_start} ||'',
compact => 1,
style => 'inline',
&>
—<& '/widgets/select_time/select_time.mc',
base_name => "$widget|publish_date_end",
indent => 1,
no_hour => 1,
no_min => 1,
repopulate => 0,
def_date => $state->{publish_date_end} ||'',
compact => 1,
style => 'inline',
&>
<% $lang->maketext('Expire Date') %>:
<& '/widgets/select_time/select_time.mc',
base_name => "$widget|expire_date_start",
indent => 1,
no_hour => 1,
no_min => 1,
repopulate => 0,
def_date => $state->{expire_date_start} ||'',
compact => 1,
style => 'inline',
&>
—<& '/widgets/select_time/select_time.mc',
base_name => "$widget|expire_date_end",
indent => 1,
no_hour => 1,
no_min => 1,
repopulate => 0,
def_date => $state->{expire_date_end} ||'',
compact => 1,
style => 'inline',
&>
<% $insert %>
<& '/widgets/wrappers/table_bottom.mc' &>
% if ($use_form_tag) {