File tree Expand file tree Collapse file tree 4 files changed +29
-19
lines changed Expand file tree Collapse file tree 4 files changed +29
-19
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,10 @@ export const BlockEdit = (props) => {
255
255
< RichText
256
256
className = "mailchimp-block__sub-header"
257
257
tagName = "h3"
258
- placeholder = { __ ( 'Enter a sub header (optional)' , 'mailchimp' ) }
258
+ placeholder = { __ (
259
+ 'Enter a sub header (optional)' ,
260
+ 'mailchimp' ,
261
+ ) }
259
262
value = { sub_header }
260
263
onChange = { ( sub_header ) => setAttributes ( { sub_header } ) }
261
264
/>
@@ -276,17 +279,17 @@ export const BlockEdit = (props) => {
276
279
template = { template }
277
280
templateLock = "insert"
278
281
/>
279
- { show_required_indicator && (
280
- < div id = "mc-indicates-required" >
281
- { __ ( '* = required field' , 'mailchimp' ) }
282
- </ div >
283
- ) }
284
282
< Disabled >
285
283
< InterestGroups
286
284
listData = { listData }
287
285
visibility = { interest_groups_visibility }
288
286
/>
289
287
</ Disabled >
288
+ { show_required_indicator && (
289
+ < div id = "mc-indicates-required" >
290
+ { __ ( '* = required field' , 'mailchimp' ) }
291
+ </ div >
292
+ ) }
290
293
< div className = "mc_signup_submit" >
291
294
< RichText
292
295
id = "mc_signup_submit"
Original file line number Diff line number Diff line change 20
20
display : block;
21
21
opacity : 0.2 ;
22
22
border : 1px dashed grey;
23
- margin : 8px 0px ;
24
23
}
25
24
26
25
h2 .mailchimp-block__header : has (span : empty ),
@@ -58,9 +57,10 @@ div#mc_subheader:has(h3 span:empty) {
58
57
text-align : center;
59
58
}
60
59
61
- .mc_merge_var {
62
- margin-bottom : 1.0 em ;
60
+ .wp-block-mailchimp-mailchimp-form-field . mc_merge_var {
61
+ margin-bottom : 1 em ;
63
62
}
63
+
64
64
.mc_var_label ,
65
65
.mc_interest_label {
66
66
display : block;
@@ -127,3 +127,7 @@ select.mc_select {
127
127
.mc_email_type {
128
128
padding-left : 4px ;
129
129
}
130
+ # mc-indicates-required {
131
+ width : 100% ;
132
+ margin-top : 1em ;
133
+ }
Original file line number Diff line number Diff line change @@ -162,6 +162,10 @@ function ( $single_list ) {
162
162
.mc_email_type {
163
163
padding-left: 4px;
164
164
}
165
+ #mc-indicates-required {
166
+ width:100%;
167
+ margin-top: 1em;
168
+ }
165
169
</style>
166
170
<?php
167
171
}
@@ -214,15 +218,6 @@ function ( $single_list ) {
214
218
*/
215
219
echo $ content ; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
216
220
217
- // Show an explanation of the * if there's more than one field
218
- if ( $ show_required_indicator ) {
219
- ?>
220
- <div id="mc-indicates-required">
221
- * = <?php esc_html_e ( 'required field ' , 'mailchimp ' ); ?>
222
- </div><!-- /mc-indicates-required -->
223
- <?php
224
- }
225
-
226
221
// Show our Interest groups fields if we have them, and they're set to on
227
222
if ( is_array ( $ igs ) && ! empty ( $ igs ) ) {
228
223
foreach ( $ igs as $ ig ) {
@@ -252,6 +247,14 @@ function ( $single_list ) {
252
247
}
253
248
}
254
249
250
+ // Show an explanation of the * if there's more than one field
251
+ if ( $ show_required_indicator ) {
252
+ ?>
253
+ <div id="mc-indicates-required">
254
+ <?php esc_html_e ( '* = required field ' , 'mailchimp ' ); ?>
255
+ </div><!-- /mc-indicates-required -->
256
+ <?php
257
+ }
255
258
?>
256
259
<div class="mc_signup_submit">
257
260
<input type="submit" name="mc_signup_submit" id="mc_signup_submit" value="<?php echo esc_attr ( $ submit_text ); ?> " class="button" />
Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- * Class responsible for admin side functionalities .
3
+ * Class responsible for handling the form submission for the Mailchimp block .
4
4
*
5
5
* @package Mailchimp
6
6
*/
You can’t perform that action at this time.
0 commit comments