Exemplo n.º 1
0
FormHelpers::checkError('message', $errors);
?>
</div>
</div>
<div class="form-field">
    <strong>Phone Number:</strong>
    <div class="descr">Phone number, no dashes (e.g. 1234567890).</div>
    <?php 
FormHelpers::createText('number', $channel->getNumber());
?>
    <div class="error"><?php 
FormHelpers::checkError('number', $errors);
?>
</div>
</div>
<div class="form-field">
    <strong>Carrier:</strong>
    <div class="descr">Mobile carrier.</div>
    <?php 
$options = array();
foreach (array_keys(SmsChannel::$carriers) as $c) {
    $options[] = FormHelpers::getOption($c, $c, $channel->getCarrier() == $c ? 'selected="selected"' : null);
}
FormHelpers::createSelect('carrier', $options);
?>
    <div class="error"><?php 
FormHelpers::checkError('number', $errors);
?>
</div>
</div>
Exemplo n.º 2
0
                        </div>
                        <div class="descr"><?php 
                p($chandle);
                ?>
</div>
                    </div>
                <?php 
            }
        }
        ?>
    <div class="form-field">
    <?php 
        FormHelpers::startForm('GET', '?page=channel', 'name="newchan"');
        FormHelpers::createHidden('page', 'channel');
        FormHelpers::createHidden('contact_id', $contact->getId());
        $options = array();
        foreach ($GLOBALS['channel_types'] as $type) {
            $o = new $type();
            $options[] = FormHelpers::getOption($o->getName(), $type);
        }
        FormHelpers::createSelect('type', $options);
        FormHelpers::createSubmit('Add Notification Channel');
        FormHelpers::endForm();
        ?>
    </div>
    <?php 
    }
    ?>
</div>
<?php 
}