Skip to content
Browse files
issue: Allow iFrame Rename
This renames the `Allow iFrames` setting to `Allow System iFrame` as this
better fits the use-case. This also updates the Help Tip information to
include the new title and expands on what you can input (ie. URLs). Lastly,
this renames the validator for the `Allow System iFrame` setting from
`cs-domain` to `cs-url` as it technically validates a comma separated list
of URLs (not just domains).
  • Loading branch information
JediKev committed Oct 28, 2019
1 parent a6e22ab commit 2330f47fb8d4bdf67fbe73b8006e1cec85af9cf2
Showing with 11 additions and 7 deletions.
  1. +1 −1 include/class.config.php
  2. +1 −1 include/class.validator.php
  3. +2 −2 include/i18n/en_US/help/tips/settings.system.yaml
  4. +7 −3 include/staff/
@@ -1184,7 +1184,7 @@ function updateSystemSettings($vars, &$errors) {
$f['helpdesk_title']=array('type'=>'string', 'required'=>1, 'error'=>__('Helpdesk title is required'));
$f['default_dept_id']=array('type'=>'int', 'required'=>1, 'error'=>__('Default Department is required'));
$f['autolock_minutes']=array('type'=>'int', 'required'=>1, 'error'=>__('Enter lock time in minutes'));
$f['allow_iframes']=array('type'=>'cs-domain', 'required'=>0, 'error'=>__('Enter comma separated list of domains'));
$f['allow_iframes']=array('type'=>'cs-url', 'required'=>0, 'error'=>__('Enter comma separated list of urls'));
$f['acl']=array('type'=>'ipaddr', 'required'=>0, 'error'=>__('Enter comma separated list of IP addresses'));
//Date & Time Options
$f['time_format']=array('type'=>'string', 'required'=>1, 'error'=>__('Time format is required'));
@@ -123,7 +123,7 @@ function validate($source,$userinput=true){
if(!is_numeric($this->input[$k]) || (strlen($this->input[$k])!=5))
case 'cs-domain': // Comma separated list of domains
case 'cs-url': // Comma separated list of urls
if($values=explode(',', $this->input[$k]))
foreach($values as $v)
@@ -102,9 +102,9 @@ collision_avoidance:
Enter <span class="doc-desc-opt">0</span> to disable the lockout feature.
title: Allow iFrames
title: Allow System iFrame
content: >
Enter comma separated list of domains for the system to be framed
Enter comma separated list of urls/domains for the system to be framed
in. If left empty, the system will default to 'self'. This accepts
domain wildcards, HTTP/HTTPS URL scheme, and port numbers.
@@ -132,10 +132,14 @@
<td><?php echo __('Allow iFrames'); ?>:</td>
<td><input type="text" size="40" name="allow_iframes" value="<?php echo $config['allow_iframes']; ?>">
&nbsp;<font class="error">&nbsp;<?php echo $errors['allow_iframes']; ?></font>
<td><?php echo __('Allow System iFrame'); ?>:</td>
<td><input type="text" size="40" name="allow_iframes" value="<?php echo $config['allow_iframes']; ?>"
placeholder="eg. https://domain.tld, *.domain.tld">
<i class="help-tip icon-question-sign" href="#allow_iframes"></i>
<?php if ($errors['allow_iframes']) { ?>
<font class="error">&nbsp;<?php echo $errors['allow_iframes']; ?></font>
<?php } ?>

0 comments on commit 2330f47

Please sign in to comment.