From ce2bff086e9b4a6f82e679b4f195019d4200623e Mon Sep 17 00:00:00 2001 From: opi Date: Tue, 24 May 2016 14:35:36 +0200 Subject: [PATCH 1/3] [fix] Icon position. --- src/views/domain/domain_info.ms | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/domain/domain_info.ms b/src/views/domain/domain_info.ms index 7b4368a7..e49c97fe 100644 --- a/src/views/domain/domain_info.ms +++ b/src/views/domain/domain_info.ms @@ -52,7 +52,7 @@

{{t 'domain_dns_longdesc'}}

- {{t 'domain_dns_config'}} + {{t 'domain_dns_config'}}

From ab523a2dddc932f189ed7c280133c6d804744931 Mon Sep 17 00:00:00 2001 From: opi Date: Tue, 12 Jul 2016 15:52:51 +0200 Subject: [PATCH 2/3] [fix] Allow checkbox to be unchecked even if default is true. --- src/js/yunohost/controllers/apps.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/js/yunohost/controllers/apps.js b/src/js/yunohost/controllers/apps.js index f88baa02..911b03ae 100644 --- a/src/js/yunohost/controllers/apps.js +++ b/src/js/yunohost/controllers/apps.js @@ -170,6 +170,14 @@ // Checkbox should not be required to be unchecked data.manifest.arguments.install[k].required = ''; + + // Clone a hidden input with empty value + // https://stackoverflow.com/questions/476426/submit-an-html-form-with-empty-checkboxes + inputClone = {}; + inputClone.name = data.manifest.arguments.install[k].name; + inputClone.inputType = 'hidden'; + inputClone.default = 0; + data.manifest.arguments.install.push(inputClone); } // 'password' type input. @@ -221,6 +229,15 @@ params = { 'label': c.params['label'], 'app': c.params['app'] }; delete c.params['label']; delete c.params['app']; + + // Check for duplicate arg produced by empty checkbox. (See inputClone) + $.each(c.params, function(k, v) { + if (typeof(v) === 'object' && Array.isArray(v)) { + // And return only first value + c.params[k] = v[0]; + } + }); + params['args'] = c.serialize(c.params.toHash()); // Do not pass empty args. if (params['args'] === "") { From 3fc5675a1a063e6ad9b49bbe3055905cb98b4f55 Mon Sep 17 00:00:00 2001 From: opi Date: Tue, 12 Jul 2016 15:53:14 +0200 Subject: [PATCH 3/3] [fix] Do not escape html attributes on app install form. --- src/views/app/app_install.ms | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/app/app_install.ms b/src/views/app/app_install.ms index 0ecdb64f..2915dcc1 100644 --- a/src/views/app/app_install.ms +++ b/src/views/app/app_install.ms @@ -43,11 +43,11 @@
{{#if choices}} - {{#choices}}{{/choices}} {{else}} - + {{/if}} {{#if help}}