Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker
osticket
Commits
ef98afc6
Commit
ef98afc6
authored
9 years ago
by
Peter Rotich
Browse files
Options
Downloads
Patches
Plain Diff
Ticket Source
Unify ticket source and preserve original (e.g Wed) source on ticket edit.
parent
a1bae6ec
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/class.ticket.php
+10
-0
10 additions, 0 deletions
include/class.ticket.php
include/staff/ticket-edit.inc.php
+11
-6
11 additions, 6 deletions
include/staff/ticket-edit.inc.php
include/staff/ticket-open.inc.php
+3
-1
3 additions, 1 deletion
include/staff/ticket-open.inc.php
with
24 additions
and
7 deletions
include/class.ticket.php
+
10
−
0
View file @
ef98afc6
...
...
@@ -145,6 +145,11 @@ class TicketModel extends VerySimpleModel {
/* @trans */
'Phone'
,
'Email'
=>
/* @trans */
'Email'
,
'Web'
=>
/* @trans */
'Web'
,
'API'
=>
/* @trans */
'API'
,
'Other'
=>
/* @trans */
'Other'
,
);
...
...
@@ -2746,6 +2751,11 @@ implements RestrictedAccess, Threadable {
$errors
[
'duedate'
]
=
__
(
'Due date must be in the future'
);
}
if
(
isset
(
$vars
[
'source'
])
// Check ticket source if provided
&&
!
array_key_exists
(
$vars
[
'source'
],
Ticket
::
getSources
()))
$errors
[
'source'
]
=
sprintf
(
__
(
'Invalid source given - %s'
),
Format
::
htmlchars
(
$vars
[
'source'
]));
// Validate dynamic meta-data
$forms
=
DynamicFormEntry
::
forTicket
(
$this
->
getId
());
foreach
(
$forms
as
$form
)
{
...
...
This diff is collapsed.
Click to expand it.
include/staff/ticket-edit.inc.php
+
11
−
6
View file @
ef98afc6
...
...
@@ -70,12 +70,17 @@ if ($_POST)
</td>
<td>
<select
name=
"source"
>
<option
value=
""
selected
>
—
<?php
echo
__
(
'Select Source'
);
?>
—
</option>
<option
value=
"Phone"
<?php
echo
(
$info
[
'source'
]
==
'Phone'
)
?
'selected="selected"'
:
''
;
?>
>
<?php
echo
__
(
'Phone'
);
?>
</option>
<option
value=
"Email"
<?php
echo
(
$info
[
'source'
]
==
'Email'
)
?
'selected="selected"'
:
''
;
?>
>
<?php
echo
__
(
'Email'
);
?>
</option>
<option
value=
"Web"
<?php
echo
(
$info
[
'source'
]
==
'Web'
)
?
'selected="selected"'
:
''
;
?>
>
<?php
echo
__
(
'Web'
);
?>
</option>
<option
value=
"API"
<?php
echo
(
$info
[
'source'
]
==
'API'
)
?
'selected="selected"'
:
''
;
?>
>
<?php
echo
__
(
'API'
);
?>
</option>
<option
value=
"Other"
<?php
echo
(
$info
[
'source'
]
==
'Other'
)
?
'selected="selected"'
:
''
;
?>
>
<?php
echo
__
(
'Other'
);
?>
</option>
<option
value=
""
selected
>
—
<?php
echo
__
(
'Select Source'
);
?>
—
</option>
<?php
$source
=
$info
[
'source'
]
?:
'Phone'
;
foreach
(
Ticket
::
getSources
()
as
$k
=>
$v
)
{
echo
sprintf
(
'<option value="%s" %s>%s</option>'
,
$k
,
(
$source
==
$k
)
?
'selected="selected"'
:
''
,
$v
);
}
?>
</select>
<font
class=
"error"
><b>
*
</b>
<?php
echo
$errors
[
'source'
];
?>
</font>
</td>
...
...
This diff is collapsed.
Click to expand it.
include/staff/ticket-open.inc.php
+
3
−
1
View file @
ef98afc6
...
...
@@ -131,7 +131,9 @@ if ($_POST)
<select
name=
"source"
>
<?php
$source
=
$info
[
'source'
]
?:
'Phone'
;
foreach
(
Ticket
::
getSources
()
as
$k
=>
$v
)
$sources
=
Ticket
::
getSources
();
unset
(
$sources
[
'Web'
],
$sources
[
'API'
]);
foreach
(
$sources
as
$k
=>
$v
)
echo
sprintf
(
'<option value="%s" %s>%s</option>'
,
$k
,
(
$source
==
$k
)
?
'selected="selected"'
:
''
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment