<commit_before>import React from 'react';
import { reduxForm, Field } from 'redux-form';
import { Subheader, Dialog, RaisedButton } from 'material-ui';
import CustomInput from 'components/CustomInput';
import AppMap from 'components/AppMap';
import CustomDatePicker from 'components/CustomDatePicker';
import { functions } from 'containers/layout/appbar/helpers';

class ConferenceInfoForm extends React.Component {
  state = {
    open: true,
  };
  handleClose = () => {
    this.setState({ open: false });
  };
  handleRegister = () => {
    this.setState({ open: false });
    window.location.pathname = '/author-registration';
  };
  render() {
    const actions = [
      <RaisedButton
        label="Register"
        primary={true}
        onClick={this.handleRegister}
      />,
      <RaisedButton
        label="Ask me later"
        onClick={this.handleClose}
        style={{ marginLeft: '10px' }}
      />,
    ];
    const { initialValues } = this.props;
    const roles = localStorage.getItem('roles');
    const isShow = functions.checkRoleAllComponents(roles);
    let today = new Date();
    const registrationDeadline = initialValues.dl_registration;
    const releaseFinalPaperDate = initialValues.dl_release_final_paper;
    return (
      <form className="form conference-info">
        {isShow['paper-registration'] &&
        (today > releaseFinalPaperDate && today <= registrationDeadline) ? (
          <Dialog
            title="Speaker Registration"
            actions={actions}
            modal={false}
            open={this.state.open}
            onRequestClose={this.handleClose}
          >
            Your paper was accepted. Please register to become a speaker of
            {initialValues.title}
          </Dialog>
        ) : (
          ''<commit_msg>fix notification dialog to notify paper registration for author<commit_after>import React from 'react';
import { reduxForm, Field } from 'redux-form';
import { Subheader, Dialog, RaisedButton } from 'material-ui';
import CustomInput from 'components/CustomInput';
import AppMap from 'components/AppMap';
import CustomDatePicker from 'components/CustomDatePicker';
import { functions } from 'containers/layout/appbar/helpers';

class ConferenceInfoForm extends React.Component {
  state = {
    open: true,
  };
  handleClose = () => {
    this.setState({ open: false });
  };
  handleRegister = () => {
    this.setState({ open: false });
    window.location.pathname = '/author-registration';
  };
  render() {
    const actions = [
      <RaisedButton
        label="Register"
        primary={true}
        onClick={this.handleRegister}
      />,
      <RaisedButton
        label="Ask me later"
        onClick={this.handleClose}
        style={{ marginLeft: '10px' }}
      />,
    ];
    const { initialValues } = this.props;
    const roles = localStorage.getItem('roles');
    const isShow = functions.checkRoleAllComponents(roles);
    let today = new Date();
    const registrationDeadline = initialValues.dl_registration;
    const releaseFinalPaperDate = initialValues.dl_release_final_paper;
    return (
      <form className="form conference-info">
        {isShow['paper-registration'] &&
        (today > releaseFinalPaperDate && today <= registrationDeadline) ? (
          <Dialog
            title="Speaker Registration"
            actions={actions}
            modal={false}
            open={this.state.open}
            onRequestClose={this.handleClose}
          >
            Your paper was accepted. Please register to become a speaker of{' '}
            {' ' + initialValues.title}
          </Dialog>
        ) : (
          ''
{'fraction_non_alphanumeric': 0.11689022721051191, 'fraction_numerical': 0.0010949904188338351, 'mean_word_length': 2.7171922685656154, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 19, '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': '977338', 'n_tokens_mistral': 986, 'n_tokens_neox': 975, 'n_words': 230}