Besides the switch from tos to meta endpoint, this fixes a visual bug,
where the 'Accept TOS' button would show up, even if no ToS was needed.

Signed-off-by: Folke Gleumes <f.gleu...@proxmox.com>
---

No changes in v2

 www/manager6/node/ACME.js | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/www/manager6/node/ACME.js b/www/manager6/node/ACME.js
index 9f1dabce..d64ac36f 100644
--- a/www/manager6/node/ACME.js
+++ b/www/manager6/node/ACME.js
@@ -79,15 +79,19 @@ Ext.define('PVE.node.ACMEAccountCreate', {
                    checkbox.setHidden(true);
 
                    Proxmox.Utils.API2Request({
-                       url: '/cluster/acme/tos',
+                       url: '/cluster/acme/meta',
                        method: 'GET',
                        params: {
                            directory: value,
                        },
                        success: function(response, opt) {
-                           field.setValue(response.result.data);
-                           disp.setValue(response.result.data);
-                           checkbox.setHidden(false);
+                           if (response.result.data.termsOfService) {
+                               
field.setValue(response.result.data.termsOfService);
+                               
disp.setValue(response.result.data.termsOfService);
+                               checkbox.setHidden(false);
+                           } else {
+                               disp.setValue(undefined);
+                           }
                        },
                        failure: function(response, opt) {
                            Ext.Msg.alert(gettext('Error'), 
response.htmlStatus);
-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to