Esempio n. 1
0
 /**
  * Return list of new milestone select list
  */
 public function updateSelect()
 {
     $group_id = JRequest::getVar('group_id');
     require_once JPATH_ROOT . DS . 'components' . DS . 'com_stream' . DS . 'helpers' . DS . 'milestones.php';
     $html = StreamMilestonesHelper::getSelectList($group_id);
     // Get the HTML code to append
     $data = array();
     $data['html'] = $html;
     header('Content-Type: text/json');
     echo json_encode($data);
     exit;
 }
Esempio n. 2
0
</a></span>
			</li>
		</ul>
	</div>
	
	<div class="stream-post-details">
		<!--
		<input type="text" placeholder="<?php 
echo JText::_('COM_STREAM_DEFAULT_LABEL_WHO_INCHARGE');
?>
" name="person" class="person" autocomplete="off">
		-->
		<input type="text" value="" placeholder="<?php 
echo JText::_('COM_STREAM_DEFAULT_LABEL_DUE');
?>
" name="end_date" class="end-date" autocomplete="off">
		<div class="clear"></div>
	</div>
	
	<div class="stream-post-details-milestone">
		<label><?php 
echo JText::_('COM_STREAM_LABEL_MILESTONE');
?>
:</label>
		<?php 
echo StreamMilestonesHelper::getSelectList($group_id);
?>
	</div>
	
	<input type="hidden" name="type" value="todo"/>
</div>
Esempio n. 3
0
 /**
  * Called during create. Can pass an array to the javascript
  */
 public function onCreate()
 {
     require_once JPATH_ROOT . DS . 'components' . DS . 'com_stream' . DS . 'helpers' . DS . 'milestones.php';
     $milestoneSelect = StreamMilestonesHelper::getSelectList($this->data->group_id);
     $response = array();
     $response['script'] = '$("select[name\\"milestone\\"]").html(' . $milestoneSelect . ');';
     return $response;
 }