[% SET CPANEL.CPVAR.dprefix = "../" %] [% USE Uapi; IF FORM.itemsperpage; SET CPANEL.CPVAR.itemsperpage = FORM.itemsperpage; END; IF (!FORM.itemsperpage || !CPANEL.CPVAR.itemsperpage); SET CPANEL.CPVAR.itemsperpage = "10"; END; SET mail_domains = Api2.exec("Email", "listmaildomains", {} ); # Fetch the required strength SET required_strength_resp = Api2.exec("PasswdStrength", "get_required_strength", {"app"=>"webdisk"} ); IF required_strength_resp.size(); SET required_strength = required_strength_resp.0.strength; END; SET webdav_stat = Api2.exec("StatsBar", "stat", { "warnings"=>"1", "infinitylang"=>"true", "warninglevel"=>"80", "display"=>"webdavaccounts" } ); SET webdav_check_digest = Api2.exec("WebDisk", "hasdigest", {} ); IF webdav_check_digest.size; SET webdav_hasdigest = webdav_check_digest.0.hasdigest; END; # Use ExpVar here as its about 1000% faster then UAPI SET cpdavd_enabled = ExpVar.expand('$hascpdavd') ? 1 : 0; api2_result_UI_paginate = Api2.exec("UI", "paginate", {"itemsperpage"=>CPANEL.CPVAR.itemsperpage, "currentpage"=>CPANEL.CPVAR.currentpage, "pages"=>CPANEL.CPVAR.pages} ); api2_result_UI_paginate_list = Api2.exec("UI", "paginate_list", {"itemsperpage"=>CPANEL.CPVAR.itemsperpage, "itemlist"=>"10:25:50:100:250:500"} ); %] [% IF cpdavd_enabled %] [% js_code = PROCESS js_block %] [% END %] [% WRAPPER '_assets/master.html.tt' app_key = 'web_disk' feature = 'webdisk' include_legacy_stylesheets = 1 include_legacy_scripts = 1 include_cjt = 1 page_js = js_code page_scripts = CPANEL.is_debug_mode_enabled() ? ["js/statusbox.js", "js2/webdav/accounts_webdav.js"] : ["js/statusbox_optimized.js", "js2-min/webdav/accounts_webdav.js"] -%] [% INCLUDE _assets/_ajaxapp_header.html.tt %]

[% locale.maketext("Create a Web Disk account to manage, navigate, upload, and download the files on your web server.") %] [% locale.maketext("Web Disk account directories exist relative to your account’s home directory.") %] [% locale.maketext("The home icon ([_1]) signifies your home directory (“[_2]”).", '', CPANEL.homedir) %] [% locale.maketext("For more information, read our [output,url,_1,documentation,target,_2].", "//go.cpanel.net/WebDisk", "_blank") %]

[% IF !cpdavd_enabled %]
[% locale.maketext('Error:') %] [% locale.maketext('Your server administrator must enable the [asis,cpdavd] service to use this feature.') %]
[% ELSE %]

[% locale.maketext("Main Web Disk Account") %]

[% locale.maketext("Account") %] [% locale.maketext("Directory") %] [% locale.maketext("Actions") %]
[% CPANEL.user %] / [% IF (CPANEL.ENV.HTTP_PROXIED) %] [% Api1.pre_exec("ProxyUtils", "proxyaddress") ; Api1.exec("ProxyUtils", "proxyaddress", ["webdisk"]) ; Api1.post_exec("ProxyUtils", "proxyaddress") %] [% locale.maketext("Configure Client Access") %] [% ELSE %] [% locale.maketext("Configure Client Access") %] [% END %] [% IF !webdav_hasdigest %] [% locale.maketext("Enable Digest Authentication") %] [% ELSE %] [% locale.maketext("Disable Digest Authentication") %] [% END %]
[% IF CPANEL.feature('webdisk') -%]

[% locale.maketext("Create an Additional Web Disk Account") %]

[% IF webdav_stat.size; %]

[% locale.maketext("[output,strong,Warning]: You currently use [numf,_1] out of [numf,_2] accounts.", webdav_stat.0.count, webdav_stat.0.max ) %]

[% END %]
@
[% IF mail_domains.size == 1; %] [% mail_domains.0.domain.html() %] [% ELSE %] [% END %]
[% INCLUDE _assets/why_strong_passwords.html.tt %]
[% SET CPANEL.CPVAR.autoinput = "homedir" %] [% SET CPANEL.CPVAR.autodirsonly = "1" %] [% SET CPANEL.CPVAR.autofunc = "dirComplete" %] [% PROCESS 'autodir/dirbox.html.tt' %]
[% END -%]

[% locale.maketext("Manage Additional Web Disk Accounts") %]

[% INCLUDE webdav/listwebdisks.html.tt %]
[% locale.maketext("Account") %] [% locale.maketext("Directory") %] [% locale.maketext("Actions") %]
[% IF api2_result_UI_paginate.size; FOREACH hashref IN api2_result_UI_paginate; hashref.paginator ; END; END; %] [% IF (CPANEL.CPVAR.pages && !(CPANEL.CPVAR.pages == "1")) %]
[% locale.maketext("Showing") %] [% locale.maketext("Results Per Page") %]
[% END %]
[% INCLUDE _assets/_ajaxapp_footer.html.tt %] [% END %]
[% END %] [% BLOCK js_block %] [% END %]