Skip to content

Commit

Permalink
Revert "Allow multiple rows in NFS rule"
Browse files Browse the repository at this point in the history
This reverts commit 4e25bc8.
  • Loading branch information
bergware committed Nov 13, 2022
1 parent cfdab68 commit 57b5033
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions plugins/dynamix/SecurityNFS.page
Expand Up @@ -76,23 +76,22 @@ _(Security)_:
<form markdown="1" method="POST" name="otherForm" action="/update.htm" target="progressFrame">
<input type="hidden" name="shareName" value="<?=htmlspecialchars($name)?>">
_(Rule)_:
: <textarea name="shareHostListNFS" spellcheck="false" cols="80" rows="5" maxlength="2048" style="resize:none;width:65.5%"><?=htmlspecialchars($sec_nfs[$name]['hostList'])?></textarea>
: <input type="text" name="shareHostListNFS" maxlength="256" value="<?=htmlspecialchars($sec_nfs[$name]['hostList'])?>">

&nbsp;
: <input type="submit" name="changeShareAccessNFS" value="_(Apply)_" onclick="combine()" disabled><input type="button" value="_(Done)_" onclick="done()">
: <input type="submit" name="changeShareAccessNFS" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
</form>
<?endif;?>

<script>
$(function() {
initDropdownNFS(false);
var rule = $('textarea[name=shareHostListNFS]');
if ($.cookie('ruleList')!=null) {
rule.val($.cookie('ruleList'));
setTimeout(function(){rule.trigger('change');},100);
$.removeCookie('ruleList');
if ($.cookie('hostList')!=null) {
var host = $('input[name="shareHostListNFS"]');
host.val($.cookie('hostList'));
setTimeout(function(){host.trigger('change');},100);
$.removeCookie('hostList');
}
rule.val(rule.val.replace(/ /g,'\n'));
<?if ($tabbed):?>
<?$path=='Shares/Share' ? $t=2 : $t=1;?>
$('#tab<?=$t?>').bind({click:function(){initDropdownNFS(true);}});
Expand All @@ -111,7 +110,7 @@ function readNFS() {
var data = $.parseJSON(json);
form.shareExportNFS.value = data.export;
form.shareSecurityNFS.value = data.security;
if (data.hostList != '') $.cookie('ruleList',data.hostList);
if (data.hostList != '') $.cookie('hostList',data.hostList);
$(form).find('select').trigger('change');
});
}
Expand Down Expand Up @@ -140,8 +139,4 @@ function writeNFS(data,n,i) {
writeNFS(data,0,i);
}
}
function combine() {
var rule = $('textarea[name=shareHostListNFS]');
rule.val(rule.val.replace(/\n/g,' ').replace(/ +$/,''));
}
</script>

0 comments on commit 57b5033

Please sign in to comment.