/**
  * Renders attachment control based on Object type
  *
  * @param void
  * @return string
  */
 function renderControl($control_name)
 {
     switch ($this->getRelObjectManager()) {
         case 'Companies':
             return select_company($control_name, $this->getRelObjectId(), array('class' => 'combobox'));
             break;
         case 'Contacts':
             return select_contact($control_name, $this->getRelObjectId(), null, array('class' => 'combobox'));
             break;
         case 'ProjectFiles':
             return select_project_file($control_name, active_project(), $this->getRelObjectId(), null, array('class' => 'combobox'));
             break;
         case 'ProjectMessages':
             return select_message($control_name, active_project(), $this->getRelObjectId(), array('class' => 'combobox'));
             break;
         case 'ProjectMilestones':
             return select_milestone($control_name, active_project(), $this->getRelObjectId(), array('class' => 'combobox'));
             break;
         case 'ProjectTasks':
             break;
         case 'ProjectTaskLists':
             return select_task_list($control_name, active_project(), $this->getRelObjectId(), array('class' => 'combobox'));
             break;
         case 'ProjectTickets':
             return select_ticket($control_name, active_project(), $this->getRelObjectId(), array('class' => 'combobox'));
             break;
         default:
             return '';
             break;
     }
     // switch
 }
Пример #2
0
   <?php echo label_tag(lang('success message'), 'projectFormSuccessMessage',true) ?>
   <?php echo textarea_field('project_form[success_message]', array_var($project_form_data, 'success_message'), array('id' => 'projectFormSuccessMessage', 'class' => 'short')) ?>
 </div>
 
 <div class="formBlock" id="projectFormAction">
   <fieldset>
     <legend><?php echo lang('project form action') ?></legend>
     
     <table class="blank">
       <tr>
         <td><?php echo radio_field('project_form[action]', array_var($project_form_data, 'action') == ProjectForm::ADD_COMMENT_ACTION, array('value' => ProjectForm::ADD_COMMENT_ACTION, 'id' => 'projectFormActionAddComment', 'onclick' => 'App.modules.addProjectForm.formActionClick()')) ?> <?php echo label_tag(lang('project form action add comment'), 'projectFormActionAddComment', false, array('class' => 'checkbox'), '') ?></td>
         <td><?php echo lang('add comment to message short') ?>: <?php echo select_message('project_form[message_id]', active_project(), array_var($project_form_data, 'message_id'), array('id' => 'projectFormActionSelectMessage')) ?></td>
       </tr>
       <tr>
         <td><?php echo radio_field('project_form[action]', array_var($project_form_data, 'action') == ProjectForm::ADD_TASK_ACTION, array('value' => ProjectForm::ADD_TASK_ACTION , 'id' => 'projectFormActionAddTask', 'onclick' => 'App.modules.addProjectForm.formActionClick()')) ?> <?php echo label_tag(lang('project form action add task'), 'projectFormActionAddTask', false, array('class' => 'checkbox'), '') ?></td>
         <td><?php echo lang('add task to list short') ?>: <?php echo select_task_list('project_form[task_list_id]', active_project(), array_var($project_form_data, 'task_list_id'), false, array('id' => 'projectFormActionSelectTaskList')) ?></td>
       </tr>
     </table>
     <script>
       App.modules.addProjectForm.formActionClick();
     </script>
   </fieldset>
 </div>
 
 <div class="formBlock" id="projectFormOptions">
   <fieldset>
     <legend><?php echo lang('options') ?></legend>
     <table class="blank">
       <tr>
         <td><?php echo label_tag(lang('project form enabled')) ?></td>
         <td><?php echo yes_no_widget('project_form[is_enabled]', 'projectFormIsEnabled', array_var($project_form_data, 'is_enabled'), lang('yes'), lang('no')) ?></td>
Пример #3
0
// if
?>

<?php 
tpl_display(get_template_path('form_errors'));
?>

<?php 
if (!$task->isNew()) {
    ?>
  <div>
    <?php 
    echo label_tag(lang('task list'), 'addTaskTaskList', true);
    ?>
    <?php 
    echo select_task_list('task[task_list_id]', active_project(), array_var($task_data, 'task_list_id'), false, array('id' => 'addTaskTaskList'));
    ?>
  </div>
<?php 
}
// if
?>

  <div>
    <?php 
echo label_tag(lang('text'), 'addTaskText', true);
?>
    <?php 
echo textarea_field("task[text]", array_var($task_data, 'text'), array('id' => 'addTaskText', 'class' => 'short'));
?>
  </div>
Пример #4
0
?>
</td>
        </tr>
        <tr>
          <td><?php 
echo radio_field('project_form[action]', array_var($project_form_data, 'action') == ProjectForm::ADD_TASK_ACTION, array('value' => ProjectForm::ADD_TASK_ACTION, 'id' => 'projectFormActionAddTask'));
?>
 <?php 
echo label_tag(lang('project form action add task'), 'projectFormActionAddTask', false, array('class' => 'checkbox'), '');
?>
</td>
          <td><?php 
echo lang('add task to list short');
?>
: <?php 
echo select_task_list('project_form[task_list_id]', active_project(), array_var($project_form_data, 'task_list_id'), false, array('id' => 'projectFormActionSelectTaskList'));
?>
</td>
        </tr>
      </table>
    </fieldset>
  </div>
  
  <div class="formBlock" id="projectFormOptions">
    <fieldset>
      <legend><?php 
echo lang('options');
?>
</legend>
      <table class="blank">
        <tr>