<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][13111] trunk/src: BP Blocks: add a link to reset the user password into the Login Form</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://buddypress.trac.wordpress.org/changeset/13111">13111</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://buddypress.trac.wordpress.org/changeset/13111","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>imath</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2021-09-19 13:02:18 +0000 (Sun, 19 Sep 2021)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>BP Blocks: add a link to reset the user password into the Login Form
- add a setting to let the Admin choose whether to show this link from the block's inspector settings.
- Include this link under the "Log In" button if this setting is active.
Props ellucinda
Fixes <a href="http://buddypress.trac.wordpress.org/ticket/8100">#8100</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpcorebpcoreblocksphp">trunk/src/bp-core/bp-core-blocks.php</a></li>
<li><a href="#trunksrcbpcoreclassesclassbpcorephp">trunk/src/bp-core/classes/class-bp-core.php</a></li>
<li><a href="#trunksrcbpcorecssblocksloginformrtlcss">trunk/src/bp-core/css/blocks/login-form-rtl.css</a></li>
<li><a href="#trunksrcbpcorecssblocksloginformcss">trunk/src/bp-core/css/blocks/login-form.css</a></li>
<li><a href="#trunksrcbpcorejsblocksloginformjs">trunk/src/bp-core/js/blocks/login-form.js</a></li>
<li><a href="#trunksrcbpcoresassblocksloginformscss">trunk/src/bp-core/sass/blocks/login-form.scss</a></li>
<li><a href="#trunksrcjsbpcorejsblocksloginformeditjs">trunk/src/js/bp-core/js/blocks/login-form/edit.js</a></li>
<li><a href="#trunksrcjsbpcorejsblocksloginformjs">trunk/src/js/bp-core/js/blocks/login-form.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpcorebpcoreblocksphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/bp-core-blocks.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/bp-core-blocks.php 2021-09-18 12:59:21 UTC (rev 13110)
+++ trunk/src/bp-core/bp-core-blocks.php 2021-09-19 13:02:18 UTC (rev 13111)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -221,12 +221,22 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string HTML output.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function bp_blocks_get_login_widget_registration_link( $content = '', $args = array() ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( isset( $args['form_id'] ) && 'bp-login-widget-form' === $args['form_id'] && bp_get_signup_allowed() ) {
- $content .= sprintf(
- '<p class="bp-login-widget-register-link"><a href="%1$s">%2$s</a></p>',
- esc_url( bp_get_signup_page() ),
- esc_html__( 'Register', 'buddypress' )
- );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( isset( $args['form_id'] ) && 'bp-login-widget-form' === $args['form_id'] ) {
+ if ( bp_get_signup_allowed() ) {
+ $content .= sprintf(
+ '<p class="bp-login-widget-register-link"><a href="%1$s">%2$s</a></p>',
+ esc_url( bp_get_signup_page() ),
+ esc_html__( 'Register', 'buddypress' )
+ );
+ }
+
+ if ( isset( $args['include_pwd_link'] ) && true === $args['include_pwd_link'] ) {
+ $content .= sprintf(
+ '<p class="bp-login-widget-pwd-link"><a href="%1$s">%2$s</a></p>',
+ esc_url( wp_lostpassword_url( bp_get_root_domain() ) ),
+ esc_html__( 'Lost your password?', 'buddypress' )
+ );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $action_output = '';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -260,7 +270,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $block_args = bp_parse_args(
</span><span class="cx" style="display: block; padding: 0 10px"> $attributes,
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'title' => '',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'title' => '',
+ 'forgotPwdLink' => false,
</ins><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -338,6 +349,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $action_output = '';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $pwd_link = (bool) $block_args['forgotPwdLink'];
+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( has_action( 'bp_before_login_widget_loggedout' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> ob_start();
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -357,14 +370,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $widget_content .= wp_login_form(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'echo' => false,
- 'form_id' => 'bp-login-widget-form',
- 'id_username' => 'bp-login-widget-user-login',
- 'label_username' => __( 'Username', 'buddypress' ),
- 'id_password' => 'bp-login-widget-user-pass',
- 'label_password' => __( 'Password', 'buddypress' ),
- 'id_remember' => 'bp-login-widget-rememberme',
- 'id_submit' => 'bp-login-widget-submit',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'echo' => false,
+ 'form_id' => 'bp-login-widget-form',
+ 'id_username' => 'bp-login-widget-user-login',
+ 'label_username' => __( 'Username', 'buddypress' ),
+ 'id_password' => 'bp-login-widget-user-pass',
+ 'label_password' => __( 'Password', 'buddypress' ),
+ 'id_remember' => 'bp-login-widget-rememberme',
+ 'id_submit' => 'bp-login-widget-submit',
+ 'include_pwd_link' => $pwd_link,
</ins><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcbpcoreclassesclassbpcorephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/classes/class-bp-core.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/classes/class-bp-core.php 2021-09-18 12:59:21 UTC (rev 13110)
+++ trunk/src/bp-core/classes/class-bp-core.php 2021-09-19 13:02:18 UTC (rev 13111)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -397,10 +397,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'style' => 'bp-login-form-block',
</span><span class="cx" style="display: block; padding: 0 10px"> 'style_url' => plugins_url( 'css/blocks/login-form.css', dirname( __FILE__ ) ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'attributes' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'title' => array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'title' => array(
</ins><span class="cx" style="display: block; padding: 0 10px"> 'type' => 'string',
</span><span class="cx" style="display: block; padding: 0 10px"> 'default' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'forgotPwdLink' => array(
+ 'type' => 'boolean',
+ 'default' => false,
+ ),
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'render_callback' => 'bp_block_render_login_form_block',
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span></span></pre></div>
<a id="trunksrcbpcorecssblocksloginformrtlcss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/css/blocks/login-form-rtl.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/css/blocks/login-form-rtl.css 2021-09-18 12:59:21 UTC (rev 13110)
+++ trunk/src/bp-core/css/blocks/login-form-rtl.css 2021-09-19 13:02:18 UTC (rev 13111)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -34,3 +34,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> margin-right: 1em;
</span><span class="cx" style="display: block; padding: 0 10px"> vertical-align: super;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+#bp-login-widget-form .bp-login-widget-pwd-link {
+ font-size: 80%;
+}
</ins></span></pre></div>
<a id="trunksrcbpcorecssblocksloginformcss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/css/blocks/login-form.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/css/blocks/login-form.css 2021-09-18 12:59:21 UTC (rev 13110)
+++ trunk/src/bp-core/css/blocks/login-form.css 2021-09-19 13:02:18 UTC (rev 13111)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -34,3 +34,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> margin-left: 1em;
</span><span class="cx" style="display: block; padding: 0 10px"> vertical-align: super;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+#bp-login-widget-form .bp-login-widget-pwd-link {
+ font-size: 80%;
+}
</ins></span></pre></div>
<a id="trunksrcbpcorejsblocksloginformjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/js/blocks/login-form.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/js/blocks/login-form.js 2021-09-18 12:59:21 UTC (rev 13110)
+++ trunk/src/bp-core/js/blocks/login-form.js 2021-09-19 13:02:18 UTC (rev 13111)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -134,6 +134,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> Disabled = _wp$components.Disabled,
</span><span class="cx" style="display: block; padding: 0 10px"> PanelBody = _wp$components.PanelBody,
</span><span class="cx" style="display: block; padding: 0 10px"> TextControl = _wp$components.TextControl,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ToggleControl = _wp$components.ToggleControl,
</ins><span class="cx" style="display: block; padding: 0 10px"> _wp$element = _wp.element,
</span><span class="cx" style="display: block; padding: 0 10px"> Fragment = _wp$element.Fragment,
</span><span class="cx" style="display: block; padding: 0 10px"> createElement = _wp$element.createElement,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -148,7 +149,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> var editLoginForm = function editLoginForm(_ref) {
</span><span class="cx" style="display: block; padding: 0 10px"> var attributes = _ref.attributes,
</span><span class="cx" style="display: block; padding: 0 10px"> setAttributes = _ref.setAttributes;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- var title = attributes.title;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ var title = attributes.title,
+ forgotPwdLink = attributes.forgotPwdLink;
</ins><span class="cx" style="display: block; padding: 0 10px"> return createElement(Fragment, null, createElement(InspectorControls, null, createElement(PanelBody, {
</span><span class="cx" style="display: block; padding: 0 10px"> title: __('Settings', 'buddypress'),
</span><span class="cx" style="display: block; padding: 0 10px"> initialOpen: true
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -160,6 +162,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> title: text
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ }), createElement(ToggleControl, {
+ label: __('Include the link to reset the user password', 'buddypress'),
+ checked: !!forgotPwdLink,
+ onChange: function onChange() {
+ setAttributes({
+ forgotPwdLink: !forgotPwdLink
+ });
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }))), createElement(Disabled, null, createElement(ServerSideRender, {
</span><span class="cx" style="display: block; padding: 0 10px"> block: "bp/login-form",
</span><span class="cx" style="display: block; padding: 0 10px"> attributes: attributes
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -243,6 +253,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> title: {
</span><span class="cx" style="display: block; padding: 0 10px"> type: 'string',
</span><span class="cx" style="display: block; padding: 0 10px"> default: ''
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ },
+ forgotPwdLink: {
+ type: 'boolean',
+ default: false
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> edit: _edit.default,
</span></span></pre></div>
<a id="trunksrcbpcoresassblocksloginformscss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/sass/blocks/login-form.scss</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/sass/blocks/login-form.scss 2021-09-18 12:59:21 UTC (rev 13110)
+++ trunk/src/bp-core/sass/blocks/login-form.scss 2021-09-19 13:02:18 UTC (rev 13111)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -40,4 +40,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> margin-left: 1em;
</span><span class="cx" style="display: block; padding: 0 10px"> vertical-align: super;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ .bp-login-widget-pwd-link {
+ font-size: 80%;
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcjsbpcorejsblocksloginformeditjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/js/bp-core/js/blocks/login-form/edit.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/js/bp-core/js/blocks/login-form/edit.js 2021-09-18 12:59:21 UTC (rev 13110)
+++ trunk/src/js/bp-core/js/blocks/login-form/edit.js 2021-09-19 13:02:18 UTC (rev 13111)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9,6 +9,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> Disabled,
</span><span class="cx" style="display: block; padding: 0 10px"> PanelBody,
</span><span class="cx" style="display: block; padding: 0 10px"> TextControl,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ToggleControl,
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> element: {
</span><span class="cx" style="display: block; padding: 0 10px"> Fragment,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -29,7 +30,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> } = bp;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> const editLoginForm = ( { attributes, setAttributes } ) => {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- const { title } = attributes;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ const { title,forgotPwdLink } = attributes;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return (
</span><span class="cx" style="display: block; padding: 0 10px"> <Fragment>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -42,6 +43,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> setAttributes( { title: text } );
</span><span class="cx" style="display: block; padding: 0 10px"> } }
</span><span class="cx" style="display: block; padding: 0 10px"> />
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <ToggleControl
+ label={ __( 'Include the link to reset the user password', 'buddypress' ) }
+ checked={ !! forgotPwdLink }
+ onChange={ () => {
+ setAttributes( { forgotPwdLink: ! forgotPwdLink } );
+ } }
+ />
</ins><span class="cx" style="display: block; padding: 0 10px"> </PanelBody>
</span><span class="cx" style="display: block; padding: 0 10px"> </InspectorControls>
</span><span class="cx" style="display: block; padding: 0 10px"> <Disabled>
</span></span></pre></div>
<a id="trunksrcjsbpcorejsblocksloginformjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/js/bp-core/js/blocks/login-form.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/js/bp-core/js/blocks/login-form.js 2021-09-18 12:59:21 UTC (rev 13110)
+++ trunk/src/js/bp-core/js/blocks/login-form.js 2021-09-19 13:02:18 UTC (rev 13111)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -30,6 +30,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> type: 'string',
</span><span class="cx" style="display: block; padding: 0 10px"> default: '',
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ forgotPwdLink: {
+ type: 'boolean',
+ default: false,
+ },
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> edit: editLoginForm,
</span><span class="cx" style="display: block; padding: 0 10px"> transforms: transforms,
</span></span></pre>
</div>
</div>
</body>
</html>