Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Guillaume Hervier
slapos.core
Commits
4b738b19
Commit
4b738b19
authored
Sep 21, 2018
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Fix the update of login/password on ERP5 Login
parent
d8a98e4e
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
467 additions
and
11 deletions
+467
-11
master/bt5/slapos_jio/ActionTemplateItem/portal_types/ERP5%20Login/slaposjs_view.xml
...nTemplateItem/portal_types/ERP5%20Login/slaposjs_view.xml
+1
-1
master/bt5/slapos_jio/ActionTemplateItem/portal_types/Facebook%20Login/slaposjs_view.xml
...plateItem/portal_types/Facebook%20Login/slaposjs_view.xml
+1
-1
master/bt5/slapos_jio/ActionTemplateItem/portal_types/Google%20Login/slaposjs_view.xml
...emplateItem/portal_types/Google%20Login/slaposjs_view.xml
+1
-1
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_erp5_login_view_js.js
...ge_module/rjs_gadget_erp5_page_slap_erp5_login_view_js.js
+21
-6
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_facebook_login_view_js.js
...odule/rjs_gadget_erp5_page_slap_facebook_login_view_js.js
+1
-1
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_google_login_view_js.js
..._module/rjs_gadget_erp5_page_slap_google_login_view_js.js
+1
-1
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Login_edit.py
...lateItem/portal_skins/slapos_hal_json_style/Login_edit.py
+16
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Login_edit.xml
...ateItem/portal_skins/slapos_hal_json_style/Login_edit.xml
+70
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Login_viewAsHateoas.xml
...ortal_skins/slapos_hal_json_style/Login_viewAsHateoas.xml
+153
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Login_viewAsHateoas/my_password.xml
...slapos_hal_json_style/Login_viewAsHateoas/my_password.xml
+96
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Login_viewAsHateoas/my_reference.xml
...lapos_hal_json_style/Login_viewAsHateoas/my_reference.xml
+106
-0
No files found.
master/bt5/slapos_jio/ActionTemplateItem/portal_types/ERP5%20Login/slaposjs_view.xml
View file @
4b738b19
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
text
</string>
</key>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/Login_view
</string>
</value>
<value>
<string>
string:${object_url}/Login_view
AsHateoas
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
master/bt5/slapos_jio/ActionTemplateItem/portal_types/Facebook%20Login/slaposjs_view.xml
View file @
4b738b19
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
text
</string>
</key>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/Login_view
</string>
</value>
<value>
<string>
string:${object_url}/Login_view
AsHateoas
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
master/bt5/slapos_jio/ActionTemplateItem/portal_types/Google%20Login/slaposjs_view.xml
View file @
4b738b19
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
text
</string>
</key>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/Login_view
</string>
</value>
<value>
<string>
string:${object_url}/Login_view
AsHateoas
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_erp5_login_view_js.js
View file @
4b738b19
...
@@ -32,7 +32,8 @@
...
@@ -32,7 +32,8 @@
})
})
.
onEvent
(
'
submit
'
,
function
()
{
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
;
var
gadget
=
this
,
doc
=
{};
return
gadget
.
notifySubmitting
()
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
...
@@ -41,11 +42,25 @@
...
@@ -41,11 +42,25 @@
return
form_gadget
.
getContent
();
return
form_gadget
.
getContent
();
})
})
.
push
(
function
(
content
)
{
.
push
(
function
(
content
)
{
return
gadget
.
updateDocument
(
content
);
var
k
;
})
for
(
k
in
content
)
{
if
(
k
!==
"
password_confirmation
"
)
{
doc
[
k
]
=
content
[
k
];
}
if
((
k
===
"
password_confirmation
"
)
&&
(
content
.
password
!==
content
.
password_confirmation
))
{
return
gadget
.
notifySubmitted
({
message
:
'
Password is different from confirmation
'
,
status
:
'
error
'
});
}
}
return
gadget
.
getSetting
(
"
hateoas_url
"
)
.
push
(
function
(
hateoas_url
)
{
return
gadget
.
jio_putAttachment
(
gadget
.
state
.
jio_key
,
hateoas_url
+
gadget
.
state
.
jio_key
+
"
/Login_edit
"
,
doc
)
.
push
(
function
()
{
.
push
(
function
()
{
return
gadget
.
notifySubmitted
({
message
:
'
Data Updated
'
,
status
:
'
success
'
});
return
gadget
.
notifySubmitted
({
message
:
'
Data Updated
'
,
status
:
'
success
'
});
});
});
});
});
})
})
.
declareMethod
(
"
triggerSubmit
"
,
function
()
{
.
declareMethod
(
"
triggerSubmit
"
,
function
()
{
...
@@ -125,7 +140,7 @@
...
@@ -125,7 +140,7 @@
.
push
(
function
(
url_list
)
{
.
push
(
function
(
url_list
)
{
var
header_dict
=
{
var
header_dict
=
{
selection_url
:
url_list
[
1
],
selection_url
:
url_list
[
1
],
page_title
:
"
Login :
"
+
gadget
.
state
.
doc
.
titl
e
,
page_title
:
"
Login :
"
+
gadget
.
state
.
doc
.
referenc
e
,
delete_url
:
url_list
[
2
],
delete_url
:
url_list
[
2
],
save_action
:
true
save_action
:
true
};
};
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_facebook_login_view_js.js
View file @
4b738b19
...
@@ -117,7 +117,7 @@
...
@@ -117,7 +117,7 @@
.
push
(
function
(
url_list
)
{
.
push
(
function
(
url_list
)
{
var
header_dict
=
{
var
header_dict
=
{
selection_url
:
url_list
[
1
],
selection_url
:
url_list
[
1
],
page_title
:
"
Facebook Login :
"
+
gadget
.
state
.
doc
.
titl
e
,
page_title
:
"
Facebook Login :
"
+
gadget
.
state
.
doc
.
referenc
e
,
delete_url
:
url_list
[
2
]
delete_url
:
url_list
[
2
]
};
};
if
(
!
gadget
.
state
.
editable
)
{
if
(
!
gadget
.
state
.
editable
)
{
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_google_login_view_js.js
View file @
4b738b19
...
@@ -117,7 +117,7 @@
...
@@ -117,7 +117,7 @@
.
push
(
function
(
url_list
)
{
.
push
(
function
(
url_list
)
{
var
header_dict
=
{
var
header_dict
=
{
selection_url
:
url_list
[
1
],
selection_url
:
url_list
[
1
],
page_title
:
"
Google Login :
"
+
gadget
.
state
.
doc
.
titl
e
,
page_title
:
"
Google Login :
"
+
gadget
.
state
.
doc
.
referenc
e
,
delete_url
:
url_list
[
2
]
delete_url
:
url_list
[
2
]
};
};
if
(
!
gadget
.
state
.
editable
)
{
if
(
!
gadget
.
state
.
editable
)
{
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Login_edit.py
0 → 100644
View file @
4b738b19
from
zExceptions
import
Unauthorized
edit_kw
=
{}
person
=
context
.
getPortalObject
().
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
if
person
!=
context
.
getParentValue
():
raise
Unauthorized
if
reference
is
not
None
:
edit_kw
[
"reference"
]
=
reference
if
password
is
not
None
:
edit_kw
[
"password"
]
=
password
if
len
(
edit_kw
):
context
.
edit
(
**
edit_kw
)
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Login_edit.xml
0 → 100644
View file @
4b738b19
<?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>
reference=None, password=None
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Login_edit
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Login_viewAsHateoas.xml
0 → 100644
View file @
4b738b19
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ERP5 Form"
module=
"erp5.portal_type"
/>
</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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
Base_edit
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
edit_order
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
enctype
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<list>
<string>
normal
</string>
<string>
right
</string>
<string>
center
</string>
<string>
bottom
</string>
<string>
hidden
</string>
</list>
</value>
</item>
<item>
<key>
<string>
groups
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
bottom
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
center
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
normal
</string>
</key>
<value>
<list>
<string>
my_password
</string>
<string>
my_reference
</string>
</list>
</value>
</item>
<item>
<key>
<string>
right
</string>
</key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Login_viewAsHateoas
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
<value>
<string>
POST
</string>
</value>
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
Project_viewAsHateoas
</string>
</value>
</item>
<item>
<key>
<string>
pt
</string>
</key>
<value>
<string>
form_view
</string>
</value>
</item>
<item>
<key>
<string>
row_length
</string>
</key>
<value>
<int>
4
</int>
</value>
</item>
<item>
<key>
<string>
stored_encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Project
</string>
</value>
</item>
<item>
<key>
<string>
unicode_mode
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
update_action
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
update_action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Login_viewAsHateoas/my_password.xml
0 → 100644
View file @
4b738b19
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_password
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_string_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Password
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Login_viewAsHateoas/my_reference.xml
0 → 100644
View file @
4b738b19
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
css_class
</string>
<string>
editable
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_reference
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string>
inline
</string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_reference
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Reference
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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