}
sub render_inputs {
- $main::lxdebug->enter_sub();
+ $main::lxdebug->enter_sub(2);
my $self = shift;
my %params = @_;
$var->{VALID_BOX} = $form->parse_html_template('amcvar/render_checkboxes', { var => $var, %options });
}
- $main::lxdebug->leave_sub();
+ $main::lxdebug->leave_sub(2);
}
sub render_search_options {
my $myconfig = \%main::myconfig;
my $form = $main::form;
+ $params{hidden_cvar_filters} = $myconfig->{hide_cvar_search_options};
+
$params{include_prefix} = 'l_' unless defined($params{include_prefix});
$params{include_value} ||= '1';
}
if (@sub_where) {
- push @sub_where, qq|cvar.sub_module = ?|;
- push @sub_values, "$params{sub_module}";
+ add_token(\@sub_where, \@sub_values, col => 'cvar.sub_module', val => $params{sub_module} || '');
push @where,
qq|$not EXISTS(
return ($date_fields, $number_fields);
}
-=head2 VALIDITY
-
-Suppose the following scenario:
-
-You have a lot of parts in your database, and a set of properties cofigured. Now not every part has every of these properties, some combinations will just make no sense. In order to clean up your inputs a bit, you want to mark certain combinations as invalid, blocking them from modification and possibly display.
-
-Validity is assumed. If you modify validity, you actually save B<invalidity>.
-iNvalidity is saved as a function of config_id, and the trans_id
-
-In the naive way, disable an attribute for a specific id (simple)
-
-=cut
sub save_custom_variables_validity {
$main::lxdebug->enter_sub();
}
sub get_custom_variables_validity {
- $main::lxdebug->enter_sub();
+ $main::lxdebug->enter_sub(2);
my $self = shift;
my %params = @_;
my ($invalid) = selectfirst_array_query($form, $dbh, $query, conv_i($params{config_id}), conv_i($params{trans_id}));
- $main::lxdebug->leave_sub();
+ $main::lxdebug->leave_sub(2);
return !$invalid;
}
1;
+
+__END__
+
+=head1 NAME
+
+SL::CVar.pm - Custom Variables module
+
+=head1 SYNOPSIS
+
+ # dealing with configs
+
+ my $all_configs = CVar->get_configs()
+ my $config = CVar->get_config(id => '1234')
+
+ CVar->save_config($config);
+ CVar->delete->config($config)
+
+ # dealing with custom vars
+
+ CVar->get_custom_variables(module => 'ic')
+
+=head2 VALIDITY
+
+Suppose the following scenario:
+
+You have a lot of parts in your database, and a set of properties cofigured. Now not every part has every of these properties, some combinations will just make no sense. In order to clean up your inputs a bit, you want to mark certain combinations as invalid, blocking them from modification and possibly display.
+
+Validity is assumed. If you modify validity, you actually save B<invalidity>.
+Invalidity is saved as a function of config_id, and the trans_id
+
+In the naive way, disable an attribute for a specific id (simple)
+
+=cut