Commit 6c04613d authored by Xiaowu Zhang's avatar Xiaowu Zhang

Use FileValidator to post element's value with key

parent 85f5ef66
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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.SuppressValidatorInstance
validator = Validator.FileValidatorInstance
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment