summaryrefslogtreecommitdiff
path: root/rt/share/html
diff options
context:
space:
mode:
authormark <mark>2010-11-20 02:33:04 +0000
committermark <mark>2010-11-20 02:33:04 +0000
commit14ddc73d2c72c357bc80e40aae0c3a7538110450 (patch)
tree8add4c5ee6a201f0589450f483ef178322233556 /rt/share/html
parent4a3151fd9f9c4f7cffd6a5843408301083d93682 (diff)
search tickets on some customer fields, RT#9328
Diffstat (limited to 'rt/share/html')
-rw-r--r--rt/share/html/Callbacks/SearchCustomerFields/Search/Elements/PickBasics/Default46
-rw-r--r--rt/share/html/Elements/SelectCustomerAgent17
-rw-r--r--rt/share/html/Elements/SelectCustomerClass17
-rw-r--r--rt/share/html/Elements/SelectCustomerTag17
4 files changed, 97 insertions, 0 deletions
diff --git a/rt/share/html/Callbacks/SearchCustomerFields/Search/Elements/PickBasics/Default b/rt/share/html/Callbacks/SearchCustomerFields/Search/Elements/PickBasics/Default
new file mode 100644
index 000000000..abbafbcf1
--- /dev/null
+++ b/rt/share/html/Callbacks/SearchCustomerFields/Search/Elements/PickBasics/Default
@@ -0,0 +1,46 @@
+<%init>
+push @$Conditions,
+ {
+ Name => 'Agentnum',
+ Field => 'Agent',
+ Op => {
+ Type => 'component',
+ Path => '/Elements/SelectBoolean',
+ Arguments => { TrueVal=> '=', FalseVal => '!=' },
+ },
+ Value => {
+ Type => 'component',
+ Path => '/Elements/SelectCustomerAgent',
+ },
+ },
+ {
+ Name => 'Classnum',
+ Field => 'Customer Class',
+ Op => {
+ Type => 'component',
+ Path => '/Elements/SelectBoolean',
+ Arguments => { TrueVal=> '=', FalseVal => '!=' },
+ },
+ Value => {
+ Type => 'component',
+ Path => '/Elements/SelectCustomerClass',
+ },
+ },
+ {
+ Name => 'Tagnum',
+ Field => 'Tag',
+ Op => {
+ Type => 'component',
+ Path => '/Elements/SelectBoolean',
+ Arguments => { TrueVal=> '=', FalseVal => '!=' },
+ },
+ Value => {
+ Type => 'component',
+ Path => '/Elements/SelectCustomerTag',
+ },
+ },
+;
+</%init>
+<%ARGS>
+$Conditions => []
+</%ARGS>
diff --git a/rt/share/html/Elements/SelectCustomerAgent b/rt/share/html/Elements/SelectCustomerAgent
new file mode 100644
index 000000000..75a1fba63
--- /dev/null
+++ b/rt/share/html/Elements/SelectCustomerAgent
@@ -0,0 +1,17 @@
+% return if ($RT::URI::freeside::IntegrationType ne 'Internal');
+<select name="<%$Name%>">
+% if ($ShowNullOption) {
+ <option value="">-</option>
+% }
+% for my $agent (qsearch('agent', {'disabled' => ''})) {
+ <option value="<%$agent->agentnum%>" <%
+ $agent->agentnum == $Default||'' ? 'selected' : ''%>
+ ><%$agent->agent%></option>
+% }
+</select>
+<%init></%init>
+<%args>
+$ShowNullOption => 1
+$Name => undef
+$Default => 0
+</%args>
diff --git a/rt/share/html/Elements/SelectCustomerClass b/rt/share/html/Elements/SelectCustomerClass
new file mode 100644
index 000000000..1a03cba8f
--- /dev/null
+++ b/rt/share/html/Elements/SelectCustomerClass
@@ -0,0 +1,17 @@
+% return if ($RT::URI::freeside::IntegrationType ne 'Internal');
+<select name="<%$Name%>">
+% if ($ShowNullOption) {
+ <option value="">-</option>
+% }
+% for my $class (qsearch('cust_class', {'disabled' => ''})) {
+ <option value="<%$class->classnum%>" <%
+ $class->classnum == $Default||'' ? 'selected' : ''%>
+ ><%$class->classname%></option>
+% }
+</select>
+<%init></%init>
+<%args>
+$ShowNullOption => 1
+$Name => undef
+$Default => 0
+</%args>
diff --git a/rt/share/html/Elements/SelectCustomerTag b/rt/share/html/Elements/SelectCustomerTag
new file mode 100644
index 000000000..862766966
--- /dev/null
+++ b/rt/share/html/Elements/SelectCustomerTag
@@ -0,0 +1,17 @@
+% return if ($RT::URI::freeside::IntegrationType ne 'Internal');
+<select name="<%$Name%>">
+% if ($ShowNullOption) {
+ <option value="">-</option>
+% }
+% for my $tag (qsearch('part_tag', {'disabled' => ''})) {
+ <option value="<%$tag->tagnum%>" <%
+ $tag->tagnum == $Default||'' ? 'selected' : ''%>
+ ><%$tag->tagname%></option>
+% }
+</select>
+<%init></%init>
+<%args>
+$ShowNullOption => 1
+$Name => undef
+$Default => 0
+</%args>