Skip to content

Commit d0a979c

Browse files
committed
Signals
1 parent 9880bdd commit d0a979c

File tree

207 files changed

+5330
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

207 files changed

+5330
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Audience xmlns="http://soap.sforce.com/2006/04/metadata">
3+
<audienceName>Default</audienceName>
4+
<container>signals</container>
5+
<criteria/>
6+
<formulaFilterType>AllCriteriaMatch</formulaFilterType>
7+
<isDefaultAudience>true</isDefaultAudience>
8+
</Audience>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!-- add implements="forceCommunity:availableForAllPageTypes" to surface the component in community builder -->
2+
<aura:component controller="LightningForgotPasswordController">
3+
<aura:attribute name="usernameLabel" type="String" required="false" default="Username"/>
4+
<aura:attribute name="submitButtonLabel" type="String" required="false" default="Reset Password"/>
5+
<aura:attribute name="showError" type="Boolean" required="true" description="" default="false" access="private"/>
6+
<aura:attribute name="errorMessage" type="String" required="false" description="" access="private"/>
7+
<aura:attribute name="checkEmailUrl" type="String" required="true"/>
8+
<aura:attribute name="expid" type="String" required="false" description="The branding experience ID" />
9+
<aura:handler name="init" value="{!this}" action="{!c.initialize}"/>
10+
<aura:handler event="c:setExpId" action="{!c.setExpId}"/>
11+
<aura:dependency resource="c:setExpId" type="EVENT"/>
12+
13+
<div>
14+
<aura:renderIf isTrue="{!v.showError}">
15+
<div id="error">
16+
<ui:outputRichText value="{!v.errorMessage}"/>
17+
</div>
18+
</aura:renderIf>
19+
<div id="sfdc_username_container" class="sfdc">
20+
<span id="sfdc_user" class="login-icon" data-icon="a"></span>
21+
<ui:inputText value="" aura:id="username" placeholder="{!v.usernameLabel}" keyup="{!c.onKeyUp}" class="input sfdc_usernameinput sfdc"/>
22+
</div>
23+
24+
<div class="sfdc">
25+
<ui:button aura:id="submitButton" label="{!v.submitButtonLabel}" press="{!c.handleForgotPassword}" class="sfdc_button"/>
26+
</div>
27+
28+
</div>
29+
</aura:component>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3+
<apiVersion>60.0</apiVersion>
4+
<description>Sample Component for forgotPassword</description>
5+
</AuraDefinitionBundle>
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
.THIS #sfdc_username_container{
2+
margin-bottom:10px;
3+
padding: 12px;
4+
background-color:white;
5+
border: 1px solid #CCC;
6+
-webkit-border-radius: 2px;
7+
-moz-border-radius: 2px;
8+
border-radius: 2px;
9+
}
10+
11+
.THIS #sfdc_user{
12+
float:left;
13+
width:23px;
14+
height:25px;
15+
padding-top:1px;
16+
padding-left:2px;
17+
margin:0px;
18+
19+
}
20+
21+
.THIS .login-icon {
22+
color:#ccc;font-size:22px;
23+
}
24+
25+
.THIS button.sfdc_button {
26+
width: 100%;
27+
margin-top: 15px;
28+
margin-bottom: 5px;
29+
color: #fff;
30+
background-color: #0070d2;
31+
border-color: #357ebd;
32+
display: inline-block;
33+
text-align: center;
34+
vertical-align: middle;
35+
background-image: none;
36+
border: 1px solid transparent;
37+
white-space: nowrap;
38+
padding: 10px 12px;
39+
font-size: 16px;
40+
font-family: 'Open Sans', sans-serif;
41+
font-weight: 300;
42+
line-height: 1.42857143;
43+
border-radius: 2px;
44+
-webkit-user-select: none;
45+
-moz-user-select: none;
46+
-ms-user-select: none;
47+
}
48+
49+
.THIS button:hover {
50+
background-color:#3276b1;
51+
border-color:#285e8e;
52+
cursor:pointer;
53+
}
54+
55+
.THIS input {
56+
margin-left:10px;
57+
margin-top: 3px;
58+
border: 0px solid transparent;
59+
width: 70%;
60+
-webkit-appearance: none;
61+
font-size: 14px;
62+
}
63+
64+
.THIS #error {
65+
text-align: center;
66+
color:#FF0000;
67+
}
68+
69+
.THIS a {
70+
color:white;
71+
text-decoration: none;
72+
}
73+
.THIS a:hover {
74+
color:white;
75+
text-decoration: none;
76+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<design:component label="Custom Forgot Password">
2+
<design:attribute name="checkEmailUrl" default="./CheckPasswordResetEmail"/>
3+
<design:attribute name="usernameLabel" default="Username"/>
4+
<design:attribute name="submitButtonLabel" default="Reset Password"/>
5+
</design:component>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
({
2+
handleForgotPassword: function (component, event, helpler) {
3+
helpler.handleForgotPassword(component, event, helpler);
4+
},
5+
onKeyUp: function(component, event, helpler){
6+
//checks for "enter" key
7+
if (event.getParam('keyCode')===13) {
8+
helpler.handleForgotPassword(component, event, helpler);
9+
}
10+
},
11+
12+
setExpId: function (component, event, helper) {
13+
var expId = event.getParam('expid');
14+
if (expId) {
15+
component.set("v.expid", expId);
16+
}
17+
helper.setBrandingCookie(component, event, helper);
18+
},
19+
20+
initialize: function(component, event, helper) {
21+
$A.get("e.siteforce:registerQueryEventMap").setParams({"qsToEvent" : helper.qsToEventMap}).fire();
22+
}
23+
})
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
({
2+
qsToEventMap: {
3+
'expid' : 'e.c:setExpId'
4+
},
5+
6+
handleForgotPassword: function (component, event, helpler) {
7+
var username = component.find("username").get("v.value");
8+
var checkEmailUrl = component.get("v.checkEmailUrl");
9+
var action = component.get("c.forgotPassword");
10+
action.setParams({username:username, checkEmailUrl:checkEmailUrl});
11+
action.setCallback(this, function(a) {
12+
var rtnValue = a.getReturnValue();
13+
if (rtnValue != null) {
14+
component.set("v.errorMessage",rtnValue);
15+
component.set("v.showError",true);
16+
}
17+
});
18+
$A.enqueueAction(action);
19+
},
20+
21+
setBrandingCookie: function (component, event, helpler) {
22+
var expId = component.get("v.expid");
23+
if (expId) {
24+
var action = component.get("c.setExperienceId");
25+
action.setParams({expId:expId});
26+
action.setCallback(this, function(a){ });
27+
$A.enqueueAction(action);
28+
}
29+
}
30+
})
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<!-- add implements="forceCommunity:availableForAllPageTypes" to surface the component in community builder -->
2+
<aura:component controller="LightningLoginFormController">
3+
<aura:attribute name="showError" type="Boolean" required="true" description="" default="false" access="private"/>
4+
<aura:attribute name="errorMessage" type="String" required="false" description="" access="private"/>
5+
<aura:attribute name="startUrl" type="String" required="false" description="The url you go to after a successful login" />
6+
<aura:attribute name="usernameLabel" type="String" required="false" default="Username"/>
7+
<aura:attribute name="passwordLabel" type="String" required="false" default="Password"/>
8+
<aura:attribute name="loginButtonLabel" type="String" required="false" default="Log in"/>
9+
<aura:attribute name="expid" type="String" required="false" description="The branding experience ID" />
10+
11+
<aura:attribute name="forgotPasswordLabel" type="String" required="false" default="Forgot your password?"/>
12+
<aura:attribute name="selfRegisterLabel" type="String" required="false" default="Not a member?"/>
13+
<aura:attribute name="forgotPasswordUrl" type="String" required="false" default="/ForgotPassword"/>
14+
<aura:attribute name="selfRegisterUrl" type="String" required="false" default="/SelfRegister"/>
15+
16+
<aura:attribute name="isUsernamePasswordEnabled" type="Boolean" access="private"/>
17+
<aura:attribute name="isSelfRegistrationEnabled" type="Boolean" access="private"/>
18+
<aura:attribute name="communityForgotPasswordUrl" type="String" access="private"/>
19+
<aura:attribute name="communitySelfRegisterUrl" type="String" access="private"/>
20+
21+
<aura:registerevent name="sitePropagatedStartUrl" type="c:setStartUrl"/>
22+
<aura:handler name="init" value="{!this}" action="{!c.initialize}"/>
23+
<aura:dependency resource="c:setStartUrl" type="EVENT"/>
24+
<!-- Please uncomment
25+
<aura:dependency resource="siteforce:registerQueryEventMap" type="EVENT"/>
26+
-->
27+
<aura:handler event="c:setStartUrl" action="{!c.setStartUrl}"/>
28+
<aura:handler event="c:setExpId" action="{!c.setExpId}"/>
29+
<aura:dependency resource="c:setExpId" type="EVENT"/>
30+
31+
<div>
32+
<aura:renderIf isTrue="{!v.isUsernamePasswordEnabled}">
33+
<span>
34+
<aura:renderIf isTrue="{!v.showError}">
35+
<div id="error">
36+
<ui:outputRichText value="{!v.errorMessage}"/>
37+
</div>
38+
</aura:renderIf>
39+
</span>
40+
<div id="sfdc_username_container" class="sfdc">
41+
<span id="sfdc_user" class="login-icon" data-icon="a"></span>
42+
<ui:inputText value="" aura:id="username" placeholder="{!v.usernameLabel}" keyup="{!c.onKeyUp}" class="input sfdc_usernameinput sfdc" label="{!v.usernameLabel}" labelClass="assistiveText"/>
43+
</div>
44+
45+
<div id="sfdc_password_container" class="sfdc">
46+
<span id="sfdc_lock" class="login-icon sfdc" data-icon="c"></span>
47+
<ui:inputSecret value="" aura:id="password" placeholder="{!v.passwordLabel}" keyup="{!c.onKeyUp}" class="input sfdc_passwordinput sfdc" label="{!v.passwordLabel}" labelClass="assistiveText"/>
48+
</div>
49+
50+
<div class="sfdc">
51+
<ui:button aura:id="submitButton" label="{!v.loginButtonLabel}" press="{!c.handleLogin}" class="sfdc_button"/>
52+
</div>
53+
54+
<div id="sfdc_forgot" class="sfdc">
55+
<span><a href="{!if(v.communityForgotPasswordUrl == null, v.forgotPasswordUrl, v.communityForgotPasswordUrl)}">{!v.forgotPasswordLabel}</a></span>
56+
<aura:renderIf isTrue="{!v.isSelfRegistrationEnabled}">
57+
<span style="float:right" ><a href="{!if(v.communitySelfRegisterUrl == null, v.selfRegisterUrl, v.communitySelfRegisterUrl)}">{!v.selfRegisterLabel}</a></span>
58+
</aura:renderIf>
59+
</div>
60+
</aura:renderIf>
61+
</div>
62+
</aura:component>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3+
<apiVersion>60.0</apiVersion>
4+
<description>Sample Component for loginForm</description>
5+
</AuraDefinitionBundle>
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
.THIS #sfdc_username_container{
2+
margin-bottom:10px;
3+
padding: 12px;
4+
background-color:white;
5+
border: 1px solid #CCC;
6+
-webkit-border-radius: 2px;
7+
-moz-border-radius: 2px;
8+
border-radius: 2px;
9+
}
10+
11+
.THIS #sfdc_user{
12+
float:left;
13+
width:23px;
14+
height:25px;
15+
padding-top:1px;
16+
padding-left:2px;
17+
margin:0px;
18+
19+
}
20+
21+
.THIS #sfdc_lock{
22+
float:left;
23+
width:23px;
24+
height:25px;
25+
padding-top:1px;
26+
padding-left:2px;
27+
margin:0px;
28+
}
29+
30+
.THIS #error {
31+
text-align: center;
32+
color:#FF0000;
33+
}
34+
35+
.THIS .login-icon {
36+
color:#ccc;font-size:22px;
37+
}
38+
39+
.THIS #sfdc_password_container{
40+
padding: 12px;
41+
background-color:white;
42+
border: 1px solid #CCC;
43+
-webkit-border-radius: 2px;
44+
-moz-border-radius: 2px;
45+
border-radius: 2px;
46+
}
47+
48+
.THIS button.sfdc_button {
49+
width: 100%;
50+
margin-top: 15px;
51+
margin-bottom: 5px;
52+
color: #fff;
53+
background-color: #0070d2;
54+
border-color: #357ebd;
55+
display: inline-block;
56+
text-align: center;
57+
vertical-align: middle;
58+
background-image: none;
59+
border: 1px solid transparent;
60+
white-space: nowrap;
61+
padding: 10px 12px;
62+
font-size: 16px;
63+
font-family: 'Open Sans', sans-serif;
64+
font-weight: 300;
65+
line-height: 1.42857143;
66+
border-radius: 2px;
67+
-webkit-user-select: none;
68+
-moz-user-select: none;
69+
-ms-user-select: none;
70+
}
71+
72+
.THIS button:hover {
73+
background-color:#3276b1;
74+
border-color:#285e8e;
75+
cursor:pointer;
76+
}
77+
78+
.THIS button .label {
79+
color: #fff;
80+
}
81+
82+
.THIS input {
83+
margin-left:10px;
84+
margin-top: 3px;
85+
border: 0px solid transparent;
86+
width: 70%;
87+
-webkit-appearance: none;
88+
font-size: 14px;
89+
}
90+
91+
92+
.THIS a {
93+
color:white;
94+
text-decoration: none;
95+
}
96+
.THIS a:hover {
97+
color:white;
98+
text-decoration: none;
99+
}
100+
101+
.THIS label.uiLabel-hidden {
102+
display:none;
103+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<design:component label="Custom Login Form">
2+
<design:attribute name="startUrl"/>
3+
<design:attribute name="usernameLabel" default="Email"/>
4+
<design:attribute name="passwordLabel" default="Password"/>
5+
<design:attribute name="loginButtonLabel" default="Log in"/>
6+
<design:attribute name="forgotPasswordLabel" default="Forgot your password?"/>
7+
<design:attribute name="forgotPasswordUrl"/>
8+
<design:attribute name="selfRegisterLabel" default="Not a member?"/>
9+
<design:attribute name="selfRegisterUrl"/>
10+
</design:component>

0 commit comments

Comments
 (0)