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
c5b95d0d
Commit
c5b95d0d
authored
10 years ago
by
Jared Hancock
Browse files
Options
Downloads
Patches
Plain Diff
forms: Hide 'require for ticket close' for non ticket-related forms
parent
5989cb6d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/class.dynamic_forms.php
+19
-14
19 additions, 14 deletions
include/class.dynamic_forms.php
include/staff/templates/dynamic-field-config.tmpl.php
+6
-3
6 additions, 3 deletions
include/staff/templates/dynamic-field-config.tmpl.php
with
25 additions
and
17 deletions
include/class.dynamic_forms.php
+
19
−
14
View file @
c5b95d0d
...
...
@@ -423,27 +423,32 @@ class DynamicFormField extends VerySimpleModel {
var
$_field
;
const
FLAG_ENABLED
=
0x0001
;
const
FLAG_EXT_STORED
=
0x0002
;
// Value stored outside of form_entry_value
const
FLAG_CLOSE_REQUIRED
=
0x0004
;
const
FLAG_MASK_CHANGE
=
0x0010
;
const
FLAG_MASK_DELETE
=
0x0020
;
const
FLAG_MASK_EDIT
=
0x0040
;
const
FLAG_MASK_DISABLE
=
0x0080
;
const
FLAG_ENABLED
=
0x000
0
1
;
const
FLAG_EXT_STORED
=
0x000
0
2
;
// Value stored outside of form_entry_value
const
FLAG_CLOSE_REQUIRED
=
0x000
0
4
;
const
FLAG_MASK_CHANGE
=
0x00
0
10
;
const
FLAG_MASK_DELETE
=
0x00
0
20
;
const
FLAG_MASK_EDIT
=
0x00
0
40
;
const
FLAG_MASK_DISABLE
=
0x00
0
80
;
const
FLAG_MASK_REQUIRE
=
0x10000
;
const
FLAG_MASK_VIEW
=
0x20000
;
const
FLAG_MASK_NAME
=
0x40000
;
const
MASK_MASK_INTERNAL
=
0x400B0
;
# !change, !delete, !disable, !edit-name
const
MASK_MASK_ALL
=
0x700F0
;
const
FLAG_CLIENT_VIEW
=
0x0100
;
const
FLAG_CLIENT_EDIT
=
0x0200
;
const
FLAG_CLIENT_REQUIRED
=
0x0400
;
const
FLAG_CLIENT_VIEW
=
0x0
0
100
;
const
FLAG_CLIENT_EDIT
=
0x0
0
200
;
const
FLAG_CLIENT_REQUIRED
=
0x0
0
400
;
const
FLAG_AGENT_VIEW
=
0x1000
;
const
FLAG_AGENT_EDIT
=
0x2000
;
const
FLAG_AGENT_REQUIRED
=
0x4000
;
const
MASK_CLIENT_FULL
=
0x00700
;
const
FLAG_AGENT_VIEW
=
0x01000
;
const
FLAG_AGENT_EDIT
=
0x02000
;
const
FLAG_AGENT_REQUIRED
=
0x04000
;
const
MASK_AGENT_FULL
=
0x7000
;
// Multiple inheritance -- delegate to FormField
function
__call
(
$what
,
$args
)
{
...
...
This diff is collapsed.
Click to expand it.
include/staff/templates/dynamic-field-config.tmpl.php
+
6
−
3
View file @
c5b95d0d
...
...
@@ -38,7 +38,7 @@
echo
DynamicFormField
::
FLAG_CLIENT_VIEW
;
?>
"
<?php
if
(
$field
->
hasFlag
(
DynamicFormField
::
FLAG_CLIENT_VIEW
))
echo
'checked="checked"'
;
if
(
$field
->
isPrivacyForced
())
echo
' disabled="disabled"'
;
?>
>
<?php
echo
__
(
'For
Client
s'
);
?>
<br/>
?>
>
<?php
echo
__
(
'For
EndUser
s'
);
?>
<br/>
</div>
<div
class=
"span3"
>
<input
type=
"checkbox"
name=
"flags[]"
value=
"
<?php
...
...
@@ -63,7 +63,7 @@
echo
DynamicFormField
::
FLAG_CLIENT_REQUIRED
;
?>
"
<?php
if
(
$field
->
hasFlag
(
DynamicFormField
::
FLAG_CLIENT_REQUIRED
))
echo
'checked="checked"'
;
if
(
$field
->
isRequirementForced
())
echo
' disabled="disabled"'
;
?>
>
<?php
echo
__
(
'For
Client
s'
);
?>
<br/>
?>
>
<?php
echo
__
(
'For
EndUser
s'
);
?>
<br/>
</div>
<div
class=
"span3"
>
<input
type=
"checkbox"
name=
"flags[]"
value=
"
<?php
...
...
@@ -86,7 +86,7 @@
<input
type=
"checkbox"
name=
"flags[]"
value=
"
<?php
echo
DynamicFormField
::
FLAG_CLIENT_EDIT
;
?>
"
<?php
if
(
$field
->
hasFlag
(
DynamicFormField
::
FLAG_CLIENT_EDIT
))
echo
'checked="checked"'
;
?>
>
<?php
echo
__
(
'For
Client
s'
);
?>
<br/>
?>
>
<?php
echo
__
(
'For
EndUser
s'
);
?>
<br/>
</div>
<div
class=
"span3"
>
<input
type=
"checkbox"
name=
"flags[]"
value=
"
<?php
...
...
@@ -94,6 +94,8 @@
if
(
$field
->
hasFlag
(
DynamicFormField
::
FLAG_AGENT_EDIT
))
echo
'checked="checked"'
;
?>
>
<?php
echo
__
(
'For Agents'
);
?>
<br/>
</div>
<?php
if
(
in_array
(
$field
->
get
(
'form'
)
->
get
(
'type'
),
array
(
'G'
,
'T'
)))
{
?>
<hr
class=
"faded"
/>
<div
class=
"span4"
>
...
...
@@ -109,6 +111,7 @@
if
(
$field
->
hasFlag
(
DynamicFormField
::
FLAG_CLOSE_REQUIRED
))
echo
'checked="checked"'
;
?>
>
<?php
echo
__
(
'Required to close a ticket'
);
?>
<br/>
</div>
<?php
}
?>
<?php
}
?>
</div>
</div>
...
...
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