MCPcopy Create free account
hub / github.com/error311/FileRise / resetForm

Function resetForm

public/js/adminPanel.js:2036–2088  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2034 };
2035
2036 const resetForm = () => {
2037 editingId = '';
2038 formTitleEl.textContent = tf('source_add', 'Add Source');
2039 if (sourceIdEl) {
2040 sourceIdEl.disabled = false;
2041 sourceIdEl.value = '';
2042 }
2043 if (sourceNameEl) sourceNameEl.value = '';
2044 if (sourceEnabledEl) sourceEnabledEl.checked = true;
2045 if (sourceReadOnlyEl) sourceReadOnlyEl.checked = false;
2046 if (sourceDisableTrashEl) sourceDisableTrashEl.checked = false;
2047 if (localPathEl) localPathEl.value = '';
2048 if (s3BucketEl) s3BucketEl.value = '';
2049 if (s3RegionEl) s3RegionEl.value = '';
2050 if (s3EndpointEl) s3EndpointEl.value = '';
2051 if (s3PrefixEl) s3PrefixEl.value = '';
2052 if (s3PathStyleEl) s3PathStyleEl.checked = false;
2053 if (sftpHostEl) sftpHostEl.value = '';
2054 if (sftpPortEl) sftpPortEl.value = '';
2055 if (sftpUsernameEl) sftpUsernameEl.value = '';
2056 if (sftpRootEl) sftpRootEl.value = '';
2057 if (ftpHostEl) ftpHostEl.value = '';
2058 if (ftpPortEl) ftpPortEl.value = '';
2059 if (ftpUsernameEl) ftpUsernameEl.value = '';
2060 if (ftpSslEl) ftpSslEl.checked = false;
2061 if (ftpPassiveEl) ftpPassiveEl.checked = true;
2062 if (ftpRootEl) ftpRootEl.value = '';
2063 if (webdavUrlEl) webdavUrlEl.value = '';
2064 if (webdavUsernameEl) webdavUsernameEl.value = '';
2065 if (webdavRootEl) webdavRootEl.value = '';
2066 if (webdavVerifyTlsEl) webdavVerifyTlsEl.checked = true;
2067 if (smbHostEl) smbHostEl.value = '';
2068 if (smbShareEl) smbShareEl.value = '';
2069 if (smbUsernameEl) smbUsernameEl.value = '';
2070 if (smbDomainEl) smbDomainEl.value = '';
2071 if (smbVersionEl) smbVersionEl.value = '';
2072 if (smbRootEl) smbRootEl.value = '';
2073 if (gdriveClientIdEl) gdriveClientIdEl.value = '';
2074 if (gdriveRootIdEl) gdriveRootIdEl.value = '';
2075 if (gdriveDriveIdEl) gdriveDriveIdEl.value = '';
2076 if (onedriveClientIdEl) onedriveClientIdEl.value = '';
2077 if (onedriveTenantEl) onedriveTenantEl.value = '';
2078 if (onedriveDriveIdEl) onedriveDriveIdEl.value = '';
2079 if (onedriveSiteIdEl) onedriveSiteIdEl.value = '';
2080 if (onedriveRootPathEl) onedriveRootPathEl.value = '';
2081 if (dropboxAppKeyEl) dropboxAppKeyEl.value = '';
2082 if (dropboxRootPathEl) dropboxRootPathEl.value = '';
2083 if (dropboxTeamMemberIdEl) dropboxTeamMemberIdEl.value = '';
2084 if (dropboxRootNamespaceIdEl) dropboxRootNamespaceIdEl.value = '';
2085 resetSecrets();
2086 setType('local');
2087 if (listEl) renderList();
2088 };
2089
2090 const applySecretPlaceholders = (src) => {
2091 const cfg = (src && src.config) ? src.config : {};

Callers 4

initSourcesSectionFunction · 0.85
saveGatewayFunction · 0.85
deleteGatewayFunction · 0.85
initGatewaysSectionFunction · 0.85

Calls 8

resetSecretsFunction · 0.85
setTypeFunction · 0.85
renderSourceOptionsFunction · 0.85
refreshSnippetPreviewFunction · 0.85
renderManagedStatusFunction · 0.85
tfFunction · 0.70
renderListFunction · 0.70

Tested by

no test coverage detected