forked from farinspace/wpalchemy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dimas Begunoff
committed
Sep 4, 2010
1 parent
797d9c2
commit 6ca5533
Showing
4 changed files
with
175 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Licensed under The MIT License | ||
http://en.wikipedia.org/wiki/MIT_License | ||
|
||
Copyright (c) 2009 Dimas Begunoff, http://www.farinspace.com | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<div class="my_meta_control"> | ||
|
||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. | ||
Cras orci lorem, bibendum in pharetra ac, luctus ut mauris.</p> | ||
|
||
|
||
<label>Single Checkbox</label><br/> | ||
|
||
<?php $mb->the_field('cb_single'); ?> | ||
<input type="checkbox" name="<?php $mb->the_name(); ?>" value="abc"<?php $mb->the_checkbox_state('abc'); ?>/> abc<br/> | ||
|
||
|
||
<label>Checkbox Group</label><br/> | ||
|
||
<?php $clients = array('a','b','c'); ?> | ||
|
||
<?php while ($mb->have_fields('cb_ex',count($clients))): ?> | ||
|
||
<?php $client = $clients[$mb->get_the_index()]; ?> | ||
|
||
<input type="checkbox" name="<?php $mb->the_name(); ?>" value="<?php echo $client; ?>"<?php $mb->the_checkbox_state($client); ?>/> <?php echo $client; ?><br/> | ||
|
||
<?php endwhile; ?> | ||
|
||
|
||
<label>Checkbox Group 2</label><br/> | ||
|
||
<?php $clients = array('a','b','c'); ?> | ||
|
||
<?php foreach ($clients as $i => $client): ?> | ||
<?php $mb->the_field('cb_ex2'); ?> | ||
<input type="checkbox" name="<?php $mb->the_name(); ?>" value="<?php echo $client; ?>"<?php $mb->the_checkbox_state($client); ?>/> <?php echo $client; ?><br/> | ||
<?php endforeach; ?> | ||
|
||
|
||
<label>Repeating Field Checkbox</label><br/> | ||
|
||
<?php while($mb->have_fields_and_multi('cb_ex3')): ?> | ||
<?php $mb->the_group_open(); ?> | ||
|
||
<a href="#" class="dodelete button" style="float:right;">Remove</a> | ||
|
||
<?php $mb->the_field('cb_ex3_name'); ?> | ||
<input type="text" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>"/> | ||
|
||
<?php $mb->the_field('cb_ex3_cb'); ?> | ||
<input type="checkbox" name="<?php $mb->the_name(); ?>" value="xyz"<?php $mb->the_checkbox_state('xyz'); ?>/> xyz<br/> | ||
|
||
<?php $mb->the_group_close(); ?> | ||
<?php endwhile; ?> | ||
|
||
<p><a href="#" class="docopy-cb_ex3 button">Add</a></p> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<div class="my_meta_control"> | ||
|
||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. | ||
Cras orci lorem, bibendum in pharetra ac, luctus ut mauris.</p> | ||
|
||
|
||
<label>Single Checkbox</label><br/> | ||
|
||
<?php $mb->the_field('r_single'); ?> | ||
<input type="radio" name="<?php $mb->the_name(); ?>" value="abc"<?php $mb->the_radio_state('abc'); ?>/> abc<br/> | ||
|
||
|
||
<label>Checkbox Group</label><br/> | ||
|
||
<?php $clients = array('a','b','c'); ?> | ||
|
||
<?php foreach ($clients as $i => $client): ?> | ||
<?php $mb->the_field('r_ex2'); ?> | ||
<input type="radio" name="<?php $mb->the_name(); ?>" value="<?php echo $client; ?>"<?php $mb->the_radio_state($client); ?>/> <?php echo $client; ?><br/> | ||
<?php endforeach; ?> | ||
|
||
|
||
<label>Repeating Field Checkbox</label><br/> | ||
|
||
<?php while($mb->have_fields_and_multi('r_ex3')): ?> | ||
<?php $mb->the_group_open(); ?> | ||
|
||
<?php $mb->the_field('r_ex3_name'); ?> | ||
<input type="text" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>"/> | ||
|
||
<?php $mb->the_field('r_ex3_r'); ?> | ||
<input type="radio" name="<?php $mb->the_name(); ?>" value="x"<?php $mb->the_radio_state('x'); ?>/> x<br/> | ||
<input type="radio" name="<?php $mb->the_name(); ?>" value="y"<?php $mb->the_radio_state('y'); ?>/> y<br/> | ||
<input type="radio" name="<?php $mb->the_name(); ?>" value="z"<?php $mb->the_radio_state('z'); ?>/> z<br/> | ||
|
||
<?php $mb->the_group_close(); ?> | ||
<?php endwhile; ?> | ||
|
||
<p><a href="#" class="docopy-r_ex3 button">Add Document</a></p> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<div class="my_meta_control"> | ||
|
||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras orci lorem, bibendum in pharetra ac, luctus ut mauris.</p> | ||
|
||
<label>Select Single</label><br/> | ||
|
||
<?php $mb->the_field('s_single'); ?> | ||
<select name="<?php $mb->the_name(); ?>"> | ||
<option value="">Select...</option> | ||
<option value="a"<?php $mb->the_select_state('a'); ?>>a</option> | ||
<option value="b"<?php $mb->the_select_state('b'); ?>>b</option> | ||
<option value="c"<?php $mb->the_select_state('c'); ?>>c</option> | ||
</select> | ||
|
||
<label>Select Single 2</label><br/> | ||
|
||
<?php $mb->the_field('s_single2'); ?> | ||
<select name="<?php $mb->the_name(); ?>"> | ||
<option value="">Select...</option> | ||
<option value="x"<?php $mb->the_select_state('x'); ?>>x</option> | ||
<option value="y"<?php $mb->the_select_state('y'); ?>>y</option> | ||
<option value="z"<?php $mb->the_select_state('z'); ?>>z</option> | ||
</select> | ||
|
||
<label>Select Single 3 (select multiple)</label><br/> | ||
|
||
<?php $mb->the_field('s_single3', WPALCHEMY_FIELD_HINT_SELECT_MULTIPLE); ?> | ||
<select name="<?php $mb->the_name(); ?>" multiple="multiple" size="5" style="height:75px;"> | ||
<option value="e"<?php $mb->the_select_state('e'); ?>>e</option> | ||
<option value="f"<?php $mb->the_select_state('f'); ?>>f</option> | ||
<option value="g"<?php $mb->the_select_state('g'); ?>>g</option> | ||
<option value="h"<?php $mb->the_select_state('h'); ?>>h</option> | ||
<option value="i"<?php $mb->the_select_state('i'); ?>>i</option> | ||
<option value="j"<?php $mb->the_select_state('j'); ?>>j</option> | ||
</select> | ||
|
||
<label>Select Repeating Group</label><br/> | ||
|
||
<?php while($mb->have_fields_and_multi('s_group')): ?> | ||
<?php $mb->the_group_open(); ?> | ||
|
||
<?php $mb->the_field('i_field'); ?> | ||
<input type="text" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>"/> | ||
|
||
<?php $mb->the_field('s_field'); ?> | ||
<select name="<?php $mb->the_name(); ?>"> | ||
<option value="">Select...</option> | ||
<option value="q"<?php $mb->the_select_state('q'); ?>>q</option> | ||
<option value="r"<?php $mb->the_select_state('r'); ?>>r</option> | ||
<option value="s"<?php $mb->the_select_state('s'); ?>>s</option> | ||
</select> | ||
|
||
<?php $mb->the_group_close(); ?> | ||
<?php endwhile; ?> | ||
|
||
<p><a href="#" class="docopy-s_group button">Add</a></p> | ||
|
||
</div> |