Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
erp5
Commits
4b041c02
Commit
4b041c02
authored
Jul 08, 2019
by
Valentin Benozillo
Committed by
Valentin Benozillo
Jul 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: Add missed invalid message translation
parent
5e4454e0
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
52 additions
and
16 deletions
+52
-16
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multilistfield_html.html
.../web_page_module/rjs_gadget_erp5_multilistfield_html.html
+3
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multilistfield_js.js
...Item/web_page_module/rjs_gadget_erp5_multilistfield_js.js
+12
-4
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_radiofield_html.html
...Item/web_page_module/rjs_gadget_erp5_radiofield_html.html
+3
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_radiofield_js.js
...lateItem/web_page_module/rjs_gadget_erp5_radiofield_js.js
+15
-6
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_radiofield_js.xml
...ateItem/web_page_module/rjs_gadget_erp5_radiofield_js.xml
+3
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_html.html
.../web_page_module/rjs_gadget_erp5_relation_input_html.html
+1
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_js.js
...Item/web_page_module/rjs_gadget_erp5_relation_input_js.js
+7
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_html.html
...lateItem/web_page_module/rjs_gadget_html5_input_html.html
+3
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_js.js
...TemplateItem/web_page_module/rjs_gadget_html5_input_js.js
+5
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multilistfield_html.html
View file @
4b041c02
<!DOCTYPE html>
<html>
<head>
<!--
data-i18n=Input is required but no input given.
-->
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<title>
MultiListfield
</title>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multilistfield_js.js
View file @
4b041c02
...
...
@@ -28,6 +28,7 @@
}
rJS
(
window
)
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareMethod
(
'
render
'
,
function
(
options
)
{
var
field_json
=
options
.
field_json
||
{},
item_list
=
ensureArray
(
field_json
.
items
).
map
(
function
(
item
)
{
...
...
@@ -171,9 +172,16 @@
var
gadget
=
this
,
empty
=
true
;
if
(
this
.
state
.
editable
&&
this
.
state
.
required
)
{
return
this
.
getContent
()
.
push
(
function
(
result
)
{
var
value_list
=
result
[
gadget
.
state
.
sub_select_key
],
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getContent
(),
gadget
.
translate
(
"
Input is required but no input given.
"
)
]);
})
.
push
(
function
(
all_result
)
{
var
value_list
=
all_result
[
0
][
gadget
.
state
.
sub_select_key
],
error_message
=
all_result
[
1
],
i
;
for
(
i
=
0
;
i
<
value_list
.
length
;
i
+=
1
)
{
if
(
value_list
[
i
])
{
...
...
@@ -181,7 +189,7 @@
}
}
if
(
empty
)
{
return
gadget
.
notifyInvalid
(
"
Please fill out this field.
"
);
return
gadget
.
notifyInvalid
(
error_message
);
}
return
gadget
.
notifyValid
();
})
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_radiofield_html.html
View file @
4b041c02
<!DOCTYPE html>
<html>
<head>
<!--
data-i18n=Input is required but no input given.
-->
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<title>
ERP5 Radiofield
</title>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_radiofield_js.js
View file @
4b041c02
...
...
@@ -31,6 +31,7 @@
rJS
(
window
)
.
declareAcquiredMethod
(
"
notifyValid
"
,
"
notifyValid
"
)
.
declareAcquiredMethod
(
"
notifyInvalid
"
,
"
notifyInvalid
"
)
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareMethod
(
'
render
'
,
function
(
options
)
{
var
field_json
=
options
.
field_json
||
{},
state_dict
=
{
...
...
@@ -153,14 +154,22 @@
.
declareMethod
(
'
checkValidity
'
,
function
()
{
var
name
=
this
.
state
.
name
,
gadget
=
this
,
empty
;
gadget
=
this
,
empty
;
if
(
this
.
state
.
editable
&&
this
.
state
.
required
)
{
return
this
.
getContent
()
.
push
(
function
(
result
)
{
empty
=
!
result
[
name
];
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getContent
(),
gadget
.
translate
(
"
Input is required but no input given.
"
)
]);
})
.
push
(
function
(
all_result
)
{
var
content
=
all_result
[
0
],
error_message
=
all_result
[
1
];
empty
=
!
content
[
name
];
if
(
empty
)
{
return
gadget
.
notifyInvalid
(
"
Please fill out this field.
"
);
return
gadget
.
notifyInvalid
(
error_message
);
}
return
gadget
.
notifyValid
();
})
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_radiofield_js.xml
View file @
4b041c02
...
...
@@ -214,7 +214,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
valentin
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -228,7 +228,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
97
5.30669.46484.853
</string>
</value>
<value>
<string>
97
6.61321.38056.58231
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>
15
56896193.1
</float>
<float>
15
62581079.03
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_html.html
View file @
4b041c02
...
...
@@ -5,6 +5,7 @@
data-i18n=No such document was found
data-i18n=Create New
data-i18n=Explore the Search Result List
data-i18n=No such document was found
-->
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_js.js
View file @
4b041c02
...
...
@@ -131,6 +131,7 @@
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
getFormContent
"
,
"
getFormContent
"
)
.
declareAcquiredMethod
(
"
getTranslationList
"
,
"
getTranslationList
"
)
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
// .declareAcquiredMethod("addRelationInput", "addRelationInput")
/////////////////////////////////////////////////////////////////
...
...
@@ -494,12 +495,17 @@
},
true
,
false
)
.
declareMethod
(
'
checkValidity
'
,
function
()
{
var
gadget
=
this
;
if
((
this
.
state
.
value_text
)
&&
(
(
this
.
state
.
value_relative_url
===
null
)
&&
(
this
.
state
.
value_uid
===
null
)
&&
(
this
.
state
.
value_portal_type
===
null
)
))
{
return
this
.
notifyInvalid
(
"
No such document was found
"
)
return
gadget
.
translate
(
"
No such document was found
"
)
.
push
(
function
(
error_message
)
{
return
gadget
.
notifyInvalid
(
error_message
);
})
.
push
(
function
()
{
return
false
;
});
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_html.html
View file @
4b041c02
<!DOCTYPE html>
<html>
<head>
<!--
data-i18n=Invalid DateTime
-->
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<title>
HTML5 Input
</title>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_js.js
View file @
4b041c02
...
...
@@ -17,7 +17,7 @@
}
rJS
(
window
)
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareMethod
(
'
render
'
,
function
render
(
options
)
{
return
this
.
changeState
({
value
:
getFirstNonEmpty
(
options
.
value
,
""
),
...
...
@@ -192,7 +192,10 @@
if
(
value
)
{
date
=
Date
.
parse
(
value
);
if
(
isNaN
(
date
))
{
return
gadget
.
notifyInvalid
(
"
Invalid DateTime
"
)
return
gadget
.
translate
(
"
Invalid DateTime
"
)
.
push
(
function
(
error_message
)
{
return
gadget
.
notifyInvalid
(
error_message
);
})
.
push
(
function
()
{
return
false
;
});
...
...
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