From 58f3d1104c372f21e46f6d8300925ca48aeca079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Mon, 19 Oct 2015 12:11:51 +0200 Subject: [PATCH] Bug #4057: Add abide pattern to role names (cherry picked from commit 3677eda777802bdef5243d8abe9aac9d2e71b5e9) --- .../tabs/oneflow-templates-tab/form-panels/create.js | 10 +++++++++- .../tabs/oneflow-templates-tab/utils/role-tab/html.hbs | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/sunstone/public/app/tabs/oneflow-templates-tab/form-panels/create.js b/src/sunstone/public/app/tabs/oneflow-templates-tab/form-panels/create.js index 708a824da9..08803cbfd0 100644 --- a/src/sunstone/public/app/tabs/oneflow-templates-tab/form-panels/create.js +++ b/src/sunstone/public/app/tabs/oneflow-templates-tab/form-panels/create.js @@ -200,7 +200,15 @@ define(function(require) { $(document).foundation('tab', 'reflow'); - + + context.foundation({ + abide : { + patterns: { + word_chars: /^\w+$/ + } + } + }); + // Add first role $("#tf_btn_roles", context).trigger("click"); diff --git a/src/sunstone/public/app/tabs/oneflow-templates-tab/utils/role-tab/html.hbs b/src/sunstone/public/app/tabs/oneflow-templates-tab/utils/role-tab/html.hbs index 6ab9bfcf63..9524c0816d 100644 --- a/src/sunstone/public/app/tabs/oneflow-templates-tab/utils/role-tab/html.hbs +++ b/src/sunstone/public/app/tabs/oneflow-templates-tab/utils/role-tab/html.hbs @@ -19,7 +19,8 @@ - + + {{tr "Can only contain alphanumeric and underscore characters"}}