3fe7006e3e62f84389b00f3cb013916fcb2f58e5
[project/luci.git] / applications / luci-samba / luasrc / model / cbi / samba.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2008 Steven Barth <steven@midlink.org>
5 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
6
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11         http://www.apache.org/licenses/LICENSE-2.0
12
13 $Id$
14 ]]--
15
16 m = Map("samba")
17
18 s = m:section(TypedSection, "samba", "Samba")
19 s.anonymous = true
20
21 s:option(Value, "name")
22 s:option(Value, "description")
23 s:option(Value, "workgroup")
24 s:option(Flag, "homes")
25
26
27 s = m:section(TypedSection, "sambashare")
28 s.anonymous = true
29 s.addremove = true
30 s.template = "cbi/tblsection"
31
32 s:option(Value, "name", translate("name"))
33 s:option(Value, "path")
34
35 s:option(Value, "users").rmempty = true
36
37 ro = s:option(Flag, "read_only")
38 ro.enabled = "yes"
39 ro.disabled = "no"
40
41 go = s:option(Flag, "guest_ok")
42 go.enabled = "yes"
43 go.disabled = "no"
44
45 cm = s:option(Value, "create_mask")
46 cm.rmempty = true
47 cm.size = 4
48
49 dm = s:option(Value, "dir_mask")
50 dm.rmempty = true
51 dm.size = 4
52
53
54 return m