function printForm($prefix = '', $fields = NULL)
 {
     $this->fields['members'] = array();
     // fake field for interface purposes
     parent::printForm($prefix, $fields);
     unset($this->fields['members']);
 }
Exemple #2
0
    function printForm($prefix = '', $fields = NULL)
    {
        include_once 'include/size_detector.class.php';
        if ($GLOBALS['system']->featureEnabled('PHOTOS') && (is_null($fields) || in_array('photo', $fields))) {
            $this->fields['photo'] = array('divider_before' => true);
            // fake field for interface purposes
            if ($this->id && !SizeDetector::isNarrow()) {
                ?>
				<div class="person-photo-container">
					<img src="?call=photo&familyid=<?php 
                echo (int) $this->id;
                ?>
" />
				</div>
				<?php 
            }
        }
        parent::printForm($prefix, $fields);
        unset($this->fields['photo']);
    }
 public function printForm($prefix = '', $fields = NULL)
 {
     $oldFields = $this->fields;
     $this->fields = array();
     foreach ($oldFields as $k => $v) {
         $this->fields[$k] = $v;
         $congs = $GLOBALS['system']->getDBObjectData('congregation', array('!meeting_time' => ''), 'AND');
         $options = array();
         foreach ($congs as $id => $detail) {
             $options[$id] = $detail['name'];
         }
         if ($k == 'categoryid') {
             $this->fields['congregationids'] = array('type' => 'select', 'label' => 'Used By', 'options' => $options, 'order_by' => 'meeting_time', 'allow_empty' => TRUE, 'allow_multiple' => TRUE, 'note' => 'If a component is no longer used by any congregation, unselect all options');
             if (empty($this->id)) {
                 if (!empty($_REQUEST['congregationid'])) {
                     $this->setValue('congregationids', array($_REQUEST['congregationid']));
                 } else {
                     $this->values['congregationids'] = array_keys($congs);
                 }
             }
         }
         if ($k == 'alt_title') {
             $this->fields['tags'] = array();
         }
     }
     parent::printForm($prefix, $fields);
     unset($this->fields['congregationids']);
     unset($this->fields['tags']);
 }
 /**
  * Print the form for CONFIGURING this note template.
  * @see DB_Object::printForm()
  * @param string $prefix
  */
 function printForm($prefix = '')
 {
     $this->fields['fields'] = array();
     parent::printForm();
     unset($this->fields['fields']);
 }
 function printForm($prefix = '', $fields = NULL)
 {
     $this->fields['members'] = array();
     // fake field for interface purposes
     if ($this->id) {
         $url = BASE_URL . 'public/?view=display_roster&roster_view=' . $this->id;
         if (defined('PUBLIC_ROSTER_SECRET') && strlen(PUBLIC_ROSTER_SECRET)) {
             $url .= '&secret=' . PUBLIC_ROSTER_SECRET;
         }
         $this->fields['is_public']['note'] = 'If set to public, this roster will be available via the <a href="' . BASE_URL . '/members/">member portal</a> and to non-logged-in users at <a class="nowrap" href="' . $url . '">' . $url . '</a>';
     }
     parent::printForm($prefix, $fields);
     unset($this->fields['members']);
 }