Commit 420849ab authored by Gabriel Monnerat's avatar Gabriel Monnerat Committed by Romain Courteaud

erp5_web_renderjs_ui: Calculate link to render developer actions in ERP5JS UI

Calculate link to allow Nexedi developers access the ERP5 fields, forms and form actions from it.

* erp5 form gadget handle links to access from and form action
* label field gadget handle links to access field configuration, title
and descriptions translations
* page action handle all links to access workflows and portal type document
parent abd622ed
portal = context.getPortalObject()
type_info = portal.portal_types.getTypeInfo(context)
if type_info is not None and type_info.Base_getSourceVisibility():
return type_info.Base_redirect("view")
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_redirectToPortalTypeDocument</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -337,8 +337,13 @@ url_template_dict = {
}
default_document_uri_template = url_template_dict["jio_get_template"]
Base_translateString = context.getPortalObject().Base_translateString
portal = context.getPortalObject()
portal_absolute_url = portal.absolute_url()
preference_tool = portal.portal_preferences
Base_translateString = portal.Base_translateString
preferred_html_style_developer_mode = preference_tool.getPreferredHtmlStyleDevelopperMode()
preferred_html_style_translator_mode = preference_tool.getPreferredHtmlStyleTranslatorMode()
def getRealRelativeUrl(document):
return '/'.join(portal.portal_url.getRelativeContentPath(document))
......@@ -446,6 +451,29 @@ def renderField(traversed_document, field, form, value=MARKER, meta_type=None, k
"description": field.get_value("description"),
}
if preferred_html_style_developer_mode or meta_type == "ListBox":
form_relative_url = getFormRelativeUrl(form)
if preferred_html_style_developer_mode:
result["edit_field_href"] = '%s/%s/manage_main' % (form_relative_url, field.id)
if preferred_html_style_translator_mode:
erp5_ui = portal.Localizer.erp5_ui
selected_language = erp5_ui.get_selected_language()
result["translate_title_href"] = '%s/manage_messages?regex=^%s$&lang=%s' % (
'/'.join(erp5_ui.getPhysicalPath()),
field.title(),
selected_language
)
field_description = field.Field_getDescription()
if field_description:
result["translate_description_href"] = '%s/manage_messages?regex=^%s$&lang=%s' % (
'/'.join(erp5_ui.getPhysicalPath()),
field_description,
selected_language
)
if "Field" in meta_type:
# fields have default value and can be required (unlike boxes)
result["required"] = field.get_value("required") if field.has_value("required") else None
......@@ -737,7 +765,7 @@ def renderField(traversed_document, field, form, value=MARKER, meta_type=None, k
"root_url": site_root.absolute_url(),
"script_id": script.id,
"relative_url": getRealRelativeUrl(traversed_document).replace("/", "%2F"),
"form_relative_url": "%s/%s" % (getFormRelativeUrl(form), field.id),
"form_relative_url": "%s/%s" % (form_relative_url, field.id),
"list_method": list_method_name,
"default_param_json": urlsafe_b64encode(
json.dumps(ensureSerializable(list_method_query_dict))),
......@@ -1207,6 +1235,14 @@ def renderFormDefinition(form, response_dict):
response_dict["update_action"] = form.update_action
response_dict["update_action_title"] = Base_translateString(form.update_action_title)
if preferred_html_style_developer_mode:
form_relative_url = getFormRelativeUrl(form)
response_dict["edit_form_href"] = '%s/manage_main' % form_relative_url
response_dict["edit_form_action_href"] = '%s/%s/manage_main' % (
form_relative_url,
form.action)
def statusLevelToString(level):
"""Transform any level format to lowercase string representation"""
if isinstance(level, (str, unicode)):
......@@ -1291,7 +1327,7 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
# Always inform about portal
"portal": {
"href": default_document_uri_template % {
"root_url": portal.absolute_url(),
"root_url": portal_absolute_url,
# XXX the portal has an empty getRelativeUrl. Make it still compatible
# with restrictedTraverse
"relative_url": portal.getId(),
......@@ -1461,6 +1497,9 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
}
# Extract & modify action URLs
if preferred_html_style_developer_mode and 'object_jio_raw' not in erp5_action_dict:
erp5_action_dict["object_jio_raw"] = []
for erp5_action_key in erp5_action_dict.keys():
erp5_action_list = []
for view_action in erp5_action_dict[erp5_action_key]:
......@@ -1500,6 +1539,32 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
"extra_param_json": urlsafe_b64encode(json.dumps(ensureSerializable(extra_param_json)))
}
if preferred_html_style_developer_mode and erp5_action_key == "object_jio_jump":
erp5_action_list.append({
"href": url_template_dict["traverse_generator"] % {
"root_url": site_root.absolute_url(),
"script_id": script.id,
"view": "Base_redirectToPortalTypeDocument",
"relative_url": getRealRelativeUrl(traversed_document)
},
'name': "jump_to_portal_type",
'icon': None,
'title': Base_translateString(
"Edit Portal Type ${portal_type_name}",
mapping={
"portal_type_name": traversed_document.getTranslatedPortalType()
})
})
if preferred_html_style_developer_mode and erp5_action_key == "object_jio_raw":
if portal.portal_workflow.Base_getSourceVisibility():
for workflow in portal.portal_workflow.getWorkflowsFor(traversed_document):
erp5_action_list.append({
'href': "%s/manage_properties" % workflow.absolute_url_path(),
'name': "jump_to_%s" % workflow.id,
'icon': None,
'title': workflow.title})
if erp5_action_list:
if len(erp5_action_list) == 1:
erp5_action_list = erp5_action_list[0]
......
......@@ -10,6 +10,7 @@
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="domsugar.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_erp5_form.js" type="text/javascript"></script>
......
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>969.41882.58371.33382</string> </value>
<value> <string>987.52327.33749.63539</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1536679144.45</float>
<float>1605646543.35</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, document, rJS, RSVP*/
/*global window, document, rJS, RSVP, domsugar*/
/** Form is one of a complicated gadget!
*
......@@ -8,7 +8,7 @@
* changed in FormBox gadget which renders form as a subgadget
**/
(function (window, document, rJS, RSVP) {
(function (window, document, rJS, RSVP, domsugar) {
"use strict";
/**
......@@ -112,6 +112,15 @@
});
}
function addDeveloperAction(class_name,
title_href, title) {
return domsugar("a", {
"class": class_name,
href: title_href,
title: title
});
}
rJS(window)
.ready(function (g) {
......@@ -216,11 +225,14 @@
}));
})
.push(function (result_list) {
var dom_element = form_gadget.element.querySelector(".field_container"),
parent_element,
field_href,
current_field,
j;
if (modification_dict.hasOwnProperty('hash')) {
var dom_element = form_gadget.element
.querySelector(".field_container"),
j,
parent_element = document.createDocumentFragment();
parent_element = document.createDocumentFragment();
// Add all fieldset into the fragment
for (j = 0; j < result_list.length; j += 1) {
parent_element.appendChild(result_list[j]);
......@@ -230,6 +242,35 @@
}
dom_element.appendChild(parent_element);
}
current_field = form_gadget.element.querySelector(".edit-form");
if (form_definition.hasOwnProperty("edit_form_href") &&
!current_field) {
field_href = addDeveloperAction(
"edit-form ui-icon-edit ui-btn-icon-left",
form_definition.edit_form_href,
"Edit this form"
);
form_gadget.element.insertBefore(field_href, dom_element);
} else if (!form_definition.hasOwnProperty("edit_form_href") &&
current_field) {
form_gadget.element.removeChild(current_field);
}
current_field = form_gadget.element.querySelector(".edit-form-action");
if (form_definition.hasOwnProperty("edit_form_action_href") &&
!current_field) {
field_href = addDeveloperAction(
"edit-form-action ui-icon-external-link ui-btn-icon-left",
form_definition.edit_form_action_href,
"Edit this form's action"
);
form_gadget.element.insertBefore(field_href, dom_element);
} else if (!form_definition.hasOwnProperty("edit_form_action_href") &&
current_field) {
form_gadget.element.removeChild(current_field);
}
});
})
......@@ -308,4 +349,4 @@
}, {mutex: 'changestate'});
}(window, document, rJS, RSVP));
}(window, document, rJS, RSVP, domsugar));
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>979.61953.36209.9762</string> </value>
<value> <string>988.37612.36521.16964</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1574329059.87</float>
<float>1608090676.9</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -10,6 +10,7 @@
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="domsugar.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_erp5_label_field.js" type="text/javascript"></script>
</head>
......
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>970.11191.7445.40789</string> </value>
<value> <string>988.37340.38701.21060</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1536679172.23</float>
<float>1608133127.84</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, document, rJS*/
/*global window, document, rJS, domsugar, HTMLLabelElement*/
/*jslint indent: 2, maxerr: 3 */
/**
* Label gadget takes care of displaying validation errors and label.
......@@ -11,7 +11,7 @@
* - class "horizontal_align_form_box" will prevent any label to show as well
*
*/
(function (window, document, rJS) {
(function (window, document, rJS, domsugar, HTMLLabelElement) {
"use strict";
var SCOPE = 'field';
......@@ -74,6 +74,20 @@
return field_url;
}
function addDeveloperAction(class_name,
title_href, title, root_element) {
var field_href = domsugar("a", {
"class": class_name,
href: title_href,
title: title
});
if (root_element.constructor === HTMLLabelElement) {
root_element.appendChild(field_href);
} else {
root_element.insertBefore(field_href, root_element.querySelector("div"));
}
}
rJS(window)
.setState({
label_text: '',
......@@ -107,11 +121,14 @@
.onStateChange(function onStateChange(modification_dict) {
var gadget = this,
options = modification_dict.options || {},
field_json = options.field_json,
span,
css_class,
i,
queue,
new_div;
if (modification_dict.hasOwnProperty('first_call')) {
gadget.props = {
container_element: gadget.element.querySelector('div'),
......@@ -203,6 +220,61 @@
} else {
queue = gadget.getDeclaredGadget(SCOPE);
}
// make sure we have field_json and avoid
// display developer action to listbox cells
if (field_json && !field_json.hasOwnProperty("column")) {
queue
.push(function (field_gadget) {
var root_element,
current_field;
if (gadget.state.label === true) {
root_element = gadget.props.label_element;
} else {
root_element = field_gadget.element;
}
current_field = root_element.querySelector(".edit-field");
if (field_json.hasOwnProperty('edit_field_href') &&
!current_field) {
addDeveloperAction(
"edit-field ui-icon-edit ui-btn-icon-left",
field_json.edit_field_href,
"Edit this field",
root_element
);
} else if (!field_json.hasOwnProperty('edit_field_href') &&
current_field) {
root_element.removeChild(current_field);
}
current_field = root_element.querySelector(".translate-title");
if (field_json.hasOwnProperty('translate_title_href') &&
!current_field) {
addDeveloperAction(
"translate-title ui-icon-language ui-btn-icon-left",
field_json.translate_title_href,
"Translate this field title",
root_element
);
} else if (!field_json.hasOwnProperty('translate_title_href') &&
current_field) {
root_element.removeChild(current_field);
}
current_field = root_element.querySelector(".translate-description");
if (field_json.hasOwnProperty('translate_description_href') &&
!current_field) {
addDeveloperAction(
"translate-description ui-icon-language ui-btn-icon-left",
field_json.translate_description_href,
"Translate this field description",
root_element
);
} else if (!field_json.hasOwnProperty('translate_description_href') &&
current_field) {
root_element.removeChild(current_field);
}
return field_gadget;
});
}
return queue
.push(function (field_gadget) {
return field_gadget.render(gadget.state.options);
......@@ -266,4 +338,4 @@
return this.changeState({first_call: true, error_text: error_text});
});
}(window, document, rJS));
\ No newline at end of file
}(window, document, rJS, domsugar, HTMLLabelElement));
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>987.16240.14459.45960</string> </value>
<value> <string>988.44884.39635.56883</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1602525354.74</float>
<float>1608089673.89</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -1864,6 +1864,20 @@ div[data-gadget-url$="gadget_erp5_page_front.html"] > ul > li li {
padding: 3pt 6pt;
}
/**********************************************
* Developer mode actions
**********************************************/
.edit-form,
.edit-form-action,
.edit-field,
.translate-title,
.translate-description {
margin-left: 3pt;
color: #1F1F1F;
}
.translate-description {
border: 1px solid rgba(0, 0, 0, 0.3);
}
/**********************************************
* Icons
**********************************************/
.ui-btn-icon-top::before,
......
......@@ -6,6 +6,7 @@
data-i18n=Actions
data-i18n=Clone
data-i18n=Delete
data-i18n=Developer Mode
-->
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
......
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>981.54796.12366.61201</string> </value>
<value> <string>988.44135.7325.50909</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1581689062.62</float>
<float>1608044591.02</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -59,13 +59,15 @@
.onStateChange(function () {
var gadget = this,
erp5_document,
group_list;
group_list,
raw_list;
// Get the whole view as attachment because actions can change based on
// what view we are at. If no view available than fallback to "links".
return gadget.jio_getAttachment(gadget.state.jio_key, gadget.state.view || "links")
.push(function (jio_attachment) {
erp5_document = jio_attachment;
raw_list = ensureArray(erp5_document._links.action_object_jio_raw);
var i,
j,
......@@ -90,11 +92,21 @@
}
}
// Developer mode
for (i = 0; i < raw_list.length; i += 1) {
url_for_kw_list.push({
command: 'raw',
options: {
url: raw_list[i].href
}
});
}
url_for_kw_list.push({command: 'cancel_dialog_with_history'});
return RSVP.hash({
url_list: gadget.getUrlForList(url_for_kw_list),
translation_list: gadget.getTranslationList(['Workflows', 'Actions', 'Clone', 'Delete']),
translation_list: gadget.getTranslationList(['Workflows', 'Actions', 'Clone', 'Delete', 'Developer Mode']),
page_title: calculatePageTitle(gadget, erp5_document)
});
})
......@@ -104,6 +116,7 @@
j,
k = 0,
dom_list = [],
raw_action_list = [],
link_list;
for (i = 0; i < group_list.length; i += 3) {
......@@ -120,6 +133,17 @@
);
}
for (i = 0; i < raw_list.length; i += 1) {
raw_action_list.push({
title: raw_list[i].title,
link: result_dict.url_list[k]
});
k += 1;
}
if (raw_action_list.length > 0) {
dom_list.push(generateSection(result_dict.translation_list[4], 'plane', raw_action_list));
}
domsugar(gadget.element, dom_list);
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>981.55016.12244.41318</string> </value>
<value> <string>988.35901.64672.13858</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1582128763.98</float>
<float>1607550814.35</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -281,7 +281,9 @@
]);
})
.push(function (translated_title_list) {
var action_confirm = form_gadget.element.querySelector('input.dialogconfirm');
var field_href,
form_definition = modification_dict.form_definition,
action_confirm = form_gadget.element.querySelector('input.dialogconfirm');
if (action_confirm !== null) {
if (form_gadget.state.action_title) {
action_confirm.value = form_gadget.state.action_title;
......
......@@ -228,7 +228,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>987.241.33421.16076</string> </value>
<value> <string>988.16932.41419.17169</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>1601565340.43</float>
<float>1607348224.53</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -1199,12 +1199,12 @@ div[data-gadget-scope='header'] .ui-header {
animation: fadein @transition-timing;
}
// Dialog page template main submit button
// Dialog page template main submit button
input[type='submit'] {
.renderPageSubmitButton(@coloraccent);
text-shadow: @foreground-text-shadow;
}
// Dialog page template update button
// Dialog page template update button
button[name='action_update'] {
.renderPageSubmitButton(@grey);
}
......@@ -1371,7 +1371,6 @@ div[data-gadget-scope='header'] .ui-header {
.ui-field-contain {
& > label:not(.is-invalid) {
color: @colorlabel;
}
}
//Label styling in required and "invisible" field
......@@ -2128,6 +2127,18 @@ div[data-gadget-url$="gadget_erp5_page_front.html"] {
}
}
/**********************************************
* Developer mode actions
**********************************************/
.edit-form, .edit-form-action, .edit-field, .translate-title, .translate-description {
margin-left: @half-margin-size;
color: @black;
}
.translate-description {
border: @border;
}
/**********************************************
* Icons
**********************************************/
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Zuite" module="Products.Zelenium.zuite"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>renderjs_ui_developer_mode_zuite</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testAccessPortalTypeDocument</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Test Access Portal Type Document</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Access Portal Type Document</td></tr>
</thead><tbody>
<tal:block tal:define="is_listbox python: False;
website_url python: '{}/web_site_module/renderjs_runner/'.format(here.getPortalObject().absolute_url())">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/enable_developer_mode" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="ui-subheader"]/ul/li/a[text()="Views"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@class="ui-subheader"]/ul/li/a[text()="Views"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Developer Mode</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//ul[@class="document-listview"]/li/a[text()="Edit Portal Type Preference"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//ul[@class="document-listview"]/li/a[text()="Edit Portal Type Preference"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@value="Preference" and @id="field_my_id"]</td>
<td></td>
</tr>
<tr>
<td>assertElementNotPresent</td>
<td>//a[@data-i18n="Editable"]</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testAccessWorkflow</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Test Access Workflow</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Access Workflow</td></tr>
</thead><tbody>
<tal:block tal:define="is_listbox python: False;
website_url python: '{}/web_site_module/renderjs_runner/'.format(here.getPortalObject().absolute_url())">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/enable_developer_mode" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="ui-subheader"]/ul/li/a[text()="Actions"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@class="ui-subheader"]/ul/li/a[text()="Actions"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Developer Mode</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//ul[@class="document-listview"]/li/a[text()="Edit Workflow"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//ul[@class="document-listview"]/li/a[text()="Edit Workflow"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>edit_workflow</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@value="Edit Workflow"]</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testDeveloperEditField</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Test Developer Edit Field</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Developer Edit Field</td></tr>
</thead><tbody>
<tal:block tal:define="is_listbox python: True;
website_url python: '{}/web_site_module/renderjs_runner/'.format(here.getPortalObject().absolute_url())">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/enable_developer_mode" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//label[@for="field_my_preferred_html_style_developper_mode"]/a[@href="portal_skins/erp5_core/Preference_viewHtmlStyle/my_preferred_html_style_developper_mode/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//label[@for="field_my_preferred_html_style_developper_mode"]/a[@href="portal_skins/erp5_core/Preference_viewHtmlStyle/my_preferred_html_style_developper_mode/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//label[@for="field_my_preferred_html_style_developper_mode"]/a[@href="portal_skins/erp5_core/Preference_viewHtmlStyle/my_preferred_html_style_developper_mode/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@href="fieldTest"]/span/strong</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//a[@href="fieldTest"]/span/strong</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@value="Developer Mode"]</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testDeveloperEditForm</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Test Developer Edit Form</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Developer Edit Form</td></tr>
</thead><tbody>
<tal:block tal:define="is_listbox python: False;
website_url python: '{}/web_site_module/renderjs_runner/'.format(here.getPortalObject().absolute_url())">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/enable_developer_mode" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@title="Edit this form"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@title="Edit this form"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@href="portal_skins/erp5_core/Preference_viewHtmlStyle/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@href="portal_skins/erp5_core/Preference_viewHtmlStyle/manage_main"]</td>
<td></td>
</tr>
<!-- Check if save the page again will not create the links again -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/save" />
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@title="Edit this form"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@href="portal_skins/erp5_core/Preference_viewHtmlStyle/manage_main"][1]</td>
<td></td>
</tr>
<tr>
<td>assertElementNotPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@href="portal_skins/erp5_core/Preference_viewHtmlStyle/manage_main"][2]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@href="portal_skins/erp5_core/Preference_viewHtmlStyle/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@href="formTest"]/span/strong</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//a[@href="formTest"]/span/strong</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testDeveloperEditFormAction</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Test Developer Edit Form Action</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Developer Edit Form Action</td></tr>
</thead><tbody>
<tal:block tal:define="is_listbox python: False;
website_url python: '{}/web_site_module/renderjs_runner/'.format(here.getPortalObject().absolute_url())">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/enable_developer_mode" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@title="Edit this form's action"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@title="Edit this form's action"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@href="portal_skins/erp5_core/Preference_viewHtmlStyle/Base_edit/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@href="portal_skins/erp5_core/Preference_viewHtmlStyle/Base_edit/manage_main"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/save" />
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@title="Edit this form's action"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@title="Edit this form's action"][1]</td>
<td></td>
</tr>
<tr>
<td>assertElementNotPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@title="Edit this form's action"][2]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@href="portal_skins/erp5_core/Preference_viewHtmlStyle/Base_edit/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@href="ZScriptHTML_tryForm"]/span/strong</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//a[@href="ZScriptHTML_tryForm"]/span/strong</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="ZPythonScriptHTML_editAction:method"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="ZPythonScriptHTML_editAction:method"]</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testDeveloperModuleEditForm</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Test Module Edit Form</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Module Edit Form</td></tr>
</thead><tbody>
<tal:block tal:define="is_listbox python: True;
website_url python: '{}/web_site_module/renderjs_runner/'.format(here.getPortalObject().absolute_url())">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/enable_developer_mode" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//li/a[text()="Accounting"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//li/a[text()="Accounting"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@title="Edit this form"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@title="Edit this form"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@href="portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingTransactionList/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>store</td>
<td>javascript{selenium.browserbot.currentWindow.location.href}</td>
<td>current_location</td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@href="portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingTransactionList/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@href="formTest"]/span/strong</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//a[@href="formTest"]/span/strong</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${current_location}</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@href="portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingTransactionList/Base_doSelect/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@href="portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingTransactionList/Base_doSelect/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@href="ZScriptHTML_tryForm"]/span/strong</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Script (Python)</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${current_location}</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="ui-field-contain"]/div/a[@href="portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingTransactionList/listbox/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@class="ui-field-contain"]/div/a[@href="portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingTransactionList/listbox/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@href="fieldTest"]/span/strong</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@value="Accounting Transactions"]</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testDeveloperModuleEditFormAction</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Test Module Edit Form Action</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Module Edit Form Action</td></tr>
</thead><tbody>
<tal:block tal:define="is_listbox python: True;
website_url python: '{}/web_site_module/renderjs_runner/'.format(here.getPortalObject().absolute_url())">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/enable_developer_mode" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//li/a[text()="Accounting"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//li/a[text()="Accounting"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@title="Edit this form"]</td>
<td></td>
</tr>
<tr>
<td>store</td>
<td>javascript{selenium.browserbot.currentWindow.location.href}</td>
<td>current_location</td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@href="portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingTransactionList/Base_doSelect/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@href="portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingTransactionList/Base_doSelect/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@href="ZScriptHTML_tryForm"]/span/strong</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Script (Python)</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testDeveloperModuleEditLisbox</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Test Module Edit Listbox</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Module Edit Form</td></tr>
</thead><tbody>
<tal:block tal:define="is_listbox python: True;
website_url python: '{}/web_site_module/renderjs_runner/'.format(here.getPortalObject().absolute_url())">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/enable_developer_mode" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//li/a[text()="Accounting"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//li/a[text()="Accounting"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="ui-field-contain"]/div/a[@href="portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingTransactionList/listbox/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@class="ui-field-contain"]/div/a[@href="portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingTransactionList/listbox/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@href="fieldTest"]/span/strong</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@value="Accounting Transactions"]</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testDeveloperModuleTranslateField</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Test Module Translate Field</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Module Translate Field</td></tr>
</thead><tbody>
<tal:block tal:define="is_listbox python: False;
website_url python: '{}/web_site_module/renderjs_runner/'.format(here.getPortalObject().absolute_url())">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/enable_developer_mode" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id='field_my_preferred_html_style_translator_mode']</td>
<td></td>
</tr>
<tr>
<td>check</td>
<td>//input[@id='field_my_preferred_html_style_translator_mode']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/save" />
<tr>
<td>waitForElementPresent</td>
<td>//li/a[text()="Modules"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//li/a[text()="Modules"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//li/a[text()="Accounting"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//li/a[text()="Accounting"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="ui-field-contain"]/div/a[@href="/erp5/Localizer/erp5_ui/manage_messages?regex=^Accounting Transactions$&amp;lang=en"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@class="ui-field-contain"]/div/a[@href="/erp5/Localizer/erp5_ui/manage_messages?regex=^Accounting Transactions$&amp;lang=en"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="regex" and @value="^Accounting Transactions$"]</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testDeveloperTranslateField</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Test Developer Translate Field</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Developer Translate Field</td></tr>
</thead><tbody>
<tal:block tal:define="is_listbox python: False;
website_url python: '{}/web_site_module/renderjs_runner/'.format(here.getPortalObject().absolute_url())">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/enable_developer_mode" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id='field_my_preferred_html_style_translator_mode']</td>
<td></td>
</tr>
<tr>
<td>check</td>
<td>//input[@id='field_my_preferred_html_style_translator_mode']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/save" />
<tr>
<td>waitForElementPresent</td>
<td>//label[@for="field_my_preferred_html_style_translator_mode"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//label[@for="field_my_preferred_html_style_translator_mode"]/a[position()=2 and @title="Translate this field title"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//label[@for="field_my_preferred_html_style_translator_mode"]/a[position()=3 and @title="Translate this field description"]</td>
<td></td>
</tr>
<tr>
<td>store</td>
<td>javascript{selenium.browserbot.currentWindow.location.href}</td>
<td>current_location</td>
</tr>
<tr>
<td>click</td>
<td>//label[@for="field_my_preferred_html_style_translator_mode"]/a[position()=2 and @title="Translate this field title"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="regex" and @value="^Translator Mode$"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="regex" and @value="^Translator Mode$"]</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${current_location}</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//label[@for="field_my_preferred_html_style_translator_mode"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//label[@for="field_my_preferred_html_style_translator_mode"]/a[position()=2 and @title="Translate this field title"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//label[@for="field_my_preferred_html_style_translator_mode"]/a[position()=3 and @title="Translate this field description"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//label[@for="field_my_preferred_html_style_translator_mode"]/a[position()=3 and @title="Translate this field description"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="regex" and @value="^Indicate if we display link to translation system in interface or not$"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="regex" and @value="^Indicate if we display link to translation system in interface or not$"]</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testFieldsWithoutLabel</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Test Fields without label</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Fields without label</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Test Fields without label
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/expected_failure_for_anonymous_selection" />
</td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" />
<tal:block tal:define="is_listbox python: False;
website_url python: '{}/web_site_module/renderjs_runner/'.format(here.getPortalObject().absolute_url())">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/enable_developer_mode" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id='field_my_preferred_html_style_translator_mode']</td>
<td></td>
</tr>
<tr>
<td>check</td>
<td>//input[@id='field_my_preferred_html_style_translator_mode']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/save" />
<tr>
<td>waitForElementPresent</td>
<td>//a[text()="Modules"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[text()="Modules"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[text()="Foos"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[text()="Foos"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//td/a[text()="Title 1"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//td/a[text()="Title 1"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//td/a[text()="Title 1"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//td/a[text()="Title 1"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//dd/a[text()="Developer Mode Action"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//dd/a[text()="Developer Mode Action"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//label[@for="field_listbox_left"]/a[contains(@class, 'edit-field') and @href="portal_skins/erp5_ui_test/Foo_viewDeveloperModeAction/listbox_left/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//label[@for="field_listbox_left"]/a[contains(@class, 'translate-title') and @href="/erp5/Localizer/erp5_ui/manage_messages?regex=^Listbox$&amp;lang=en"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//label[@for="field_listbox_left"]/a[contains(@class, 'edit-field') and @href="portal_skins/erp5_ui_test/Foo_viewDeveloperModeAction/listbox_left/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//label[@for="field_listbox_left"]/a[contains(@class, 'translate-title') and @href="/erp5/Localizer/erp5_ui/manage_messages?regex=^Listbox$&amp;lang=en"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//label[@for="field_listbox_right"]/a[contains(@class, 'edit-field') and @href="portal_skins/erp5_ui_test/Foo_viewDeveloperModeAction/listbox_right/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//label[@for="field_listbox_right"]/a[contains(@class, 'translate-title') and @href="/erp5/Localizer/erp5_ui/manage_messages?regex=^Listbox$&amp;lang=en"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//label[@for="field_listbox_right"]/a[contains(@class, 'edit-field') and @href="portal_skins/erp5_ui_test/Foo_viewDeveloperModeAction/listbox_right/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//label[@for="field_listbox_right"]/a[contains(@class, 'translate-title') and @href="/erp5/Localizer/erp5_ui/manage_messages?regex=^Listbox$&amp;lang=en"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//label[@for="field_my_title"]/a[contains(@class, 'edit-field') and @href="portal_skins/erp5_ui_test/Foo_viewDeveloperModeAction/my_title/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//label[@for="field_my_title"]/a[contains(@class, 'translate-title') and @href="/erp5/Localizer/erp5_ui/manage_messages?regex=^Title$&amp;lang=en"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//label[@for="field_your_description"]/a[contains(@class, 'edit-field') and @href="portal_skins/erp5_ui_test/Foo_viewDeveloperModeAction/your_description/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//label[@for="field_your_description"]/a[contains(@class, 'translate-title') and @href="/erp5/Localizer/erp5_ui/manage_messages?regex=^Description$&amp;lang=en"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//a[contains(@class, 'edit-field') and @href="portal_skins/erp5_ui_test/Foo_viewDeveloperModeAction/listbox/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//a[contains(@class, 'translate-title') and @href="/erp5/Localizer/erp5_ui/manage_messages?regex=^Listbox$&amp;lang=en"]</td>
<td></td>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testHideButtonsAfterDisable</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Test Hide Buttons After Disable</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Developer Edit Form</td></tr>
</thead><tbody>
<tal:block tal:define="is_listbox python: False;
website_url python: '{}/web_site_module/renderjs_runner/'.format(here.getPortalObject().absolute_url())">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/enable_developer_mode" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@title="Edit this form"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@href="portal_skins/erp5_core/Preference_viewHtmlStyle/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>uncheck</td>
<td>//input[@id='field_my_preferred_html_style_developper_mode']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/save" />
<tr>
<td>waitForElementNotPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@title="Edit this form"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@href="portal_skins/erp5_core/Preference_viewHtmlStyle/manage_main"]</td>
<td></td>
</tr>
<tr>
<td>check</td>
<td>//input[@id='field_my_preferred_html_style_developper_mode']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/save" />
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@title="Edit this form"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id='field_my_preferred_html_style_translator_mode']</td>
<td></td>
</tr>
<tr>
<td>check</td>
<td>//input[@id='field_my_preferred_html_style_translator_mode']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/save" />
<tr>
<td>waitForElementPresent</td>
<td>//label[@for="field_my_preferred_html_style_translator_mode"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//label[@for="field_my_preferred_html_style_translator_mode"]/a[position()=2 and @title="Translate this field title"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//label[@for="field_my_preferred_html_style_translator_mode"]/a[position()=3 and @title="Translate this field description"]</td>
<td></td>
</tr>
<tr>
<td>uncheck</td>
<td>//input[@id='field_my_preferred_html_style_developper_mode']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/save" />
<tr>
<td>waitForElementNotPresent</td>
<td>//div[@data-gadget-scope="erp5_form"]/a[@title="Edit this form"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//label[@for="field_my_preferred_html_style_translator_mode"]/a[position()=1 and @title="Translate this field title"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//label[@for="field_my_preferred_html_style_translator_mode"]/a[position()=2 and @title="Translate this field description"]</td>
<td></td>
</tr>
<tr>
<td>uncheck</td>
<td>//input[@id='field_my_preferred_html_style_translator_mode']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/save" />
<tr>
<td>assertElementNotPresent</td>
<td>//label[@for="field_my_preferred_html_style_translator_mode"]/a[position()=1 and @title="Translate this field title"]</td>
<td></td>
</tr>
<tr>
<td>assertElementNotPresent</td>
<td>//label[@for="field_my_preferred_html_style_translator_mode"]/a[position()=2 and @title="Translate this field description"]</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testModuleAccessPortalTypeDocument</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Test Module Access Portal Type Document</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Module Access Portal Type Document</td></tr>
</thead><tbody>
<tal:block tal:define="is_listbox python: True;
website_url python: '{}/web_site_module/renderjs_runner/'.format(here.getPortalObject().absolute_url())">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/enable_developer_mode" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//li/a[text()="Accounting"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//li/a[text()="Accounting"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//dd[@class="document-listview"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Edit Portal Type Accounting Transaction Module</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//dd[@class="document-listview"]/a[text()="Edit Portal Type Accounting Transaction Module"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//dd[@class="document-listview"]/a[text()="Edit Portal Type Accounting Transaction Module"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id="field_my_id"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@value="Accounting Transaction Module" and @id="field_my_id"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Edit Portal Type Base Type</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//dd[@class="document-listview"]/a[text()="Edit Portal Type Base Type"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//a[@data-i18n="Base Type: Accounting Transaction Module"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Base Type: Accounting Transaction Module"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Edit Portal Type Accounting Transaction Module</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//dd[@class="document-listview"]/a[text()="Edit Portal Type Accounting Transaction Module"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//a[@data-i18n="Accounting"]</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
portal = context.getPortalObject()
active_preference = portal.portal_preferences.getActivePreference()
if active_preference.getPreferredHtmlStyleDevelopperMode():
active_preference.setPreferredHtmlStyleDevelopperMode(0)
active_preference.setPreferredHtmlStyleContextualHelp(0)
active_preference.setPreferredHtmlStyleTranslatorMode(0)
return "OK"
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_disableDeveloperMode</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -2,6 +2,8 @@ portal_tests/renderjs_ui_check_box_field_zuite
portal_tests/renderjs_ui_check_box_field_zuite/**
portal_tests/renderjs_ui_date_time_field_zuite
portal_tests/renderjs_ui_date_time_field_zuite/**
portal_tests/renderjs_ui_developer_mode_zuite
portal_tests/renderjs_ui_developer_mode_zuite/**
portal_tests/renderjs_ui_dms_zuite
portal_tests/renderjs_ui_dms_zuite/**
portal_tests/renderjs_ui_editor_gadget_zuite
......
......@@ -1764,5 +1764,88 @@
</tr>
</tal:block>
<tal:block metal:define-macro="enable_developer_mode">
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td tal:content="website_url"></td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//a[text()="Preferences"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[text()="Preferences"]</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/ERP5Site_disableDeveloperMode</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>OK</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>OK</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td tal:content="website_url"></td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//a[text()="Preferences"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[text()="Preferences"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[text()="User Interface"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[text()="User Interface"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id='field_my_preferred_html_style_developper_mode']</td>
<td></td>
</tr>
<tr>
<td>check</td>
<td>//input[@id='field_my_preferred_html_style_developper_mode']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/save" />
<tal:block tal:condition="is_listbox">
<tr>
<td>waitForElementPresent</td>
<td>//a[text()="Modules"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[text()="Modules"]</td>
<td></td>
</tr>
</tal:block>
</tal:block>
</tal:block>
\ No newline at end of file
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