| 1 |
<?php |
| 2 |
global $post; |
| 3 |
$cf7_key = $post->post_name; |
| 4 |
?> |
| 5 |
<h2><?php echo esc_html( __cf7sg( 'Form' ) ); ?></h2> |
| 6 |
<div id="top-tags"> |
| 7 |
<?php |
| 8 |
$tag_generator = WPCF7_TagGenerator::get_instance(); |
| 9 |
$tag_generator->print_buttons(); |
| 10 |
?> |
| 11 |
</div> |
| 12 |
<div id="form-editor-tabs"> |
| 13 |
<ul> |
| 14 |
<li><a href="#cf7-editor-grid"><?=__('Grid','cf7-grid-layout')?></a></li> |
| 15 |
<li><a href="#cf7-codemirror"><?=__('Text','cf7-grid-layout')?></a></li> |
| 16 |
</ul> |
| 17 |
<div id="cf7-editor-grid"> |
| 18 |
<div id="grid-form"></div> |
| 19 |
</div> |
| 20 |
<div id="cf7-codemirror"> |
| 21 |
<textarea id="wpcf7-form" class="cf7-sg-hidden codemirror-cf7-update"> |
| 22 |
<?= esc_textarea( $form_post->prop( 'form' ) ); |
| 23 |
/** @since 2.8.3 rename codemirror textarea##wpcf7-form adn initially popullate with form. */?> |
| 24 |
</textarea> |
| 25 |
</div> |
| 26 |
</div> |
| 27 |
<textarea id="wpcf7-form-hidden" name="wpcf7-form" class="hidden large-text code" data-config-field="form.body"><?= esc_textarea( $form_post->prop( 'form' ) );?></textarea> |
| 28 |
<!-- cf7sg - track embeded sub-forms --> |
| 29 |
<input type="hidden" value="" id="cf7sg-embeded-forms" name="cf7sg-embeded-forms" /> |
| 30 |
<input type="hidden" value="" id="cf7sg-tabs-fields" name="cf7sg-tabs-fields" /> |
| 31 |
<input type="hidden" value="" id="cf7sg-table-fields" name="cf7sg-table-fields" /> |
| 32 |
<input type="hidden" value="" id="cf7sg-toggle-fields" name="cf7sg-toggle-fields" /> |
| 33 |
<?php |
| 34 |
$tag_generator = WPCF7_TagGenerator::get_instance(); |
| 35 |
$tag_generator->print_buttons(); |
| 36 |
?> |
| 37 |
<div id="grid-row"> |
| 38 |
<div class="container"> |
| 39 |
<div class="row"> |
| 40 |
<div class="columns full"></div> |
| 41 |
<div class="row-controls"> |
| 42 |
<span class="dashicons dashicons-edit row-control"></span> |
| 43 |
<span class="dashicons dashicons-no-alt row-control"></span> |
| 44 |
<span class="dashicons dashicons-move row-control"></span> |
| 45 |
<span class="dashicons dashicons-plus row-control"></span> |
| 46 |
<span class="dashicons dashicons-trash row-control"></span> |
| 47 |
<div class="grid-controls"> |
| 48 |
<label class="collapsible-row-label unique-mod"> |
| 49 |
<?=__('Row collapsible','cf7-grid-layout')?> |
| 50 |
<input type="checkbox" class="collapsible-row" /> |
| 51 |
</label> |
| 52 |
<label class="cf7-sg-hidden table-row-label unique-mod"> |
| 53 |
<?=__('Row table input','cf7-grid-layout')?> |
| 54 |
<input type="checkbox" class="table-row" /> |
| 55 |
</label> |
| 56 |
<label class="table-row-button"> |
| 57 |
<?=__('Button label','cf7-grid-layout')?> |
| 58 |
<input type="text" value="<?= __('Add Row','cf7-grid-layout')?>"/> |
| 59 |
</label> |
| 60 |
<label class="cf7-sg-hidden footer-row-label unique-mod"> |
| 61 |
<?=__('Row table footer','cf7-grid-layout')?> |
| 62 |
<input type="checkbox" class="footer-row" /> |
| 63 |
</label> |
| 64 |
<label class="cf7-sg-hidden tabs-row-label unique-mod"> |
| 65 |
<?=__('Tabbed section','cf7-grid-layout')?> |
| 66 |
<input type="checkbox" class="tabs-row" /> |
| 67 |
</label> |
| 68 |
</div> |
| 69 |
</div> |
| 70 |
</div> |
| 71 |
</div> |
| 72 |
</div> |
| 73 |
<div id="grid-cf7-forms"> |
| 74 |
<div class="cf7sg-external-form" data-form=""> |
| 75 |
<div class="form-controls"> |
| 76 |
<select class="form-select"> |
| 77 |
<option value=""><?=__('Select contact form 7','cf7-grid-layout')?></option> |
| 78 |
<?php |
| 79 |
$cf7_forms = get_posts(array( |
| 80 |
'post_type' => 'wpcf7_contact_form', |
| 81 |
'post_status'=> 'publish', |
| 82 |
'posts_per_page' => -1, |
| 83 |
'post__not_in' => array($form_post->id()) |
| 84 |
)); |
| 85 |
if(!empty($cf7_forms)): |
| 86 |
foreach($cf7_forms as $cf7_form): |
| 87 |
?> |
| 88 |
<option value="<?php echo $cf7_form->post_name ?>"><?php echo $cf7_form->post_title ?></option> |
| 89 |
<?php endforeach; |
| 90 |
wp_reset_postdata(); |
| 91 |
endif; |
| 92 |
?> |
| 93 |
</select> |
| 94 |
<div class="row-controls"> |
| 95 |
<span class="dashicons dashicons-move form-control"></span> |
| 96 |
<span class="dashicons dashicons-plus form-control"></span> |
| 97 |
<span class="dashicons dashicons-trash form-control"></span> |
| 98 |
</div> |
| 99 |
</div> |
| 100 |
<div class="cf7sg-external-form-content"></div> |
| 101 |
</div> |
| 102 |
</div> |
| 103 |
<div id="grid-collapsible"> |
| 104 |
<div class="cf7sg-collapsible-title"><label><?=__('Section title','cf7-grid-layout')?> <input type="text" /><input type="hidden" /><input type="checkbox" /><span><?=__('toggled','cf7-grid-layout')?></span></label></div> |
| 105 |
</div> |
| 106 |
<div id="grid-collapsible-with-toggle"> |
| 107 |
<div class="toggle toggle-light" data-on="Yes" data-off="No"></div> |
| 108 |
</div> |
| 109 |
<div id="grid-tabs"> |
| 110 |
<ul class="cf7-sg-tabs-list"> |
| 111 |
<li><a href="" class="cf7-sg-hidden"></a><label><?=__('Tab label','cf7-grid-layout')?><input type="text" /></label></li> |
| 112 |
</ul> |
| 113 |
</div> |
| 114 |
<div id="grid-helper"> |
| 115 |
<span class="dashicons dashicons-no-alt"></span> |
| 116 |
<span class="copy-helper"><?=__('Click to copy!','cf7-grid-layout')?></span> |
| 117 |
<p><?=__('Click-to-copy & paste in your <em>functions.php</em> file.','cf7-grid-layout')?></p> |
| 118 |
<ul class="cf7sg-helper-list"></ul> |
| 119 |
</div> |
| 120 |
<div id="grid-js-helper"> |
| 121 |
<span class="dashicons dashicons-no-alt"></span> |
| 122 |
<span class="copy-helper"><?=__('Click to copy!','cf7-grid-layout')?></span> |
| 123 |
<p class="js-help"><?= sprintf(__('Click-to-copy & paste in<br/><em><theme folder>/js/%s.js</em> file.','cf7-grid-layout'), $cf7_key);?></p> |
| 124 |
<ul class="cf7sg-helper-list"></ul> |
| 125 |
</div> |
| 126 |
<div id="grid-col"> |
| 127 |
<div class="grid-column"> |
| 128 |
<span class="dashicons dashicons-edit column-control"></span> |
| 129 |
<span class="dashicons dashicons-no-alt column-control"></span> |
| 130 |
<span class="dashicons dashicons-plus column-control"></span> |
| 131 |
<span class="dashicons php-icon column-control" style="display:none;"></span> |
| 132 |
<span class="js-icon column-control" style="display:none;"></span> |
| 133 |
<span class="dashicons dashicons-trash column-control"></span> |
| 134 |
<span class="dashicons dashicons-move column-control"></span> |
| 135 |
<span class="icon-code column-control"></span> |
| 136 |
<div class="grid-controls"> |
| 137 |
<?=__('Column offset:','cf7-grid-layout')?><br /> |
| 138 |
<select class="column-offset select2 column-setting"> |
| 139 |
<option value="" selected><?=__('no offset','cf7-grid-layout')?></option> |
| 140 |
<option value="offset-one"><?=__('one (1/12<sup>th</sup>)','cf7-grid-layout')?></option> |
| 141 |
<option value="offset-two"><?=__('two (1/6<sup>th</sup>)','cf7-grid-layout')?></option> |
| 142 |
<option value="offset-three"><?=__('three (1/4<sup>th</sup>)','cf7-grid-layout')?></option> |
| 143 |
<option value="offset-four"><?=__('four (1/3<sup>rd</sup>)','cf7-grid-layout')?></option> |
| 144 |
<option value="offset-five"><?=__('five (5/12<sup>ths</sup>)','cf7-grid-layout')?></option> |
| 145 |
<option value="offset-six"><?=__('half','cf7-grid-layout')?></option> |
| 146 |
<option value="offset-seven"><?=__('seven (7/12<sup>ths</sup>)','cf7-grid-layout')?></option> |
| 147 |
<option value="offset-eight"><?=__('eight (2/3<sup>rds</sup>)','cf7-grid-layout')?></option> |
| 148 |
<option value="offset-nine"><?=__('nine (3/4<sup>ths</sup>)','cf7-grid-layout')?></option> |
| 149 |
<option value="offset-ten"><?=__('ten (5/6<sup>ths</sup>)','cf7-grid-layout')?></option> |
| 150 |
<option value="offset-eleven"><?=__('eleven (11/12<sup>ths</sup>)','cf7-grid-layout')?></option> |
| 151 |
</select> |
| 152 |
<?=__('Column size:','cf7-grid-layout')?><br /> |
| 153 |
<select class="column-size select2 column-setting"> |
| 154 |
<option value="one"><?=__('one (1/12<sup>th</sup>)','cf7-grid-layout')?></option> |
| 155 |
<option value="two"><?=__('two (1/6<sup>th</sup>)','cf7-grid-layout')?></option> |
| 156 |
<option value="one-fourth"><?=__('three (1/4<sup>th</sup>)','cf7-grid-layout')?></option> |
| 157 |
<option value="one-third"><?=__('four (1/3<sup>rd</sup>)','cf7-grid-layout')?></option> |
| 158 |
<option value="five"><?=__('five (5/12<sup>ths</sup>)','cf7-grid-layout')?></option> |
| 159 |
<option value="one-half"><?=__('half width','cf7-grid-layout')?></option> |
| 160 |
<option value="seven"><?=__('seven (7/12<sup>ths</sup>)','cf7-grid-layout')?></option> |
| 161 |
<option value="two-thirds"><?=__('eight (2/3<sup>rds</sup>)','cf7-grid-layout')?></option> |
| 162 |
<option value="nine"><?=__('nine (3/4<sup>ths</sup>)','cf7-grid-layout')?></option> |
| 163 |
<option value="ten"><?=__('ten (5/6<sup>ths</sup>)','cf7-grid-layout')?></option> |
| 164 |
<option value="eleven"><?=__('eleven (11/12<sup>ths</sup>)','cf7-grid-layout')?></option> |
| 165 |
<option value="full" selected><?=__('full wifth','cf7-grid-layout')?></option> |
| 166 |
</select> |
| 167 |
<a id="new-row" class="button make-grid" href="javascript:void(0);"><?= __('Make grid', 'cf7-grid-layout');?></a> |
| 168 |
<a class="button external-form" href="javascript:void(0);"><?= __('Insert form', 'cf7-grid-layout');?></a> |
| 169 |
</div> |
| 170 |
<div class="cf7-field-label cf7-field-inner"> |
| 171 |
<p class="content"><?=__('Field label','cf7-grid-layout')?></p> |
| 172 |
<input type="text" placeholder="<?=__('Field label','cf7-grid-layout')?>"/> |
| 173 |
<span class="dashicons dashicons-no-alt field-control"></span> |
| 174 |
</div> |
| 175 |
<div class="cf7-field-type cf7-field-inner"> |
| 176 |
<p class="content"><?=__('[select a field]','cf7-grid-layout')?></p> |
| 177 |
<textarea placeholder="<?=__('select a field','cf7-grid-layout')?>"></textarea> |
| 178 |
<span class="dashicons dashicons-no-alt field-control"></span> |
| 179 |
</div> |
| 180 |
<div class="cf7-field-tip cf7-field-inner"> |
| 181 |
<p class="content"><?=__('describe your field','cf7-grid-layout')?></p> |
| 182 |
<input type="text" placeholder="<?=__('describe your field here','cf7-grid-layout')?>" /> |
| 183 |
<span class="dashicons dashicons-no-alt field-control"></span> |
| 184 |
</div> |
| 185 |
<textarea class="grid-input"></textarea> |
| 186 |
</div> |
| 187 |
</div> |
| 188 |
<?php |
| 189 |
|