예제 #1
0
    echo __('Visibility');
    ?>
</th>
            <th><?php 
    echo __('Variable');
    ?>
</th>
            <th><?php 
    echo __('Delete');
    ?>
</th>
        </tr>
    </thead>
    <tbody>
    <?php 
    $uform = UserForm::objects()->all();
    $ftypes = FormField::allTypes();
    foreach ($uform[0]->getFields() as $f) {
        if ($f->get('private')) {
            continue;
        }
        ?>
        <tr>
            <td></td>
            <td><?php 
        echo $f->get('label');
        ?>
</td>
            <td><?php 
        $t = FormField::getFieldType($f->get('type'));
        echo __($t[0]);
예제 #2
0
 function addDynamicData($data)
 {
     $entry = $this->addForm(UserForm::objects()->one(), 1, $data);
     // FIXME: For some reason, the second save here is required or the
     //        custom data is not properly saved
     $entry->save();
     return $entry;
 }