Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Romain Courteaud
erp5_rtl_support
Commits
6c04613d
Commit
6c04613d
authored
Nov 27, 2014
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use FileValidator to post element's value with key
parent
85f5ef66
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
22 deletions
+22
-22
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testBlobSave.xml
...lateItem/portal_tests/gadget_field_zuite/testBlobSave.xml
+2
-2
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testNotDataURLException.xml
...rtal_tests/gadget_field_zuite/testNotDataURLException.xml
+2
-2
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testNotEditable.xml
...eItem/portal_tests/gadget_field_zuite/testNotEditable.xml
+4
-4
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testSaveAndLoad.xml
...eItem/portal_tests/gadget_field_zuite/testSaveAndLoad.xml
+4
-4
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testSaveAndNotEditableInIFrame.xml
...sts/gadget_field_zuite/testSaveAndNotEditableInIFrame.xml
+8
-8
product/ERP5Form/GadgetField.py
product/ERP5Form/GadgetField.py
+2
-2
No files found.
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testBlobSave.xml
View file @
6c04613d
...
...
@@ -93,13 +93,13 @@
<!-- Initialize -->
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@title=\'my_file\']
</td>
\n
<td>
//input[@title=\'
field_
my_file\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
<tr>
\n
<td>
type
</td>
\n
<td>
//input[@title=\'my_file\']
</td>
\n
<td>
//input[@title=\'
field_
my_file\']
</td>
\n
<td>
test
</td>
\n
</tr>
\n
\n
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testNotDataURLException.xml
View file @
6c04613d
...
...
@@ -94,7 +94,7 @@
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@title=\'my_subject\']
</td>
\n
<td>
//input[@title=\'
field_
my_subject\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
...
...
@@ -102,7 +102,7 @@
\n
<tr>
\n
<td>
type
</td>
\n
<td>
//input[@title=\'my_subject\']
</td>
\n
<td>
//input[@title=\'
field_
my_subject\']
</td>
\n
<td>
couscous
</td>
\n
</tr>
\n
\n
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testNotEditable.xml
View file @
6c04613d
...
...
@@ -94,7 +94,7 @@
<!-- Initialize -->
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@title=\'my_language\']
</td>
\n
<td>
//input[@title=\'
field_
my_language\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
...
...
@@ -102,7 +102,7 @@
\n
<tr>
\n
<td>
type
</td>
\n
<td>
//input[@title=\'my_language\']
</td>
\n
<td>
//input[@title=\'
field_
my_language\']
</td>
\n
<td>
couscous
</td>
\n
</tr>
\n
\n
...
...
@@ -122,14 +122,14 @@
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@title=\'my_language\']
</td>
\n
<td>
//input[@title=\'
field_
my_language\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
\n
<tr>
\n
<td>
verifyValue
</td>
\n
<td>
//input[@title=\'my_language\']
</td>
\n
<td>
//input[@title=\'
field_
my_language\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testSaveAndLoad.xml
View file @
6c04613d
...
...
@@ -94,7 +94,7 @@
<!-- Initialize -->
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@title=\'my_description\']
</td>
\n
<td>
//input[@title=\'
field_
my_description\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
...
...
@@ -102,7 +102,7 @@
\n
<tr>
\n
<td>
type
</td>
\n
<td>
//input[@title=\'my_description\']
</td>
\n
<td>
//input[@title=\'
field_
my_description\']
</td>
\n
<td>
123
</td>
\n
</tr>
\n
\n
...
...
@@ -122,14 +122,14 @@
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@title=\'my_description\']
</td>
\n
<td>
//input[@title=\'
field_
my_description\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
\n
<tr>
\n
<td>
verifyValue
</td>
\n
<td>
//input[@title=\'my_description\']
</td>
\n
<td>
//input[@title=\'
field_
my_description\']
</td>
\n
<td>
123
</td>
\n
</tr>
\n
\n
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testSaveAndNotEditableInIFrame.xml
View file @
6c04613d
...
...
@@ -93,25 +93,25 @@
<!-- Initialize -->
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@title=\'my_right\']
</td>
\n
<td>
//input[@title=\'
field_
my_right\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@title=\'my_format\']
</td>
\n
<td>
//input[@title=\'
field_
my_format\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
<tr>
\n
<td>
type
</td>
\n
<td>
//input[@title=\'my_right\']
</td>
\n
<td>
//input[@title=\'
field_
my_right\']
</td>
\n
<td>
couscous
</td>
\n
</tr>
\n
\n
<tr>
\n
<td>
type
</td>
\n
<td>
//input[@title=\'my_format\']
</td>
\n
<td>
//input[@title=\'
field_
my_format\']
</td>
\n
<td>
couscous
</td>
\n
</tr>
\n
\n
...
...
@@ -130,24 +130,24 @@
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@title=\'my_right\']
</td>
\n
<td>
//input[@title=\'
field_
my_right\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@title=\'my_format\']
</td>
\n
<td>
//input[@title=\'
field_
my_format\']
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
verifyValue
</td>
\n
<td>
//input[@title=\'my_right\']
</td>
\n
<td>
//input[@title=\'
field_
my_right\']
</td>
\n
<td>
couscous
</td>
\n
</tr>
\n
\n
<tr>
\n
<td>
verifyValue
</td>
\n
<td>
//input[@title=\'my_format\']
</td>
\n
<td>
//input[@title=\'
field_
my_format\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
...
...
product/ERP5Form/GadgetField.py
View file @
6c04613d
...
...
@@ -30,7 +30,7 @@ class GadgetWidget(Widget.TextWidget):
def
render_view
(
self
,
field
,
value
,
REQUEST
=
None
,
render_prefix
=
None
,
key
=
None
):
kw
=
{}
kw
[
'data-gadget-url'
]
=
field
.
get_value
(
'gadget_url'
)
kw
[
'data-gadget-scope'
]
=
field
.
id
kw
[
'data-gadget-scope'
]
=
'field_'
+
field
.
id
if
key
is
not
None
:
kw
[
'data-gadget-editable'
]
=
key
kw
[
'class'
]
=
"gadget"
...
...
@@ -62,4 +62,4 @@ class GadgetField(ZMIField):
meta_type
=
"GadgetField"
widget
=
GadgetWidgetInstance
validator
=
Validator
.
Suppress
ValidatorInstance
validator
=
Validator
.
File
ValidatorInstance
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