示例#1
0
$form = new IG_Active_Form($model);
$form->open(array("attributes" => array("class" => "form-horizontal")));
?>
    <div class="form-group <?php 
echo $model->has_error("enable_receipt") ? "has-error" : null;
?>
">
        <?php 
$form->label("enable_receipt", array("text" => __("Enable Message Receipt", mmg()->domain), "attributes" => array("class" => "col-lg-2 control-label")));
?>
        <div class="col-lg-10">
            <div class="checkbox">
                <label>
                    <?php 
$form->hidden('enable_receipt', array('value' => 0));
$form->checkbox("enable_receipt", array("attributes" => array("class" => "", "value" => 1)));
?>
                    <?php 
_e("Tick this box to enable email notifications of read messages.", mmg()->domain);
?>
                </label>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
    <div class="form-group <?php 
echo $model->has_error("user_receipt") ? "has-error" : null;
?>
">
        <?php 
$form->label("user_receipt", array("text" => __("Allow the user to disable read message receipts?", mmg()->domain), "attributes" => array("class" => "col-lg-2 control-label")));
示例#2
0
foreach ($roles as $key => $role) {
    ?>
        <?php 
    if (isset($role['capabilities']['upload_files']) && $role['capabilities']['upload_files'] == false || !isset($role['capabilities']['upload_files'])) {
        ?>
            <?php 
        $is = in_array($key, $model->allow_attachment);
        ?>
            <tr>
                <td><?php 
        echo $role['name'];
        ?>
</td>
                <td>
                    <?php 
        $form->checkbox('allow_attachment', array('multiple' => true, 'checked' => $is, 'attributes' => array('value' => $key)));
        ?>
                </td>
            </tr>
        <?php 
    }
    ?>
    <?php 
}
?>
    </tbody>
</table>
<?php 
wp_nonce_field('mm_settings', '_mmnonce');
?>
<button type="submit" class="btn btn-primary"><?php