[Kimchi-devel] [PATCH] [Wok] Allow wok.form.js to support number inputs
Jose Ricardo Ziviani
joserz at linux.vnet.ibm.com
Tue Jan 19 12:01:53 UTC 2016
On 18-01-2016 14:09, peterpnns at gmail.com wrote:
> From: peterpennings <peterpnsn at gmail.com>
>
> Signed-off-by: peterpennings <peterpnsn at gmail.com>
> ---
> ui/js/src/wok.form.js | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/ui/js/src/wok.form.js b/ui/js/src/wok.form.js
> index 49f9752..711db11 100644
> --- a/ui/js/src/wok.form.js
> +++ b/ui/js/src/wok.form.js
> @@ -36,6 +36,9 @@
> case 'text':
> $(this).val(obj.getDeepValue($(this).attr("name")));
> break;
> + case 'number':
> + $(this).val(obj.getDeepValue($(this).attr("name")));
> + break;
Both 'text' and 'number' get the value from the same field, so they
could follow the code standard used in 'radio'/'checkbox' bellow. It
would be something like:
case 'text':
case 'number':
$(this).val(obj.getDeepValue($(this).attr("name")));
break;
> case 'radio':
> case 'checkbox':
> var a=String($(this).val());
>
--
Jose Ricardo Ziviani
-----------------------------
Software Engineer
Linux Technology Center - IBM
More information about the Kimchi-devel
mailing list