mirror of
https://github.com/unraid/webgui.git
synced 2026-01-21 09:00:19 -06:00
Merge pull request #642 from bergware/mutli-language
Multi cache pool supoort
This commit is contained in:
@@ -93,18 +93,22 @@ function selectInput(form) {
|
||||
$('#text').show();
|
||||
$('#copy').show();
|
||||
$('#pass').hide();
|
||||
$('input[name="confirmStart"]').prop('disabled',true);
|
||||
<?elseif ($missing):?>
|
||||
$('#text').show();
|
||||
$('#copy').hide();
|
||||
$('#pass').hide();
|
||||
$('input[name="confirmStart"]').prop('disabled',true);
|
||||
<?elseif ($wrong):?>
|
||||
$('#text').show();
|
||||
if ($('input[name="luksReformat"]').prop('checked')) $('#copy').show(); else $('#copy').hide();
|
||||
$('#pass').show();
|
||||
$('input[name="confirmStart"]').prop('disabled',true);
|
||||
<?endif;?>
|
||||
$('#file').hide();
|
||||
$('input[name="text"],input[name="copy"]').attr('type',$('input[name="showPass"]').prop('checked')?'text':'password');
|
||||
$('#cmdStart').prop('disabled',$('#copy').is(':visible') ? (form.text.value!=form.copy.value || form.text.value=='') : form.text.value=='');
|
||||
var item = $('input[name="confirmStart"]').length ? $('input[name="confirmStart"]') : $('#cmdStart');
|
||||
item.prop('disabled',$('#copy').is(':visible') ? (form.text.value!=form.copy.value || form.text.value=='') : form.text.value=='');
|
||||
} else {
|
||||
form.text.value = '';
|
||||
form.copy.value = '';
|
||||
@@ -116,7 +120,8 @@ function selectInput(form) {
|
||||
<?else:?>
|
||||
$('#pass').hide();
|
||||
<?endif;?>
|
||||
$('#cmdStart').prop('disabled',!form.file.value);
|
||||
var item = $('input[name="confirmStart"]').length ? $('input[name="confirmStart"]') : $('#cmdStart');
|
||||
item.prop('disabled',!form.file.value);
|
||||
}
|
||||
}
|
||||
function getFileContent(event,form) {
|
||||
|
||||
@@ -114,7 +114,7 @@ _(Comments)_:
|
||||
:end
|
||||
|
||||
_(Use cache pool (for new files/directories))_:
|
||||
: <span class="input"><select name="shareUseCache" onchange="updateScreen(this.value)"<?=count($pools)?'':' disabled'?>>
|
||||
: <span class="input"><select name="shareUseCache" onchange="updateScreen(this.value)"<?=$pool_devices?'':' disabled'?>>
|
||||
<?=mk_option($share['useCache'], "no", _('No'))?>
|
||||
<?=mk_option($share['useCache'], "yes", _('Yes'))?>
|
||||
<?=mk_option($share['useCache'], "prefer", _('Prefer'))?>
|
||||
|
||||
@@ -62,10 +62,6 @@ function checkUsername(form) {
|
||||
swal({title:"_(Invalid user name)_",text:"_(Use only lowercase letters, digits, underscores and dashes)_",type:"error",confirmButtonText:'_(Ok)_'});
|
||||
return false;
|
||||
}
|
||||
if (username.match('^(disk[0-9]+|cache[0-9]*|parity[0-9]*|flash)$')) {
|
||||
swal({title:"_(Invalid user name)_",text:"_(Do not use reserved names)_",type:"error",confirmButtonText:'_(Ok)_'});
|
||||
return false;
|
||||
}
|
||||
if (form.userPasswordGUI.value.length > 128 || form.userPasswordConfGUI.value.length > 128) {
|
||||
swal({title:"_(Password too long)_",text:"_(Use a password up to 128 characters)_",type:"error",confirmButtonText:'_(Ok)_'});
|
||||
return false;
|
||||
@@ -163,10 +159,10 @@ $(function(){
|
||||
|
||||
<form markdown="1" name="user_edit" method="POST" action="/update.htm" target="progressFrame" onsubmit="return checkUsername(this)">
|
||||
_(User name)_:
|
||||
: <input type="text" name="userName" maxlength="32" onKeyUp="this.form.cmdUserEdit.disabled=(this.form.userName.value=='')" pattern="^[a-z_][a-z0-9_-]*[$]?$">
|
||||
: <input type="text" name="userName" maxlength="40" onKeyUp="this.form.cmdUserEdit.disabled=(this.form.userName.value=='')" pattern="^[a-z_][a-z0-9_-]*[$]?$">
|
||||
|
||||
:help1
|
||||
> Usernames may be up to 32 characters long and must start with a **lower case letter** or an underscore,
|
||||
> Usernames may be up to 40 characters long and must start with a **lower case letter** or an underscore,
|
||||
> followed by **lower case letters**, digits, underscores, or dashes. They can end with a dollar sign.
|
||||
:end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user