mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 15:06:06 +00:00
hide forgot password if smtp is not configured
This commit is contained in:
@@ -111,6 +111,10 @@ class Settings extends \Espo\Core\Services\Base
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->getConfig()->get('smtpServer')) {
|
||||
$data->passwordRecoveryEnabled = true;
|
||||
}
|
||||
|
||||
$fieldDefs = $this->getMetadata()->get(['entityDefs', 'Settings', 'fields']);
|
||||
|
||||
foreach ($fieldDefs as $field => $fieldParams) {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<input type="password" name="password" id="field-password" class="form-control" tabindex="2" autocomplete="current-password">
|
||||
</div>
|
||||
<div>
|
||||
<a href="javascript:" class="btn btn-link pull-right" data-action="passwordChangeRequest" tabindex="4">{{translate 'Forgot Password?' scope='User'}}</a>
|
||||
{{#if showForgotPassword}}<a href="javascript:" class="btn btn-link pull-right" data-action="passwordChangeRequest" tabindex="4">{{translate 'Forgot Password?' scope='User'}}</a>{{/if}}
|
||||
<button type="submit" class="btn btn-primary" id="btn-login" tabindex="3">{{translate 'Login' scope='User'}}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -51,7 +51,8 @@ define('views/login', 'view', function (Dep) {
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
logoSrc: this.getLogoSrc()
|
||||
logoSrc: this.getLogoSrc(),
|
||||
showForgotPassword: this.getConfig().get('passwordRecoveryEnabled'),
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user