@@ 488-536 (lines=49) @@ | ||
485 | /** |
|
486 | * The Underscore template for the complex field group. |
|
487 | */ |
|
488 | public function template_group() { |
|
489 | ?> |
|
490 | <div id="carbon-{{{ complex_name }}}-complex-container" class="carbon-row carbon-group-row" data-group-id="{{ id }}"> |
|
491 | <input type="hidden" name="{{{ complex_name + '[' + index + ']' }}}[group]" value="{{ name }}" /> |
|
492 | ||
493 | <div class="carbon-drag-handle"> |
|
494 | <span class="group-number">{{{ order + 1 }}}</span><span class="group-name">{{{ label_template || label }}}</span> |
|
495 | </div> |
|
496 | ||
497 | <div class="carbon-group-actions carbon-group-actions-{{ layout }}"> |
|
498 | <a class="carbon-btn-duplicate dashicons-before dashicons-admin-page" href="#" title="<?php esc_attr_e( 'Clone', 'carbon_fields' ); ?>"> |
|
499 | <?php _e( 'Clone', 'carbon_fields' ); ?> |
|
500 | </a> |
|
501 | ||
502 | <a class="carbon-btn-remove dashicons-before dashicons-trash" href="#" title="<?php esc_attr_e( 'Remove', 'carbon_fields' ); ?>"> |
|
503 | <?php _e( 'Remove', 'carbon_fields' ); ?> |
|
504 | </a> |
|
505 | ||
506 | <a class="carbon-btn-collapse dashicons-before dashicons-arrow-up" href="#" title="<?php esc_attr_e( 'Collapse/Expand', 'carbon_fields' ); ?>"> |
|
507 | <?php _e( 'Collapse/Expand', 'carbon_fields' ); ?> |
|
508 | </a> |
|
509 | </div> |
|
510 | ||
511 | <div class="fields-container"> |
|
512 | <# _.each(fields, function(field) { #> |
|
513 | <div class="carbon-row carbon-subrow subrow-{{{ field.type }}} {{{ field.classes.join(' ') }}}"> |
|
514 | <label for="{{{ complex_id + '-' + field.id + '-' + index }}}"> |
|
515 | {{ field.label }} |
|
516 | ||
517 | <# if (field.required) { #> |
|
518 | <span class="carbon-required">*</span> |
|
519 | <# } #> |
|
520 | </label> |
|
521 | ||
522 | <div class="field-holder {{{ complex_id + '-' + field.id + '-' + index }}}"></div> |
|
523 | ||
524 | <# if (field.help_text) { #> |
|
525 | <em class="help-text"> |
|
526 | {{{ field.help_text }}} |
|
527 | </em> |
|
528 | <# } #> |
|
529 | ||
530 | <em class="carbon-error"></em> |
|
531 | </div> |
|
532 | <# }) #> |
|
533 | </div> |
|
534 | </div> |
|
535 | <?php |
|
536 | } |
|
537 | ||
538 | /** |
|
539 | * The Underscore template for the group item tab. |
@@ 497-545 (lines=49) @@ | ||
494 | /** |
|
495 | * The Underscore template for the complex field group. |
|
496 | */ |
|
497 | public function template_group() { |
|
498 | ?> |
|
499 | <div id="carbon-{{{ complex_name }}}-complex-container" class="carbon-row carbon-group-row" data-group-id="{{ id }}"> |
|
500 | <input type="hidden" name="{{{ complex_name + '[' + index + ']' }}}[group]" value="{{ name }}" /> |
|
501 | ||
502 | <div class="carbon-drag-handle"> |
|
503 | <span class="group-number">{{{ order + 1 }}}</span><span class="group-name">{{{ label_template || label }}}</span> |
|
504 | </div> |
|
505 | ||
506 | <div class="carbon-group-actions carbon-group-actions-{{ layout }}"> |
|
507 | <a class="carbon-btn-duplicate dashicons-before dashicons-admin-page" href="#" title="<?php esc_attr_e( 'Clone', 'carbon_fields' ); ?>"> |
|
508 | <?php _e( 'Clone', 'carbon_fields' ); ?> |
|
509 | </a> |
|
510 | ||
511 | <a class="carbon-btn-remove dashicons-before dashicons-trash" href="#" title="<?php esc_attr_e( 'Remove', 'carbon_fields' ); ?>"> |
|
512 | <?php _e( 'Remove', 'carbon_fields' ); ?> |
|
513 | </a> |
|
514 | ||
515 | <a class="carbon-btn-collapse dashicons-before dashicons-arrow-up" href="#" title="<?php esc_attr_e( 'Collapse/Expand', 'carbon_fields' ); ?>"> |
|
516 | <?php _e( 'Collapse/Expand', 'carbon_fields' ); ?> |
|
517 | </a> |
|
518 | </div> |
|
519 | ||
520 | <div class="fields-container"> |
|
521 | <# _.each(fields, function(field) { #> |
|
522 | <div class="carbon-row carbon-subrow subrow-{{{ field.type }}} {{{ field.classes.join(' ') }}}"> |
|
523 | <label for="{{{ complex_id + '-' + field.id + '-' + index }}}"> |
|
524 | {{ field.label }} |
|
525 | ||
526 | <# if (field.required) { #> |
|
527 | <span class="carbon-required">*</span> |
|
528 | <# } #> |
|
529 | </label> |
|
530 | ||
531 | <div class="field-holder {{{ complex_id + '-' + field.id + '-' + index }}}"></div> |
|
532 | ||
533 | <# if (field.help_text) { #> |
|
534 | <em class="help-text"> |
|
535 | {{{ field.help_text }}} |
|
536 | </em> |
|
537 | <# } #> |
|
538 | ||
539 | <em class="carbon-error"></em> |
|
540 | </div> |
|
541 | <# }) #> |
|
542 | </div> |
|
543 | </div> |
|
544 | <?php |
|
545 | } |
|
546 | ||
547 | /** |
|
548 | * The Underscore template for the group item tab. |