Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kasra Jamshidi
erp5
Commits
91d34f66
Commit
91d34f66
authored
Jun 13, 2013
by
Mame Coumba Sall
Committed by
Jérome Perrin
Jun 17, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not do empty title checking on listbox titles for dialog forms in naming convention script
parent
f2acf0b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_checkNamingConventions.xml
...ortal_skins/erp5_core/ERP5Site_checkNamingConventions.xml
+6
-6
product/ERP5/bootstrap/erp5_core/bt/revision
product/ERP5/bootstrap/erp5_core/bt/revision
+1
-1
No files found.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_checkNamingConventions.xml
View file @
91d34f66
...
@@ -134,7 +134,7 @@ def checkField(folder, form, field):\n
...
@@ -134,7 +134,7 @@ def checkField(folder, form, field):\n
path += \'/listbox\'\n
path += \'/listbox\'\n
for x in \'columns\', \'all_columns\':\n
for x in \'columns\', \'all_columns\':\n
for id, title in field.get_value(x):\n
for id, title in field.get_value(x):\n
error_message += checkTitle(path, x, title, field)\n
error_message += checkTitle(path, x, title, field
, form
)\n
if a not in (None, "portal_catalog", "searchFolder", "objectValues",\n
if a not in (None, "portal_catalog", "searchFolder", "objectValues",\n
"contentValues", "ListBox_initializeFastInput"):\n
"contentValues", "ListBox_initializeFastInput"):\n
if not a.endswith(\'List\'):\n
if not a.endswith(\'List\'):\n
...
@@ -155,15 +155,15 @@ titlecase_sub = re.compile(r"[A-Za-z]+(\'[A-Za-z]+)?").sub\n
...
@@ -155,15 +155,15 @@ titlecase_sub = re.compile(r"[A-Za-z]+(\'[A-Za-z]+)?").sub\n
titlecase_repl = lambda mo: mo.group(0)[0].upper() + mo.group(0)[1:].lower()\n
titlecase_repl = lambda mo: mo.group(0)[0].upper() + mo.group(0)[1:].lower()\n
titlecase = lambda s: titlecase_sub(titlecase_repl, s)\n
titlecase = lambda s: titlecase_sub(titlecase_repl, s)\n
\n
\n
def checkTitle(path, id, title, field=None):\n
def checkTitle(path, id, title, field=None
, form=None
):\n
"""\n
"""\n
Generic function that test the validity of a title.\n
Generic function that test the validity of a title.\n
"""\n
"""\n
error_message = \'\'\n
error_message = \'\'\n
\n
if form is not None and form.pt != \'form_dialog\' or form is None:
\n
if (field is not None and not field.get_value(\'hidden\') and \\\n
if (field is not None and not field.get_value(\'hidden\') and \\\n
(title is None or len(title.strip()) == 0)) or (field is None and (title is None or len(title.strip()) == 0)):\n
(title is None or len(title.strip()) == 0)) or (field is None and (title is None or len(title.strip()) == 0)):\n
return "%s : %s : can\'t be empty\\n" % (path, id)\n
return "%s : %s : can\'t be empty\\n" % (path, id)\n
\n
\n
for c in title:\n
for c in title:\n
if c.lower() not in ALLOWED_CHARS:\n
if c.lower() not in ALLOWED_CHARS:\n
...
...
product/ERP5/bootstrap/erp5_core/bt/revision
View file @
91d34f66
41091
41092
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment