Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joshua
erp5
Commits
732d1356
Commit
732d1356
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 @
732d1356
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<head>
<head>
<!--
data-i18n=Input is required but no input given.
-->
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<title>
MultiListfield
</title>
<title>
MultiListfield
</title>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multilistfield_js.js
View file @
732d1356
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
}
}
rJS
(
window
)
rJS
(
window
)
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
(
options
)
{
var
field_json
=
options
.
field_json
||
{},
var
field_json
=
options
.
field_json
||
{},
item_list
=
ensureArray
(
field_json
.
items
).
map
(
function
(
item
)
{
item_list
=
ensureArray
(
field_json
.
items
).
map
(
function
(
item
)
{
...
@@ -171,9 +172,16 @@
...
@@ -171,9 +172,16 @@
var
gadget
=
this
,
var
gadget
=
this
,
empty
=
true
;
empty
=
true
;
if
(
this
.
state
.
editable
&&
this
.
state
.
required
)
{
if
(
this
.
state
.
editable
&&
this
.
state
.
required
)
{
return
this
.
getContent
()
return
new
RSVP
.
Queue
()
.
push
(
function
(
result
)
{
.
push
(
function
()
{
var
value_list
=
result
[
gadget
.
state
.
sub_select_key
],
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
;
i
;
for
(
i
=
0
;
i
<
value_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
value_list
.
length
;
i
+=
1
)
{
if
(
value_list
[
i
])
{
if
(
value_list
[
i
])
{
...
@@ -181,7 +189,7 @@
...
@@ -181,7 +189,7 @@
}
}
}
}
if
(
empty
)
{
if
(
empty
)
{
return
gadget
.
notifyInvalid
(
"
Please fill out this field.
"
);
return
gadget
.
notifyInvalid
(
error_message
);
}
}
return
gadget
.
notifyValid
();
return
gadget
.
notifyValid
();
})
})
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_radiofield_html.html
View file @
732d1356
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<head>
<head>
<!--
data-i18n=Input is required but no input given.
-->
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<title>
ERP5 Radiofield
</title>
<title>
ERP5 Radiofield
</title>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_radiofield_js.js
View file @
732d1356
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
rJS
(
window
)
rJS
(
window
)
.
declareAcquiredMethod
(
"
notifyValid
"
,
"
notifyValid
"
)
.
declareAcquiredMethod
(
"
notifyValid
"
,
"
notifyValid
"
)
.
declareAcquiredMethod
(
"
notifyInvalid
"
,
"
notifyInvalid
"
)
.
declareAcquiredMethod
(
"
notifyInvalid
"
,
"
notifyInvalid
"
)
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
(
options
)
{
var
field_json
=
options
.
field_json
||
{},
var
field_json
=
options
.
field_json
||
{},
state_dict
=
{
state_dict
=
{
...
@@ -153,14 +154,22 @@
...
@@ -153,14 +154,22 @@
.
declareMethod
(
'
checkValidity
'
,
function
()
{
.
declareMethod
(
'
checkValidity
'
,
function
()
{
var
name
=
this
.
state
.
name
,
var
name
=
this
.
state
.
name
,
gadget
=
this
,
gadget
=
this
,
empty
;
empty
;
if
(
this
.
state
.
editable
&&
this
.
state
.
required
)
{
if
(
this
.
state
.
editable
&&
this
.
state
.
required
)
{
return
this
.
getContent
()
return
new
RSVP
.
Queue
()
.
push
(
function
(
result
)
{
.
push
(
function
()
{
empty
=
!
result
[
name
];
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
)
{
if
(
empty
)
{
return
gadget
.
notifyInvalid
(
"
Please fill out this field.
"
);
return
gadget
.
notifyInvalid
(
error_message
);
}
}
return
gadget
.
notifyValid
();
return
gadget
.
notifyValid
();
})
})
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_radiofield_js.xml
View file @
732d1356
...
@@ -214,7 +214,7 @@
...
@@ -214,7 +214,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
valentin
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -228,7 +228,7 @@
...
@@ -228,7 +228,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -246,7 +246,7 @@
...
@@ -246,7 +246,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
56896193.1
</float>
<float>
15
62581079.03
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_html.html
View file @
732d1356
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
data-i18n=No such document was found
data-i18n=No such document was found
data-i18n=Create New
data-i18n=Create New
data-i18n=Explore the Search Result List
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
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<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 @
732d1356
...
@@ -131,6 +131,7 @@
...
@@ -131,6 +131,7 @@
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
getFormContent
"
,
"
getFormContent
"
)
.
declareAcquiredMethod
(
"
getFormContent
"
,
"
getFormContent
"
)
.
declareAcquiredMethod
(
"
getTranslationList
"
,
"
getTranslationList
"
)
.
declareAcquiredMethod
(
"
getTranslationList
"
,
"
getTranslationList
"
)
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
// .declareAcquiredMethod("addRelationInput", "addRelationInput")
// .declareAcquiredMethod("addRelationInput", "addRelationInput")
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
...
@@ -494,12 +495,17 @@
...
@@ -494,12 +495,17 @@
},
true
,
false
)
},
true
,
false
)
.
declareMethod
(
'
checkValidity
'
,
function
()
{
.
declareMethod
(
'
checkValidity
'
,
function
()
{
var
gadget
=
this
;
if
((
this
.
state
.
value_text
)
&&
(
if
((
this
.
state
.
value_text
)
&&
(
(
this
.
state
.
value_relative_url
===
null
)
&&
(
this
.
state
.
value_relative_url
===
null
)
&&
(
this
.
state
.
value_uid
===
null
)
&&
(
this
.
state
.
value_uid
===
null
)
&&
(
this
.
state
.
value_portal_type
===
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
()
{
.
push
(
function
()
{
return
false
;
return
false
;
});
});
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_html.html
View file @
732d1356
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<head>
<head>
<!--
data-i18n=Invalid DateTime
-->
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<title>
HTML5 Input
</title>
<title>
HTML5 Input
</title>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_js.js
View file @
732d1356
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
}
}
rJS
(
window
)
rJS
(
window
)
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareMethod
(
'
render
'
,
function
render
(
options
)
{
.
declareMethod
(
'
render
'
,
function
render
(
options
)
{
return
this
.
changeState
({
return
this
.
changeState
({
value
:
getFirstNonEmpty
(
options
.
value
,
""
),
value
:
getFirstNonEmpty
(
options
.
value
,
""
),
...
@@ -192,7 +192,10 @@
...
@@ -192,7 +192,10 @@
if
(
value
)
{
if
(
value
)
{
date
=
Date
.
parse
(
value
);
date
=
Date
.
parse
(
value
);
if
(
isNaN
(
date
))
{
if
(
isNaN
(
date
))
{
return
gadget
.
notifyInvalid
(
"
Invalid DateTime
"
)
return
gadget
.
translate
(
"
Invalid DateTime
"
)
.
push
(
function
(
error_message
)
{
return
gadget
.
notifyInvalid
(
error_message
);
})
.
push
(
function
()
{
.
push
(
function
()
{
return
false
;
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