Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Orbit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Applications
Orbit
Commits
f29e3c82
Commit
f29e3c82
authored
6 years ago
by
Alexandre Bourlier
Browse files
Options
Downloads
Patches
Plain Diff
feature - edit profile to its maximum and beyond !
parent
d03ea92a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dist/lib/sib-core
+1
-1
1 addition, 1 deletion
dist/lib/sib-core
src/html/member-edit-profile.html
+36
-5
36 additions, 5 deletions
src/html/member-edit-profile.html
with
37 additions
and
6 deletions
sib-core
@
60be3fcb
Subproject commit
444d258357cc525300c291e45f7be7f920f972e1
Subproject commit
60be3fcb3d3f54f7fa3f760cf6cdbb2aeac4277d
This diff is collapsed.
Click to expand it.
src/html/member-edit-profile.html
+
36
−
5
View file @
f29e3c82
...
...
@@ -13,18 +13,49 @@
// }
//}
//customElements.define("ldp-form-img-upload", LDPFormImgUpload);
//widget-avatar="ldp-form-img-upload"
class HDAppUserInfo extends SIBDisplayLookupList {
get parentElement() {return "div"}
getTemplate(value, index) {
var firstname, lastname, email;
if(typeof value == "object")
if(value.first_name) {
firstname = value.first_name;
lastname = value.last_name;
email = value.email;
}
else {
store.get(value).then(resource => {
this.value.push(resource);
this.render();
});
if(Array.isArray(this.value))this.value.splice(this.value.indexOf(value), 1);
else this.value = [];
return '';
}
return `
<
div
id
=
"
${firstname}-${lastname}
"
>
$
{
firstname
}
$
{
lastname
}
<
/div
>
<
div
id
=
"
${email}
"
>
$
{
email
}
<
/div>`
;
}
}
customElements
.
define
(
'
hdapp-userinfo
'
,
HDAppUserInfo
);
</script>
<div
id=
"member-edit-profile"
style=
"display: none"
>
<label
for=
"avatar-input"
>
<img
id=
"avatar-preview"
src=
"http://cdn.local/hdapp/members/alexandre-bourlier.jpg"
style=
"width: 100%;"
/>
</label>
<input
type=
"file"
accept=
"image/*"
id=
"avatar-input"
name=
"avatar"
value=
"http://cdn.hd-app.local/members/alexandre-bourlier.jpg"
/>
<!--
<label for="avatar-input">
-->
<!--
<img id="avatar-preview" src="http://cdn.local/hdapp/members/alexandre-bourlier.jpg" style="width: 100%;"/>
-->
<!--
</label>
-->
<!--
<input type="file" accept="image/*" id="avatar-input" name="avatar" value="http://cdn.hd-app.local/members/alexandre-bourlier.jpg" />
-->
<sib-form
class=
"edit-form"
data-fields=
"user, avatar, bio, cell, jabberID, number, pseudo, skills, website"
widget-user=
"hdapp-usereditinfo"
range-cell=
"<?php echo $sdn; ?>/cells/"
widget-skills=
"sib-form-multiple-dropdown"
range-skills=
"<?php echo $sdn; ?>/skills/"
bind-resources
></sib-form>
</div>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment