export class FileInput extends Component {
onChange = e => {
e.preventDefault();
const { input: { onChange } } = this.props;
onChange(e.target.files[0]);
};
render() {
let {meta: {touched, error}, input: {value}, ...props} = this.props; // достаем value из props.input
return (
<>
<Form.File
custom
{...props.input}
id={props.id}
className={props.className}
label={props.label}
onChange={this.onChange}
type={props.type}
accept={props.accept}
/>
{touched && error && (
<Form.Text className="form__error form__text">
{error}
</Form.Text>
)}
</>
)
}
};
$mail->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
"CACHE_TIME" => "3154000000", // 100 лет
"CACHE_TYPE" => "Y",
$(".delete_review").on('submit', function() {
var th = $(this);
$('#deleteModal').modal();
$(document).off('click', '.delete-review');
$(document).one('click', '.delete-review', function(e) {
$.ajax({
type: "POST",
url: "/admin/reviews/delete_review",
data: th.serialize(),
dataType: "html",
cache: false
}).done(function(response) {
if (response == "deleted") {
location.reload();
}
});
});
return false;
});
var Block = React.createClass({
handleClose: function(e) {
e.stopPropagation();
alert('close');
},
handleClick: function(e) {
alert('click');
},
render: function() {
return (
<div onClick={this.handleClick}>
<span>Foo Bar Baz</span>
<span onClick={this.handleClose}> ×</span>
</div>
);
}
});
e.stopPropagation();
при клике на нужный вам элемент(лайк)$('.slider-for').slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
fade: true,
asNavFor: '.slider-nav'
});
$('.slider-nav').slick({
slidesToShow: 3,
slidesToScroll: 1,
asNavFor: '.slider-for',
dots: true,
centerMode: true,
focusOnSelect: true
});