Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ecommerce-ui
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
ecommerce-ui
Commits
7d4abb2b
Commit
7d4abb2b
authored
May 07, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app/data: allow non form fields into form scheme
parent
d3df0e73
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
54 deletions
+69
-54
data/order.json
data/order.json
+45
-44
data/personal_data.json
data/personal_data.json
+10
-3
js/erp5_loader.js
js/erp5_loader.js
+12
-5
lang/en-EN/dict.json
lang/en-EN/dict.json
+1
-1
lang/fr-FR/dict.json
lang/fr-FR/dict.json
+1
-1
No files found.
data/order.json
View file @
7d4abb2b
...
...
@@ -11,12 +11,40 @@
"scheme"
:
[
{
"position"
:
"left"
,
"field_list"
:
[
{
"type"
:
"div"
,
"direct"
:
{
"className"
:
"ui-fieldcontain"
},
"logic"
:
{
"skip"
:
true
},
"children"
:
[{
"type"
:
"legend"
,
"direct"
:
{
"className"
:
"translate required_label"
},
"attributes"
:
{
"data-i18n"
:
"global_dict.select"
}
},
{
"generate"
:
"widget"
,
"type"
:
"listview"
,
"property_dict"
:
{
"inset"
:
"true"
,
"class_list"
:
"subscription_selector force_corners"
,
"map_children"
:
"listItem"
,
"wrap"
:
2
},
"children"
:
[
{
"type"
:
"divider"
,
"center"
:
[{
"type"
:
"h3"
,
"text_i18n"
:
"portal_type_dict.sales_order_dict.text_dict.choose_offer"
}]},
{
"type"
:
"item"
,
"class_list"
:
"violet"
,
"left"
:
[{
"type"
:
"image"
,
"src"
:
"img/bg-offre01.png"
,
"alt"
:
""
}],
"center"
:
[{
"type"
:
"h3"
,
"text_i18n"
:
"portal_type_dict.sales_order_dict.text_dict.fixed_price"
},
{
"type"
:
"p"
,
"text_i18n"
:
"portal_type_dict.sales_order_dict.text_dict.fixed_details"
}],
"right"
:
[{
"type"
:
"radio"
,
"id"
:
"subscription_plan-0"
,
"name"
:
"subscription_plan"
}]},
{
"type"
:
"item"
,
"class_list"
:
"rose"
,
"left"
:
[{
"type"
:
"image"
,
"src"
:
"img/bg-offre02.png"
,
"alt"
:
""
}],
"center"
:
[{
"type"
:
"h3"
,
"text_i18n"
:
"portal_type_dict.sales_order_dict.text_dict.carte_fixed"
},
{
"type"
:
"p"
,
"text_i18n"
:
"portal_type_dict.sales_order_dict.text_dict.carte_details"
}],
"right"
:
[{
"type"
:
"radio"
,
"id"
:
"subscription_plan-1"
,
"name"
:
"subscription_plan"
}]}
]
}]
},
{
"field"
:
"coupon_code"
}
]
},
{
"position"
:
"right"
,
"field_list"
:
[
{
"field"
:
"number_of_badges"
},
{
"field"
:
"requested_invoice_method"
},
{
"field"
:
"additional_badge_holders"
},
{
"type"
:
"p"
,
"direct"
:
{
"className"
:
"translate custom_padding"
},
"attributes"
:
{
"data-i18n"
:
"portal_type_dict.sales_order_dict.text_dict.coupon_info"
}},
{
"field"
:
"coupon_code"
}
{
"type"
:
"p"
,
"direct"
:
{
"className"
:
"translate custom_padding"
},
"attributes"
:
{
"data-i18n"
:
"portal_type_dict.sales_order_dict.text_dict.coupon_info"
}}
]
}
],
...
...
@@ -59,30 +87,21 @@
"public_key"
:
"6Ldpb-oSAAAAAGwriKpk4ol1n4yjN_as6M4xv0zA"
},
"children"
:
[{
"type"
:
"div"
,
"direct"
:
{
"className"
:
"span_2"
},
"generate"
:
"widget"
,
"type"
:
"controlgroup"
,
"property_dict"
:
{
"class_list"
:
"center"
,
"direction"
:
"horizontal"
},
"children"
:
[{
"type"
:
"div"
,
"direct"
:
{
"className"
:
"ui-fieldcontain"
},
"children"
:
[{
"type"
:
"legend"
,
"direct"
:
{
"className"
:
"translate required_label"
},
"attributes"
:
{
"data-i18n"
:
"global_dict.select"
}
},
{
"generate"
:
"widget"
,
"type"
:
"listview"
,
"property_dict"
:
{
"inset"
:
"true"
,
"class_list"
:
"subscription_selector force_corners"
,
"map_children"
:
"listItem"
,
"wrap"
:
2
},
"children"
:
[
{
"type"
:
"divider"
,
"center"
:
[{
"type"
:
"h3"
,
"text_i18n"
:
"portal_type_dict.sales_order_dict.text_dict.choose_offer"
}]},
{
"type"
:
"item"
,
"class_list"
:
"violet"
,
"left"
:
[{
"type"
:
"image"
,
"src"
:
"img/bg-offre01.png"
,
"alt"
:
""
}],
"center"
:
[{
"type"
:
"h3"
,
"text_i18n"
:
"portal_type_dict.sales_order_dict.text_dict.fixed_price"
},
{
"type"
:
"p"
,
"text_i18n"
:
"portal_type_dict.sales_order_dict.text_dict.fixed_details"
}],
"right"
:
[{
"type"
:
"radio"
,
"id"
:
"subscription_plan-0"
,
"name"
:
"subscription_plan"
}]},
{
"type"
:
"item"
,
"class_list"
:
"rose"
,
"left"
:
[{
"type"
:
"image"
,
"src"
:
"img/bg-offre02.png"
,
"alt"
:
""
}],
"center"
:
[{
"type"
:
"h3"
,
"text_i18n"
:
"portal_type_dict.sales_order_dict.text_dict.carte_fixed"
},
{
"type"
:
"p"
,
"text_i18n"
:
"portal_type_dict.sales_order_dict.text_dict.carte_details"
}],
"right"
:
[{
"type"
:
"radio"
,
"id"
:
"subscription_plan-1"
,
"name"
:
"subscription_plan"
}]}
]
}]
"type"
:
"a"
,
"direct"
:
{
"href"
:
"#"
,
"className"
:
"translate ui-disabled ui-btn ui-btn-icon-left ui-icon-carat-l"
},
"attributes"
:
{
"data-i18n"
:
"portal_type_dict.sales_order_dict.text_dict.retour"
}
},
{
"type"
:
"input"
,
"direct"
:
{
"className"
:
"action translate"
},
"attributes"
:
{
"type"
:
"submit"
,
"data-action"
:
"update"
,
"data-icon"
:
"carat-r"
,
"data-theme"
:
"active"
,
"data-i18n"
:
"[value]portal_type_dict.sales_order_dict.text_dict.proceed"
},
"logic"
:
{
"wrapper_class_list"
:
" ui-last-child "
}
}]
},
{
"type"
:
"div"
,
...
...
@@ -115,26 +134,8 @@
"type"
:
"a"
,
"direct"
:
{
"href"
:
"#"
,
"className"
:
"translate ui-btn ui-icon-medkit ui-corner-all ui-btn-icon-right"
},
"attributes"
:
{
"data-i18n"
:
"portal_type_dict.sales_order_dict.text_dict.help"
}
}]
}]
},
{
"generate"
:
"widget"
,
"type"
:
"controlgroup"
,
"property_dict"
:
{
"class_list"
:
"center"
,
"direction"
:
"horizontal"
},
"children"
:
[{
"type"
:
"a"
,
"direct"
:
{
"href"
:
"#"
,
"className"
:
"translate ui-disabled ui-btn ui-btn-icon-left ui-icon-carat-l"
},
"attributes"
:
{
"data-i18n"
:
"portal_type_dict.sales_order_dict.text_dict.retour"
}
},
{
"type"
:
"input"
,
"direct"
:
{
"className"
:
"action translate"
},
"attributes"
:
{
"type"
:
"submit"
,
"data-action"
:
"update"
,
"data-icon"
:
"carat-r"
,
"data-theme"
:
"active"
,
"data-i18n"
:
"[value]portal_type_dict.sales_order_dict.text_dict.proceed"
},
"logic"
:
{
"wrapper_class_list"
:
" ui-last-child "
}
}]
}
]
}
]
}
data/personal_data.json
View file @
7d4abb2b
...
...
@@ -120,9 +120,16 @@
"direction"
:
"horizontal"
},
"children"
:
[
{
"type"
:
"a"
,
"direct"
:
{
"href"
:
"#subscription"
,
"className"
:
"translate ui-btn ui-btn-icon-left ui-icon-carat-l"
},
"attributes"
:
{
"data-i18n"
:
"portal_type_dict.sales_order_dict.text_dict.retour"
}},
{
"type"
:
"input"
,
"direct"
:
{
"className"
:
"action translate"
},
"attributes"
:
{
"type"
:
"submit"
,
"data-action"
:
"update"
,
"data-iconpos"
:
"right"
,
"data-theme"
:
"active"
,
"data-icon"
:
"carat-r"
,
"data-i18n"
:
"[value]global_dict.proceed"
},
"logic"
:
{
"wrapper_class_list"
:
" ui-last-child "
}}
]
{
"type"
:
"a"
,
"direct"
:
{
"href"
:
"#subscription"
,
"className"
:
"translate ui-btn ui-btn-icon-left ui-icon-carat-l"
},
"attributes"
:
{
"data-i18n"
:
"portal_type_dict.sales_order_dict.text_dict.retour"
}
},
{
"type"
:
"input"
,
"direct"
:
{
"className"
:
"action translate"
},
"attributes"
:
{
"type"
:
"submit"
,
"data-action"
:
"update"
,
"data-icon"
:
"carat-r"
,
"data-theme"
:
"active"
,
"data-i18n"
:
"[value]portal_type_dict.sales_order_dict.text_dict.proceed"
},
"logic"
:
{
"wrapper_class_list"
:
" ui-last-child "
}
}]
}
]
}
...
...
js/erp5_loader.js
View file @
7d4abb2b
...
...
@@ -3768,6 +3768,11 @@
pass
=
{
"
push
"
:
field
};
}
// pass HTML fields
if
(
field
.
logic
&&
field
.
logic
.
skip
)
{
pass
=
{
"
push
"
:
field
};
}
// fields that needing mapping (custom or based on dict)
if
(
!
pass
)
{
root
=
item
.
field_dict
[
field
.
field
];
...
...
@@ -3961,13 +3966,15 @@
}
}
};
}
// NOTE: we can't remove type from attributes, but must delete
// it if it's null, otherwise code is not valid (Opera chokes)
if
(
pass
.
push
.
attributes
.
type
===
null
)
{
delete
pass
.
push
.
attributes
.
type
;
// NOTE: we can't remove type from attributes, but must delete
// it if it's null, otherwise code is not valid (Opera chokes)
if
(
pass
.
push
.
attributes
.
type
===
null
)
{
delete
pass
.
push
.
attributes
.
type
;
}
}
// need to set position here to also include custom fields
pass
.
position
=
segment
.
position
===
"
center
"
?
1
:
2
;
...
...
lang/en-EN/dict.json
View file @
7d4abb2b
...
...
@@ -77,7 +77,7 @@
"portal_type_dict"
:
{
"sales_order_dict"
:
{
"text_dict"
:
{
"proceed"
:
"Continue
with my order
"
,
"proceed"
:
"Continue"
,
"electronic"
:
"Electronic invoice"
,
"paper"
:
"Paper Invoice (€0.85 per month)"
,
"choose_offer"
:
"Choose a plan"
,
...
...
lang/fr-FR/dict.json
View file @
7d4abb2b
...
...
@@ -103,7 +103,7 @@
"details"
:
"Plus d'informations sur les forfaits disponibles."
,
"coupon_info"
:
"Vous disposez d'un code promo, code jeu concours ou numéro de parrain. Saisissez le code correspondant ci-dessous"
,
"retour"
:
"Retour"
,
"proceed"
:
"Poursuivre
avec mon commande
"
,
"proceed"
:
"Poursuivre"
,
"advantages"
:
"Les avantages Bip&Go"
,
"waiting"
:
"Plus d'attente au péage"
,
"valid"
:
"Partout en France et dans plus de 250 parkings"
,
...
...
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