mirror of
https://github.com/unraid/webgui.git
synced 2026-01-01 06:59:56 -06:00
48 lines
1.5 KiB
Plaintext
48 lines
1.5 KiB
Plaintext
Menu="SMB:2"
|
|
Title="SMB Extras"
|
|
Cond="($var['shareSMBEnabled']!='no')"
|
|
Tag="share-alt-square"
|
|
---
|
|
<?PHP
|
|
/* Copyright 2020, Lime Technology
|
|
* Copyright 2020, Bergware International.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License version 2,
|
|
* as published by the Free Software Foundation.
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*/
|
|
?>
|
|
:smb_extra_conf_help:
|
|
|
|
<?
|
|
$file = "/boot/config/smb-extra.conf";
|
|
$text = @file_get_contents($file) ?: '';
|
|
$text = preg_replace(["/\r\n/","/\r/"],"\n",$text);
|
|
?>
|
|
<script>
|
|
$(function(){
|
|
$('form').find('textarea').on('input change',function(){
|
|
$(this).prop('rows',($(this).val().match(/\n/g)||[]).length+1);
|
|
});
|
|
});
|
|
</script>
|
|
<form markdown="1" method="POST" action="/update.php" target="progressFrame">
|
|
<input type="hidden" name="#include" value="/webGui/include/update.file.php">
|
|
<input type="hidden" name="#file" value="<?=$file;?>">
|
|
_(Samba extra configuration)_:
|
|
: <textarea spellcheck="false" cols="80" rows="<?=substr_count($text,"\n")+1?>" maxlength="2048" name="text" <?if ($var['fsState']=="Started"):?>disabled<?endif;?>><?=htmlspecialchars($text)?></textarea>
|
|
|
|
|
|
: <span class="inline-block">
|
|
<input type="submit" value="_(Apply)_" disabled>
|
|
<input type="button" value="_(Done)_" onclick="done()">
|
|
</span>
|
|
<?if ($var['fsState']=="Started"):?>*_(Array must be **Stopped** to change)_*<?endif;?>
|
|
|
|
:smb_extra_button_help:
|
|
|
|
</form>
|