mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
ipsec: make hash selection selectpicker in both phases #1852
This commit is contained in:
parent
037a92f2ca
commit
844aa19112
@ -329,7 +329,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
}
|
||||
|
||||
if (empty($pconfig['hash-algorithm'])) {
|
||||
$input_errors[] = gettext('Hash algorithm selection cannot be empty.');
|
||||
$input_errors[] = gettext("At least one hashing algorithm needs to be selected.");
|
||||
$pconfig['hash-algorithm'] = array();
|
||||
}
|
||||
|
||||
@ -926,8 +926,8 @@ endforeach; ?>
|
||||
);
|
||||
foreach ($p1_halgos as $algo => $algoname) :
|
||||
?>
|
||||
<option value="<?=$algo;?>" <?= in_array($algo, $pconfig['hash-algorithm']) ? 'selected="selected"' : '' ?>>
|
||||
<?=$algoname;?>
|
||||
<option value="<?= html_safe($algo) ?>" <?= in_array($algo, $pconfig['hash-algorithm']) ? 'selected="selected"' : '' ?>>
|
||||
<?= html_safe($algoname) ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
?>
|
||||
|
||||
@ -337,6 +337,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
$pconfig['hash-algorithm-option'] = array();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -657,13 +658,13 @@ endif; ?>
|
||||
<tr>
|
||||
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext("Hash algorithms"); ?></td>
|
||||
<td style="width:78%" class="vtable">
|
||||
<?php
|
||||
foreach ($p2_halgos as $algo => $algoname) :?>
|
||||
<input type="checkbox" name="hash-algorithm-option[]" value="<?=$algo;?>" <?= isset($pconfig['hash-algorithm-option']) && in_array($algo, $pconfig['hash-algorithm-option']) ? 'checked="checked"' : '';?>/>
|
||||
<?=$algoname;?>
|
||||
</br>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
<select name="hash-algorithm-option[]" class="selectpicker" multiple="multiple">
|
||||
<?php foreach ($p2_halgos as $algo => $algoname): ?>
|
||||
<option value="<?= html_safe($algo) ?>" <?= in_array($algo, $pconfig['hash-algorithm-option']) ? 'selected="selected"' : '' ?>>
|
||||
<?= html_safe($algoname) ?>
|
||||
</option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user