Author: jfthomps
Date: Thu Aug 10 20:04:17 2017
New Revision: 1804716
URL: http://svn.apache.org/viewvc?rev=1804716&view=rev
Log:
VCL-1029 - add a section for managing affiliations to Site Configuration
siteconfig.php: modified AffilTextVariable::getHTML: added $nooptions variable
to track if there are no options to display for a given block - this is mainly
for Shibboleth related variables when there are only the Global and Local
affiliations
Modified:
vcl/trunk/web/.ht-inc/siteconfig.php
Modified: vcl/trunk/web/.ht-inc/siteconfig.php
URL:
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/siteconfig.php?rev=1804716&r1=1804715&r2=1804716&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/siteconfig.php (original)
+++ vcl/trunk/web/.ht-inc/siteconfig.php Thu Aug 10 20:04:17 2017
@@ -958,6 +958,10 @@ class AffilTextVariable {
$affils = $this->affils;
$saveids = array();
+ $nooptions = 0;
+ if(count($affils) == 0)
+ $nooptions = 1;
+
$required = 0;
if($globalopts) {
@@ -1032,11 +1036,15 @@ class AffilTextVariable {
$h .= "<div id=\"{$this->domidbase}msg\"></div>\n";
$saveids = implode(',', $saveids);
$h .= "<input type=\"hidden\" id=\"{$this->domidbase}savekeys\"
value=\"$saveids\">\n";
- $h .= dijitButton("{$this->domidbase}btn", i('Submit Changes'),
"{$this->jsname}.saveSettings();", 1);
- $cdata = $this->basecdata;
- $cdata['origvals'] = $this->values;
- $cont = addContinuationsEntry('AJupdateAllSettings', $cdata);
- $h .= "<input type=\"hidden\" id=\"{$this->domidbase}cont\"
value=\"$cont\">\n";
+ if($nooptions)
+ $h .= "(There are currently no options that can be set
in this section.)<br><br>";
+ else {
+ $h .= dijitButton("{$this->domidbase}btn", i('Submit
Changes'), "{$this->jsname}.saveSettings();", 1);
+ $cdata = $this->basecdata;
+ $cdata['origvals'] = $this->values;
+ $cont = addContinuationsEntry('AJupdateAllSettings',
$cdata);
+ $h .= "<input type=\"hidden\"
id=\"{$this->domidbase}cont\" value=\"$cont\">\n";
+ }
$h .= "</div>\n";
return $h;
}