Skip to content

Commit

Permalink
frontend: add a default value for the subnet fields and remove the in…
Browse files Browse the repository at this point in the history
…valid slash from the placeholder. reported in #31.
  • Loading branch information
mbolli committed Sep 30, 2020
1 parent 4393fca commit 5f2702e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ <h3>ip Aggregation</h3>
<option value="srcip6">IPv6 subnets</option>
</select>
<div id="sourceCIDRPrefixDiv" class="hidden pull-left" style="width:30%">
<input data-disable-on="bi-directional" id="sourceCIDRPrefix" placeholder="/24" name="srcipprefix" type="text" class="form-control">
<input data-disable-on="bi-directional" id="sourceCIDRPrefix" placeholder="24" name="srcipprefix" type="text" class="form-control">
</div>
</div>
</div>
Expand All @@ -208,7 +208,7 @@ <h3>ip Aggregation</h3>
<option value="dstip6">IPv6 subnets</option>
</select>
<div id="destinationCIDRPrefixDiv" class="hidden pull-left" style="width:30%">
<input data-disable-on="bi-directional" id="destinationCIDRPrefix" placeholder="/24" name="dstipprefix" type="text" class="form-control">
<input data-disable-on="bi-directional" id="destinationCIDRPrefix" placeholder="24" name="dstipprefix" type="text" class="form-control">
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/js/nfsen-ng.js
Original file line number Diff line number Diff line change
Expand Up @@ -1024,12 +1024,12 @@ $(document).ready(function() {
case 'srcip4':
case 'dstip4':
$prefixDiv.removeClass('hidden');
$prefixDiv.find('input').attr('maxlength', 2).val('');
$prefixDiv.find('input').attr('maxlength', 2).val('24');
break;
case 'srcip6':
case 'dstip6':
$prefixDiv.removeClass('hidden');
$prefixDiv.find('input').attr('maxlength', 3).val('');
$prefixDiv.find('input').attr('maxlength', 3).val('128');
break;
}
});
Expand Down

0 comments on commit 5f2702e

Please sign in to comment.