[freeside-commits] freeside/httemplate/elements tr-select-cust_tag.html, NONE, 1.1 select-cust_tag.html, NONE, 1.1
Ivan,,,
ivan at wavetail.420.am
Fri Jul 16 16:45:26 PDT 2010
- Previous message: [freeside-commits] freeside/FS/FS AccessRight.pm, 1.53, 1.54 cust_main.pm, 1.524, 1.525 Record.pm, 1.204, 1.205 cust_tag.pm, 1.1, 1.2
- Next message: [freeside-commits] freeside/httemplate/edit/cust_main top_misc.html, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv17937/httemplate/elements
Added Files:
tr-select-cust_tag.html select-cust_tag.html
Log Message:
customer tags, RT#9192
--- NEW FILE: tr-select-cust_tag.html ---
% if ( $curuser->access_right('Edit customer tags') && @part_tag ) {
<TR>
<TD ALIGN="right"><% $opt{'label'} || 'Tags' %></TD>
<TD>
<% include( '/elements/select-cust_tag.html',
'curr_value' => \@curr_tagnum,
'part_tag' => \@part_tag,
%opt,
)
%>
</TD>
</TR>
% } else {
% foreach my $tagnum (@curr_tagnum) {
<INPUT TYPE="hidden" NAME="tagnum" VALUE="<% $tagnum %>">
% }
% }
<%init>
my $curuser = $FS::CurrentUser::CurrentUser;
my %opt = @_;
my $cgi = $opt{'cgi'};
my @curr_tagnum = ();
if ( $cgi->param('error') ) {
@curr_tagnum = $cgi->param('tagnum');
} elsif ( $opt{'custnum'} ) {
@curr_tagnum = map $_->tagnum,
qsearch('cust_tag', { 'custnum' => $opt{'custnum'} } );
}
my $extra_sql = "WHERE disabled IS NULL OR disabled = '' ";
$extra_sql .= ' OR tagnum IN ('. join(',', @curr_tagnum). ')' if @curr_tagnum;
my @part_tag = qsearch({
'table' => 'part_tag',
'hashref' => {},
'extra_sql' => $extra_sql,
});
</%init>
--- NEW FILE: select-cust_tag.html ---
<% include( '/elements/select-table.html',
'table' => 'part_tag',
'name_col' => 'tagname', #tagname - tagdesc??
'multiple' => 1,
#'value' => $agentnum || '',
#'agent_virt' => 1,
'hashref' => { 'disabled' => '' },
'order_by' => ' ORDER BY tagname',
%opt,
)
%>
<%init>
my %opt = @_;
#my $agentnum = $opt{'curr_value'} || $opt{'value'};
$opt{'records'} = delete $opt{'part_tag'}
if $opt{'part_tag'};
</%init>
- Previous message: [freeside-commits] freeside/FS/FS AccessRight.pm, 1.53, 1.54 cust_main.pm, 1.524, 1.525 Record.pm, 1.204, 1.205 cust_tag.pm, 1.1, 1.2
- Next message: [freeside-commits] freeside/httemplate/edit/cust_main top_misc.html, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list