<commit_before>import React from 'react';
import Screen from '../../core/screen';
import ResetPasswordPane from './reset_password_pane';
import { authWithUsername } from './index';
import { cancelResetPassword, resetPassword } from './actions';

const Component = ({model, t}) => {
  const headerText = t("forgotPasswordInstructions") || null;
  const header = headerText && <p>{headerText}</p>;

  return (
    <ResetPasswordPane
      emailInputPlaceholder={t("emailInputPlaceholder", {__textOnly: true})}
      header={header}
      lock={model}
    />
  );
};

export default class ResetPassword extends Screen {

  constructor() {
    super("forgotPassword");
  }

  backHandler(m) {
    return cancelResetPassword;
  }

  submitHandler() {
    return resetPassword;
  }

  render() {
    return Component;
  }

}
<commit_msg>Don't cancel pwd reset if login is not allowed<commit_after>import React from 'react';
import Screen from '../../core/screen';
import ResetPasswordPane from './reset_password_pane';
import { authWithUsername, hasScreen } from './index';
import { cancelResetPassword, resetPassword } from './actions';

const Component = ({model, t}) => {
  const headerText = t("forgotPasswordInstructions") || null;
  const header = headerText && <p>{headerText}</p>;

  return (
    <ResetPasswordPane
      emailInputPlaceholder={t("emailInputPlaceholder", {__textOnly: true})}
      header={header}
      lock={model}
    />
  );
};

export default class ResetPassword extends Screen {

  constructor() {
    super("forgotPassword");
  }

  backHandler(m) {
    return hasScreen(m, "login") ? cancelResetPassword : undefined;
  }

  submitHandler() {
    return resetPassword;
  }

  render() {
    return Component;
  }

}

{'fraction_non_alphanumeric': 0.13719862227324914, 'fraction_numerical': 0.0, 'mean_word_length': 3.8823529411764706, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4928091', 'n_tokens_mistral': 504, 'n_tokens_neox': 494, 'n_words': 126}