<vc>
    <servicebar id="servicebar" />

    <body>
        <pad>
            <tabs id="config">
                <tab title="{Shares}">
                    <bind:collection bind="shares" id="shares">
                        <dt bind="__items" addrow="{Add}" />

                        <bind:template>
                            <collapserow>
                                <box>
                                    <right>
                                        <hc>
                                            <button bind="__delete" icon="remove" style="icon" warning="{Confirm deletion}" />
                                        </hc>
                                    </right>
                                    <hc>
                                        <icon icon="folder-close" />
                                        <box width="200">
                                            <label bind="name" style="bold" />
                                        </box>
                                        <label bind="path" />
                                    </hc>
                                </box>
                                <pad>
                                    <tabs>
                                        <tab title="{General}">
                                            <hc>
                                                <vc>
                                                    <formline text="{Name}">
                                                        <textbox bind="name" />
                                                    </formline>
                                                    <formline text="{Path}">
                                                        <pathbox directory="True" bind="path" />
                                                    </formline>
                                                    <formline>
                                                        <checkbox bind="guest_ok" text="{Guest access}" />
                                                    </formline>
                                                    <formline>
                                                        <checkbox bind="browseable" text="{Browseable}" />
                                                    </formline>
                                                </vc>
                                                <vc>
                                                    <formline text="{Create mask}">
                                                        <textbox bind="create_mask" />
                                                    </formline>
                                                    <formline text="{Directory mask}">
                                                        <textbox bind="directory_mask" />
                                                    </formline>
                                                    <formline>
                                                        <checkbox bind="read_only" text="{Read only}" />
                                                    </formline>
                                                </vc>
                                            </hc>
                                        </tab>
                                        <tab title="{Advanced}">
                                            <hc>
                                                <vc>
                                                    <formline text="{Allowed users}">
                                                        <textbox bind="valid_users" />
                                                    </formline>
                                                    <formline text="{R/W users}">
                                                        <textbox bind="write_list" />
                                                    </formline>
                                                    <formline text="{Veto files}">
                                                        <textbox bind="veto_files" />
                                                    </formline>
                                                </vc>
                                                <vc>
                                                    <formline text="{Force file umask}">
                                                        <textbox bind="force_create_mode" />
                                                    </formline>
                                                    <formline text="{Force dir umask}">
                                                        <textbox bind="force_directory_mode" />
                                                    </formline>
                                                </vc>
                                            </hc>
                                        </tab>
                                    </tabs>
                                </pad>
                            </collapserow>
                        </bind:template>
                    </bind:collection>
                </tab>

                <tab title="{Config}" binder:context="global">
                    <formgroup text="{Networking}">
                        <vc>
                            <formline text="{Interfaces}">
                                <textbox bind="interfaces" />
                            </formline>
                            <formline>
                                <checkbox bind="bind_interfaces_only" text="{Bind only to these interfaces}" />
                            </formline>
                        </vc>
                    </formgroup>
                    <formgroup text="{Identification}">
                        <vc>
                            <formline text="{Workgroup}">
                                <textbox bind="workgroup" />
                            </formline>
                            <formline text="{Server string}">
                                <textbox bind="server_string" />
                            </formline>
                        </vc>
                    </formgroup>
                    <formgroup text="{Other}">
                        <vc>
                            <formline text="{Log file}">
                                <textbox bind="log_file" />
                            </formline>
                            <formline text="{Security}">
                                <dropdown bind="security"
                                    labels="['User-level', 'ADS Realm', 'NT Domain', 'Share-level', 'Another Server']"
                                    values="['user', 'ads', 'domain', 'share', 'server']"
                                    />
                            </formline>
                        </vc>
                    </formgroup>
                </tab>

                <tab title="{Sessions}" id="status">
                    <bind:collection bind="connections" id="connections">
                        <dt bind="__items">
                            <dtr header="True">
                                <dth text="{Share}" />
                                <dth text="{User}" />
                                <dth text="{Machine}" />
                                <dth text="PID" />
                                <dth width="1" />
                            </dtr>
                        </dt>
                        <bind:template>
                            <dtr>
                                <dtd>
                                    <label bind="share" />
                                </dtd>
                                <dtd>
                                    <label bind="user" />
                                </dtd>
                                <dtd>
                                    <label bind="machine" />
                                </dtd>
                                <dtd>
                                    <label bind="pid" />
                                </dtd>
                                <dtd>
                                    <button id="disconnect" text="{Disconnect}" icon="remove" />
                                </dtd>
                            </dtr>
                        </bind:template>
                    </bind:collection>
                </tab>

                <tab title="{Users}" id="users">
                    <bind:collection bind="users" id="user-list">
                        <vc>
                            <dt bind="__items" />
                            <dropdown id="add-user-list" />
                            <button icon="add" id="add-user" text="{Add}" />
                        </vc>

                        <bind:template>
                            <collapserow>
                                <box>
                                    <right>
                                        <hc>
                                            <button id="delete" icon="remove" style="icon" warning="{Confirm deletion}" />
                                        </hc>
                                    </right>
                                    <hc>
                                        <icon icon="user" />
                                        <box width="100">
                                            <label bind="username" style="bold" />
                                        </box>
                                        <label bind="sid" />
                                    </hc>
                                </box>
                                <pad>
                                    <formline text="{Password}">
                                        <hc>
                                            <textbox id="password" />
                                            <button id="password-set" icon="lock" text="{Set}" />
                                        </hc>
                                    </formline>
                                </pad>
                            </collapserow>
                        </bind:template>
                    </bind:collection>
                </tab>
            </tabs>
        </pad>
    </body>

    <hc>
        <button id="save" text="{Save}" icon="ok" />
    </hc>
</vc>