Guest User

Untitled

a guest
Jan 23rd, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.84 KB | None | 0 0
  1. <?php
  2. /**
  3. * NOTE: The radio buttons which determine a css style in my program are CURRENTLY inside the group.
  4. * I am trying to do this OUTSIDE of the group. If I leave it inside the group, I have to define the settings for each testimonial I have. I want to set it once and
  5. * have it define each instance.
  6. *
  7. */
  8. ?>
  9. <div class="mcms_optinpage">
  10.  
  11.  
  12.  
  13. <?php while( $mb->have_fields_and_multi( 'testimonials' ) ): ?>
  14. <?php $mb->the_group_open(); ?>
  15.  
  16. <div id="mcms_testimonial">
  17. <div id='testimonial' style="border:1px solid #ccc;padding:10px;border-radius:2px; margin-bottom: 20px;">
  18. <label>Choose The Testimonial Background Color</label><br/>
  19.  
  20. <?php $mb->the_field('background'); ?>
  21. <input type="radio" name="<?php $mb->the_name(); ?>" value="testimonialblue"<?php $mb->the_radio_state('testimonialblue'); ?>/><img src="<?php echo WP_PLUGIN_URL. '/mcms/images/testimonialblue.png';?>"/>
  22. <input type="radio" name="<?php $mb->the_name(); ?>" value="testimonialgreen"<?php $mb->the_radio_state('testimonialgreen'); ?>/><img src="<?php echo WP_PLUGIN_URL. '/mcms/images/testimonialgreen.png';?>"/>
  23. <input type="radio" name="<?php $mb->the_name(); ?>" value="testimonialgray"<?php $mb->the_radio_state('testimonialgray'); ?>/><img src="<?php echo WP_PLUGIN_URL. '/mcms/images/testimonialgray.png';?>"/>
  24. <input type="radio" name="<?php $mb->the_name(); ?>" value="testimonialyellow"<?php $mb->the_radio_state('testimonialyellow'); ?>/><img src="<?php echo WP_PLUGIN_URL. '/mcms/images/testimonialyellow.png';?>"/>
  25.  
  26. </div>
  27. </div>
  28.  
  29. <div id="mcms_testimonial">
  30. <div id='testimonial' style="border:1px solid #ccc;padding:10px;border-radius:2px; margin-bottom: 20px;">
  31. <table>
  32. <?php $mb->the_field( 'name' ); ?>
  33. <label>Testimonial Name</label><div class='description'>Enter the name of your testimonial.</div>
  34. <p><input type="text" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>" /></p>
  35.  
  36. <?php $mb->the_field( 'content' ); ?>
  37. <label>The Testimonial</label><div class='description'>Enter the testimonial which your prospect gave you.</div>
  38. <div class="customEditor"><textarea name="<?php $mb->the_name(); ?>"><?php echo wpautop($mb->get_the_value()); ?></textarea></div>
  39.  
  40. <?php $mb->the_field( 'audio' ); ?>
  41. <label>OPTIONIAL Testimonial Audio Button</label><div class='description'>Enter the URL to the mp3 of your testimonial.</div>
  42. <p><input type="text" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>" /></p>
  43. <a style="margin-bottom: 20px;" href="#" class="dodelete button">Delete Testimonial</a>
  44. <p></p>
  45. </table>
  46. </div>
  47. </div>
  48.  
  49. <?php $mb->the_group_close(); ?>
  50.  
  51. <?php endwhile; ?>
  52.  
  53. <p>
  54. <a href="#" class="docopy-testimonials button">Add a New Testimonial</a>
  55. <input type="submit" class="button-primary" name="save"value=" Save Testimonial "/>
  56. </p>
  57.  
  58. </div>
Add Comment
Please, Sign In to add comment