Skip to content

Commit

Permalink
Fix credentialsRead to display correct selection in dropdown for auth…
Browse files Browse the repository at this point in the history
…entication_protocol, privacy_protocol and security_level.
  • Loading branch information
mark-unwin committed Mar 5, 2024
1 parent 36db28d commit 6b308cd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/Views/credentialsRead.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
<label for="authentication_protocol" class="form-label"><?= __('authentication_protocol') ?></label>
<div class="input-group">
<select class="form-select" id="credentials.authentication_protocol" name="credentials.authentication_protocol" data-original-value="<?= $resource->type ?>" disabled>
<option value="MD5">MD5</option>
<option value="SHA">SHA</option>
<option value="MD5" <?php if (!empty($resource->credentials->authentication_protocol) and $resource->credentials->authentication_protocol == 'MD5') { echo 'selected '; } ?>>MD5</option>
<option value="SHA" <?php if (!empty($resource->credentials->authentication_protocol) and $resource->credentials->authentication_protocol == 'SHA') { echo 'selected '; } ?>>SHA</option>
</select>
<?php if ($update) { ?>
<div class="float-end" style="padding-left:4px;">
Expand All @@ -72,8 +72,8 @@
<label for="privacy_protocol" class="form-label"><?= __('Privacy Protocol') ?></label>
<div class="input-group">
<select class="form-select" id="credentials.privacy_protocol" name="credentials.privacy_protocol" data-original-value="<?= $resource->type ?>" disabled>
<option value="AES">AES</option>
<option value="DES">DES</option>
<option value="AES" <?php if (!empty($resource->credentials->privacy_protocol) and $resource->credentials->privacy_protocol == 'AES') { echo 'selected '; } ?>>AES</option>
<option value="DES" <?php if (!empty($resource->credentials->privacy_protocol) and $resource->credentials->privacy_protocol == 'DES') { echo 'selected '; } ?>>DES</option>
</select>
<?php if ($update) { ?>
<div class="float-end" style="padding-left:4px;">
Expand All @@ -92,9 +92,9 @@
<label for="security_level" class="form-label"><?= __('Security Level') ?></label>
<div class="input-group">
<select class="form-select" id="credentials.security_level" name="credentials.security_level" data-original-value="<?= $resource->type ?>" disabled>
<option value="noAuthNoPriv">noAuthNoPriv</option>
<option value="authNoPriv">authNoPriv</option>
<option value="authPriv">authPriv</option>
<option value="noAuthNoPriv" <?php if (!empty($resource->credentials->security_level) and $resource->credentials->security_level == 'noAuthNoPriv') { echo 'selected '; } ?>>noAuthNoPriv</option>
<option value="authNoPriv" <?php if (!empty($resource->credentials->security_level) and $resource->credentials->security_level == 'authNoPriv') { echo 'selected '; } ?>>authNoPriv</option>
<option value="authPriv" <?php if (!empty($resource->credentials->security_level) and $resource->credentials->security_level == 'authPriv') { echo 'selected '; } ?>>authPriv</option>
</select>
<?php if ($update) { ?>
<div class="float-end" style="padding-left:4px;">
Expand Down

0 comments on commit 6b308cd

Please sign in to comment.