Commit fd88d685 authored by Christophe Maudoux's avatar Christophe Maudoux

Fix SAML attribute default value (#1635)

parent 73bba9f6
......@@ -678,9 +678,9 @@ llapp.controller 'TreeCtrl', [
else
node.data = data.value
# Cast int as int (remember that booleans are int for Perl)
if node.type and node.type.match /^(bool|trool|boolOrExpr)$/
node.data = node.data.toString()
else if node.type and node.type.match /^int$/
#if node.type and node.type.match /^(bool|trool|boolOrExpr)$/
#node.data = node.data.toString()
if node.type and node.type.match /^int$/
node.data = parseInt(node.data, 10)
# Split SAML types
else if node.type and node.type.match(/^(saml(Service|Assertion)|blackWhiteList)$/) and not (typeof node.data == 'object')
......
......@@ -5,11 +5,11 @@
<div class="panel-body">
<div class="input-group-solid" role="radiogroup">
<label class="radio-inline">
<input id="bopeOn" type="radio" value="1" name="bope" ng-model="currentNode.data" aria-labelledby="onl" role="radio"/>
<input id="bopeOn" type="radio" ng-value="1" name="bope" ng-model="currentNode.data" ng-checked="currentNode.data==1 || currentNode.data=='1'" aria-labelledby="onl" role="radio"/>
<label id="onl" for="bopeOn" trspan="on"></label>
</label>
<label class="radio-inline">
<input id="bopeOff" type="radio" value="0" name="bope" ng-model="currentNode.data" ng-checked="currentNode.data!==1&&currentNode.data!=='1'" aria-labelledby="offl" role="radio"/>
<input id="bopeOff" type="radio" ng-value="0" name="bope" ng-model="currentNode.data" ng-checked="currentNode.data!==1&&currentNode.data!=='1'" aria-labelledby="offl" role="radio"/>
<label id="offl" for="bopeOff" trspan="off"></label>
</label>
</div>
......
......@@ -5,15 +5,15 @@
<div class="panel-body">
<div class="input-group-solid" role="radiogroup">
<label class="radio-inline">
<input id="bopeOn" type="radio" value="1" name="bope" ng-model="currentNode.data" aria-labelledby="onl" role="radio"/>
<input id="bopeOn" type="radio" ng-value="1" name="bope" ng-model="currentNode.data" aria-labelledby="onl" role="radio"/>
<label id="onl" for="bopeOn" trspan="on"></label>
</label>
<label class="radio-inline">
<input id="bopeOff" type="radio" value="0" name="bope" ng-model="currentNode.data" aria-labelledby="offl" role="radio"/>
<input id="bopeOff" type="radio" ng-value="0" name="bope" ng-model="currentNode.data" aria-labelledby="offl" role="radio"/>
<label id="offl" for="bopeOff" trspan="off"></label>
</label>
<label class="radio-inline">
<input id="bopeExpr" type="radio" value="-1" name="bope" ng-click="currentNode.data=''" ng-checked="currentNode.data!==0&&currentNode.data!=='0'&&currentNode.data!==1&&currentNode.data!=='1'" aria-labelledby="rulel" role="radio"/>
<input id="bopeExpr" type="radio" ng-value="-1" name="bope" ng-click="currentNode.data=''" ng-checked="currentNode.data!==0&&currentNode.data!=='0'&&currentNode.data!=1&&currentNode.data!=='1'" aria-labelledby="rulel" role="radio"/>
<label id="rulel" for="bopeExpr" trspan="specialRule"></label>
</label>
</div>
......
......@@ -28,11 +28,11 @@
<td ng-if="n.type=='bool'">
<div class="input-group-solid" role="radiogroup">
<label class="radio-inline">
<input id="bopeOn/{{n.title}}" type="radio" value="1" ng-model="n.data" role="radio" aria-labelledby="lbopeOn{{n.title}}"/>
<input id="bopeOn/{{n.title}}" type="radio" ng-value="1" ng-model="n.data" role="radio" aria-labelledby="lbopeOn{{n.title}}"/>
<span id="lbopeOn{{n.title}}" for="bopeOn/{{n.title}}" trspan="on"></span>
</label>
<label class="radio-inline">
<input id="bopeOff/{{n.title}}" type="radio" value="0" ng-model="n.data" ng-checked="n.data!==1&&n.data!=='1'" role="radio" aria-labelledby="lbopeOff{{n.title}}"/>
<input id="bopeOff/{{n.title}}" type="radio" ng-value="0" ng-model="n.data" ng-checked="n.data!==1&&n.data!=='1'" role="radio" aria-labelledby="lbopeOff{{n.title}}"/>
<span id="lbopeOff{{n.title}}" for="bopeOff/{{n.title}}" trspan="off"></span>
</label>
</div>
......@@ -41,15 +41,15 @@
<td ng-if="n.type=='trool'">
<div class="input-group-solid" role="radiogroup">
<label class="radio-inline">
<input id="trOn/{{n.title}}" type="radio" value="1" ng-model="n.data" role="radio" aria-labelledby="ltrOn{{n.title}}">
<input id="trOn/{{n.title}}" type="radio" ng-value="1" ng-model="n.data" role="radio" aria-labelledby="ltrOn{{n.title}}">
<span id="ltrOn{{n.title}}" for="trOn/{{n.title}}" trspan="on"></span>
</label>
<label class="radio-inline">
<input id="trOff/{{n.title}}" type="radio" value="0" ng-model="n.data" role="radio" aria-labelledby="ltrOff{{n.title}}">
<input id="trOff/{{n.title}}" type="radio" ng-value="0" ng-model="n.data" role="radio" aria-labelledby="ltrOff{{n.title}}">
<span id="ltrOff{{n.title}}" for="trOff/{{n.title}}" trspan="off"></span>
</label>
<label class="radio-inline">
<input id="trDefault/{{n.title}}" type="radio" value="-1" ng-model="n.data" ng-checked="n.data!==1&&n.data!=='1'&&n.data!==0&&n.data!=='0'" role="radio" aria-labelledby="ltrDefault{{n.title}}">
<input id="trDefault/{{n.title}}" type="radio" ng-value="-1" ng-model="n.data" ng-checked="n.data!==1&&n.data!=='1'&&n.data!==0&&n.data!=='0'" role="radio" aria-labelledby="ltrDefault{{n.title}}">
<span id="ltrDefault{{n.title}}" for="trDefault/{{n.title}}" trspan="default"></span>
</label>
</div>
......@@ -58,15 +58,15 @@
<td ng-if="n.type=='boolOrExpr'">
<div class="input-group-solid" role="radiogroup">
<label class="radio-inline">
<input id="boeOn/{{n.title}}" type="radio" value="1" ng-model="n.data" role="radio" aria-labelledby="lboeOn{{n.title}}">
<input id="boeOn/{{n.title}}" type="radio" ng-value="1" ng-model="n.data" role="radio" aria-labelledby="lboeOn{{n.title}}">
<span id="lboeOn{{n.title}}" for="boeOn/{{n.title}}" trspan="on"></span>
</label>
<label class="radio-inline">
<input id="boeOff/{{n.title}}" type="radio" value="0" ng-model="n.data" role="radio" aria-labelledby="lboeOff{{n.title}}">
<input id="boeOff/{{n.title}}" type="radio" ng-value="0" ng-model="n.data" role="radio" aria-labelledby="lboeOff{{n.title}}">
<span id="lboeOff{{n.title}}" for="boeOff/{{n.title}}" trspan="off"></span>
</label>
<label class="radio-inline">
<input id="boeExpr/{{n.title}}" type="radio" value="-1" ng-click="n.data=''" ng-checked="n.data!==0&&n.data!=='0'&&n.data!==1&&n.data!=='1'" role="radio" aria-labelledby="lboeExpr{{n.title}}">
<input id="boeExpr/{{n.title}}" type="radio" ng-value="-1" ng-click="n.data=''" ng-checked="n.data!==0&&n.data!=='0'&&n.data!==1&&n.data!=='1'" role="radio" aria-labelledby="lboeExpr{{n.title}}">
<span id="lboeExpr{{n.title}}" for="boeExpr/{{n.title}}" trspan="specialRule"></span>
</label>
</div>
......
......@@ -5,15 +5,15 @@
<div class="panel-body">
<div class="input-group-solid" role="radiogroup">
<label class="radio-inline">
<input id="trOn" type="radio" value="1" ng-model="currentNode.data" role="radio" aria-labelledby="ltrOn">
<input id="trOn" type="radio" ng-value="1" ng-model="currentNode.data" role="radio" aria-labelledby="ltrOn">
<span id="ltrOn" for="trOn" trspan="on"></span>
</label>
<label class="radio-inline">
<input id="trOff" type="radio" value="0" ng-model="currentNode.data" role="radio" aria-labelledby="ltrOff">
<input id="trOff" type="radio" ng-value="0" ng-model="currentNode.data" role="radio" aria-labelledby="ltrOff">
<span id="ltrOff" for="trOff" trspan="off"></span>
</label>
<label class="radio-inline">
<input id="trDefault" type="radio" value="-1" ng-model="currentNode.data" ng-checked="currentNode.data!==1&&currentNode.data!=='1'&&currentNode.data!==0&&currentNode.data!=='0'" role="radio" aria-labelledby="ltrDefault">
<input id="trDefault" type="radio" ng-value="-1" ng-model="currentNode.data" ng-checked="currentNode.data!==1&&currentNode.data!=='1'&&currentNode.data!==0&&currentNode.data!=='0'" role="radio" aria-labelledby="ltrDefault">
<span id="ltrDefault" for="trDefault" trspan="default"></span>
</label>
</div>
......
......@@ -823,9 +823,7 @@ This file contains:
} else {
node.data = data.value;
}
if (node.type && node.type.match(/^(bool|trool|boolOrExpr)$/)) {
node.data = node.data.toString();
} else if (node.type && node.type.match(/^int$/)) {
if (node.type && node.type.match(/^int$/)) {
node.data = parseInt(node.data, 10);
} else if (node.type && node.type.match(/^(saml(Service|Assertion)|blackWhiteList)$/) && !(typeof node.data === 'object')) {
node.data = node.data.split(';');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment