Ejemplo n.º 1
0
    function printFieldInterface($name, $prefix = '')
    {
        if ($this->id && in_array($name, array('subject', 'details'))) {
            if ($GLOBALS['user_system']->getCurrentUser('id') != $this->values['creator']) {
                $this->printFieldValue($name, $prefix);
                return;
            }
        }
        if ($name == 'status') {
            echo '<div class="note-status">';
        }
        parent::printFieldInterface($name, $prefix);
        if ($name == 'status') {
            echo '</div>';
        }
        if ($name == 'action_date') {
            ?>
			<span class="nowrap smallprint">
			<button style="font-size: 90%" type="button" class="btn btn-mini" onclick="setDateField('<?php 
            echo $prefix;
            ?>
action_date', '<?php 
            echo date('Y-m-d', strtotime('+1 week'));
            ?>
')">1 week from now</button>
			<button style="font-size: 90%" type="button" class="btn btn-mini" onclick="setDateField('<?php 
            echo $prefix;
            ?>
action_date', '<?php 
            echo date('Y-m-d', strtotime('+1 month'));
            ?>
')">1 month from now</button>
			</span >
			<?php 
        }
    }
Ejemplo n.º 2
0
    function printFieldInterface($name, $prefix = '')
    {
        switch ($name) {
            case 'photo':
                ?>
				<input type="file" name="photo" />
				<?php 
                break;
            case 'familyid':
                ?>
				<div class="controls-text">
				<i class="icon-home"></i>
				<?php 
                $this->printFieldValue('familyid');
                ?>
				<br />
				<a href="<?php 
                echo build_url(array('view' => '_edit_family', 'familyid' => $this->values['familyid']));
                ?>
">
				<i class="icon-wrench"></i>Edit family details</a>
				&nbsp;
				<a href="<?php 
                echo build_url(array('view' => '_move_person_to_family', 'personid' => $this->id));
                ?>
">
				<i class="icon-random"></i>Move to different family</a>
				</div>
				<?php 
                break;
            default:
                parent::printFieldInterface($name, $prefix);
        }
    }