124 lines
2.0 KiB
PHP
124 lines
2.0 KiB
PHP
<?php
|
|
|
|
namespace MailPoet\Form\Templates;
|
|
|
|
class InitialForm implements Template {
|
|
public function getName(): string {
|
|
return '';
|
|
}
|
|
|
|
public function getBody(): array {
|
|
return [
|
|
[
|
|
'id' => 'email',
|
|
'name' => __('Email', 'mailpoet'),
|
|
'type' => 'text',
|
|
'params' => [
|
|
'label' => __('Email', 'mailpoet'),
|
|
'required' => true,
|
|
'label_within' => true,
|
|
],
|
|
'styles' => [
|
|
'full_width' => true,
|
|
],
|
|
],
|
|
[
|
|
'id' => 'submit',
|
|
'name' => __('Submit', 'mailpoet'),
|
|
'type' => 'submit',
|
|
'params' => [
|
|
'label' => __('Subscribe!', 'mailpoet'),
|
|
],
|
|
'styles' => [
|
|
'full_width' => true,
|
|
],
|
|
],
|
|
];
|
|
}
|
|
|
|
public function getSettings(): array {
|
|
return [
|
|
'on_success' => 'message',
|
|
'success_message' => '',
|
|
'segments' => null,
|
|
'segments_selected_by' => 'admin',
|
|
];
|
|
}
|
|
|
|
public function getStyles(): string {
|
|
return <<<EOL
|
|
/* form */
|
|
.mailpoet_form {
|
|
}
|
|
|
|
/* columns */
|
|
.mailpoet_column_with_background {
|
|
padding: 10px;
|
|
}
|
|
/* space between columns */
|
|
.mailpoet_form_column:not(:first-child) {
|
|
margin-left: 20px;
|
|
}
|
|
|
|
/* input wrapper (label + input) */
|
|
.mailpoet_paragraph {
|
|
line-height:20px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
/* labels */
|
|
.mailpoet_segment_label,
|
|
.mailpoet_text_label,
|
|
.mailpoet_textarea_label,
|
|
.mailpoet_select_label,
|
|
.mailpoet_radio_label,
|
|
.mailpoet_checkbox_label,
|
|
.mailpoet_list_label,
|
|
.mailpoet_date_label {
|
|
display:block;
|
|
font-weight: normal;
|
|
}
|
|
|
|
/* inputs */
|
|
.mailpoet_text,
|
|
.mailpoet_textarea,
|
|
.mailpoet_select,
|
|
.mailpoet_date_month,
|
|
.mailpoet_date_day,
|
|
.mailpoet_date_year,
|
|
.mailpoet_date {
|
|
display:block;
|
|
}
|
|
|
|
.mailpoet_text,
|
|
.mailpoet_textarea {
|
|
width: 200px;
|
|
}
|
|
|
|
.mailpoet_checkbox {
|
|
}
|
|
|
|
.mailpoet_submit {
|
|
}
|
|
|
|
.mailpoet_divider {
|
|
}
|
|
|
|
.mailpoet_message {
|
|
}
|
|
|
|
.mailpoet_form_loading {
|
|
width: 30px;
|
|
text-align: center;
|
|
line-height: normal;
|
|
}
|
|
|
|
.mailpoet_form_loading > span {
|
|
width: 5px;
|
|
height: 5px;
|
|
background-color: #5b5b5b;
|
|
}
|
|
EOL;
|
|
}
|
|
}
|