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
Binh
erp5
Commits
eb696886
Commit
eb696886
authored
Mar 24, 2017
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] form_view_editable: catch 403 error
parent
4b8dd744
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
15 deletions
+24
-15
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_html.html
...ge_module/rjs_gadget_erp5_pt_form_view_editable_html.html
+1
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_html.xml
...age_module/rjs_gadget_erp5_pt_form_view_editable_html.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
...b_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
+19
-11
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.xml
..._page_module/rjs_gadget_erp5_pt_form_view_editable_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_html.html
View file @
eb696886
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<html>
<html>
<!--
<!--
data-i18n=Input data has errors
data-i18n=Input data has errors
data-i18n=You do not have the permissions to edit the object
-->
-->
<head>
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_html.xml
View file @
eb696886
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
5.51162.4768.35123
</string>
</value>
<value>
<string>
95
6.58742.58866.48708
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
14
82749363.33
</float>
<float>
14
90372079.18
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
View file @
eb696886
...
@@ -146,10 +146,17 @@
...
@@ -146,10 +146,17 @@
return
form_gadget
.
redirect
({
command
:
'
reload
'
});
return
form_gadget
.
redirect
({
command
:
'
reload
'
});
})
})
.
push
(
undefined
,
function
(
error
)
{
.
push
(
undefined
,
function
(
error
)
{
if
((
error
.
target
!==
undefined
)
&&
(
error
.
target
.
status
===
400
))
{
if
(
error
.
target
!==
undefined
)
{
var
error_text
;
if
(
error
.
target
.
status
===
400
)
{
error_text
=
'
Input data has errors
'
;
}
else
if
(
error
.
target
.
status
===
403
)
{
error_text
=
'
You do not have the permissions to edit the object
'
;
}
if
(
error_text
!==
undefined
)
{
return
form_gadget
.
notifySubmitted
()
return
form_gadget
.
notifySubmitted
()
.
push
(
function
()
{
.
push
(
function
()
{
return
form_gadget
.
translate
(
'
Input data has errors
'
);
return
form_gadget
.
translate
(
error_text
);
})
})
.
push
(
function
(
message
)
{
.
push
(
function
(
message
)
{
return
form_gadget
.
notifyChange
(
message
+
'
.
'
);
return
form_gadget
.
notifyChange
(
message
+
'
.
'
);
...
@@ -158,6 +165,7 @@
...
@@ -158,6 +165,7 @@
return
form_gadget
.
displayFormulatorValidationError
(
JSON
.
parse
(
error
.
target
.
responseText
));
return
form_gadget
.
displayFormulatorValidationError
(
JSON
.
parse
(
error
.
target
.
responseText
));
});
});
}
}
}
throw
error
;
throw
error
;
});
});
}
}
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.xml
View file @
eb696886
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
6.14154.33619.20206
</string>
</value>
<value>
<string>
95
7.33876.27734.63044
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
14
82749968.67
</float>
<float>
14
90373394.35
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
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