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
ef915213
Unverified
Commit
ef915213
authored
6 years ago
by
Peter Rotich
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #4601 from protich/issue/field-permissions++
Field: Help Topic Forms
parents
8e4f621e
dfc8c63e
No related branches found
Branches containing commit
Tags
v1.8.0
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/client/open.inc.php
+3
-1
3 additions, 1 deletion
include/client/open.inc.php
include/client/templates/dynamic-form.tmpl.php
+8
-0
8 additions, 0 deletions
include/client/templates/dynamic-form.tmpl.php
include/staff/ticket-open.inc.php
+1
-0
1 addition, 0 deletions
include/staff/ticket-open.inc.php
with
12 additions
and
1 deletion
include/client/open.inc.php
+
3
−
1
View file @
ef915213
...
@@ -89,7 +89,9 @@ if ($info['topicId'] && ($topic=Topic::lookup($info['topicId']))) {
...
@@ -89,7 +89,9 @@ if ($info['topicId'] && ($topic=Topic::lookup($info['topicId']))) {
</tr>
</tr>
</tbody>
</tbody>
<tbody
id=
"dynamic-form"
>
<tbody
id=
"dynamic-form"
>
<?php
foreach
(
$forms
as
$form
)
{
<?php
$options
=
array
(
'mode'
=>
'create'
);
foreach
(
$forms
as
$form
)
{
include
(
CLIENTINC_DIR
.
'templates/dynamic-form.tmpl.php'
);
include
(
CLIENTINC_DIR
.
'templates/dynamic-form.tmpl.php'
);
}
?>
}
?>
</tbody>
</tbody>
...
...
This diff is collapsed.
Click to expand it.
include/client/templates/dynamic-form.tmpl.php
+
8
−
0
View file @
ef915213
...
@@ -16,6 +16,14 @@ $isCreate = (isset($options['mode']) && $options['mode'] == 'create');
...
@@ -16,6 +16,14 @@ $isCreate = (isset($options['mode']) && $options['mode'] == 'create');
// Form fields, each with corresponding errors follows. Fields marked
// Form fields, each with corresponding errors follows. Fields marked
// 'private' are not included in the output for clients
// 'private' are not included in the output for clients
foreach
(
$form
->
getFields
()
as
$field
)
{
foreach
(
$form
->
getFields
()
as
$field
)
{
try
{
if
(
!
$field
->
isEnabled
())
continue
;
}
catch
(
Exception
$e
)
{
// Not connected to a DynamicFormField
}
if
(
$isCreate
)
{
if
(
$isCreate
)
{
if
(
!
$field
->
isVisibleToUsers
()
&&
!
$field
->
isRequiredForUsers
())
if
(
!
$field
->
isVisibleToUsers
()
&&
!
$field
->
isRequiredForUsers
())
continue
;
continue
;
...
...
This diff is collapsed.
Click to expand it.
include/staff/ticket-open.inc.php
+
1
−
0
View file @
ef915213
...
@@ -348,6 +348,7 @@ if ($_POST)
...
@@ -348,6 +348,7 @@ if ($_POST)
</tbody>
</tbody>
<tbody
id=
"dynamic-form"
>
<tbody
id=
"dynamic-form"
>
<?php
<?php
$options
=
array
(
'mode'
=>
'create'
);
foreach
(
$forms
as
$form
)
{
foreach
(
$forms
as
$form
)
{
print
$form
->
getForm
(
$_SESSION
[
':form-data'
])
->
getMedia
();
print
$form
->
getForm
(
$_SESSION
[
':form-data'
])
->
getMedia
();
include
(
STAFFINC_DIR
.
'templates/dynamic-form.tmpl.php'
);
include
(
STAFFINC_DIR
.
'templates/dynamic-form.tmpl.php'
);
...
...
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