Uname: Linux webm016.cluster127.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 7.4.33 [ PHP INFO ] PHP os: Linux
Server Ip: 54.36.31.145
Your Ip: 216.73.216.182
User: homesquasz (91404) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : TaskElement.js
import { __ } from '@wordpress/i18n';
import {
    Component,
} from '@wordpress/element';
import Icon from '../utils/Icon'

class TaskElement extends Component {
    constructor() {
        super( ...arguments);
    }

    handleClick(){
        this.props.highLightField(this.props.notice.output.highlight_field_id);
    }

    componentDidMount() {
        this.handleClick = this.handleClick.bind(this);
    }

    render(){
        let notice = this.props.notice;
        let premium = notice.output.icon==='premium';
        //treat links to rsssl.com and internal links different.
        let urlIsExternal = notice.output.url && notice.output.url.indexOf('really-simple-ssl.com') !== -1;
        return(
            <div className="rsssl-task-element">
                <span className={'rsssl-task-status rsssl-' + notice.output.icon}>{ notice.output.label }</span>
                <p className="rsssl-task-message" dangerouslySetInnerHTML={{__html: notice.output.msg}}></p>
                {urlIsExternal && notice.output.url && <a target="_blank" href={notice.output.url}>{__("More info", "really-simple-ssl")}</a> }
                {!premium && !urlIsExternal && notice.output.url && <a className="rsssl-task-enable button button-secondary" href={notice.output.url}>{__("Fix", "really-simple-ssl")}</a> }
                {!premium && notice.output.highlight_field_id && <span className="rsssl-task-enable button button-secondary" onClick={this.handleClick}>{__("Fix", "really-simple-ssl")}</span> }
                {notice.output.plusone && <span className='rsssl-plusone'>1</span>}
                {notice.output.dismissible && notice.output.status!=='completed' &&
                    <div className="rsssl-task-dismiss">
                      <button type='button' data-id={notice.id} onClick={this.props.onCloseTaskHandler}>
                             <Icon name='times' />
                      </button>
                    </div>
                }
            </div>
        );
    }
}

export default TaskElement;
© 2026 GrazzMean