예제 #1
0
    function printUpdateForm()
    {
        ?>
		<form method="post" id="update-note" class="form-horizontal">
			<input type="hidden" name="update_note_submitted" value="1" />
			<div class="control-group">
				<label class="control-label">Comment</label>
				<div class="controls">
					<?php 
        $GLOBALS['system']->includeDBClass('note_comment');
        $comment = new Note_Comment();
        $comment->printFieldInterface('contents');
        ?>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">Status</label>
				<div class="controls">
					<?php 
        $this->printFieldInterface('status');
        ?>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">Assignee</label>
				<div class="controls">
					<?php 
        $this->printFieldInterface('assignee');
        ?>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">Action Date</label>
				<div class="controls">
					<?php 
        echo $this->printFieldInterface('action_date');
        ?>
					<div class="help-inline"><?php 
        echo ents($this->fields['action_date']['note']);
        ?>
</div>
				</div>
			</div>
			<div class="control-group">
				<div class="controls">
					<input type="submit" class="btn" value="Save" />
					<input type="button" value="Cancel" class="btn back" />
				<?php 
        if ($this->canBeDeleted()) {
            ?>
					<input type="submit" name="delete_note" data-confirm="Notes are designed to accumulate as a historical record, and should usually only be deleted to correct a mistake.  Are you sure you want to delete this note?" class="pull-right btn" value="Delete this note" />
					<?php 
        }
        ?>
				</div>
			</div>
		</form>
		<script type="text/javascript">
			setTimeout('showLockExpiryWarning()', <?php 
        echo (strtotime('+' . LOCK_LENGTH, 0) - 60) * 1000;
        ?>
);
			setTimeout('showLockExpiredWarning()', <?php 
        echo strtotime('+' . LOCK_LENGTH, 0) * 1000;
        ?>
);
			/*$(window).load(function() { setTimeout("$('[name=contents]').focus()", 100); });*/
		</script>
		<?php 
    }
예제 #2
0
    function printUpdateForm()
    {
        ?>
		<form method="post" id="update-note" class="form-horizontal"  data-lock-length="<?php 
        echo LOCK_LENGTH;
        ?>
">
			<input type="hidden" name="update_note_submitted" value="1" />
			<div class="control-group">
				<label class="control-label">Comment</label>
				<div class="controls">
					<?php 
        $GLOBALS['system']->includeDBClass('note_comment');
        $comment = new Note_Comment();
        $comment->printFieldInterface('contents');
        ?>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">Status</label>
				<div class="controls">
					<?php 
        $this->printFieldInterface('status');
        ?>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">Assignee</label>
				<div class="controls">
					<?php 
        $this->printFieldInterface('assignee');
        ?>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">Action Date</label>
				<div class="controls">
					<?php 
        echo $this->printFieldInterface('action_date');
        ?>
					<div class="help-inline"><?php 
        echo ents($this->fields['action_date']['note']);
        ?>
</div>
				</div>
			</div>
			<div class="control-group">
				<div class="controls">
					<input type="submit" class="btn" value="Save" />
					<input type="button" value="Cancel" class="btn back" />
				<?php 
        if ($this->canBeDeleted()) {
            ?>
					<input type="submit" name="delete_note" data-confirm="Notes are designed to accumulate as a historical record, and should usually only be deleted to correct a mistake.  Are you sure you want to delete this note?" class="pull-right btn" value="Delete this note" />
					<?php 
        }
        ?>
				</div>
			</div>
		</form>
		<?php 
    }