Ejemplo n.º 1
0
 /**
  * @see SugarView::display()
  */
 public function display()
 {
     global $json;
     $json = getJSONobj();
     $json_config = new json_config();
     if (isset($this->bean->json_id) && !empty($this->bean->json_id)) {
         $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->json_id);
     } else {
         $this->bean->json_id = $this->bean->id;
         $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->id);
     }
     $this->ss->assign('JSON_CONFIG_JAVASCRIPT', $javascript);
     $this->ss->assign('remindersData', Reminder::loadRemindersData('Calls', $this->bean->id));
     $this->ss->assign('remindersDataJson', Reminder::loadRemindersDataJson('Calls', $this->bean->id));
     $this->ss->assign('remindersDefaultValuesDataJson', Reminder::loadRemindersDefaultValuesDataJson());
     $this->ss->assign('remindersDisabled', json_encode(false));
     if ($this->ev->isDuplicate) {
         $this->bean->status = $this->bean->getDefaultStatus();
     }
     //if
     parent::display();
 }
Ejemplo n.º 2
0
 /**
  * Return a list of related reminders for specified event (Calls/Meetings). Call it from DetailViews.
  * @param SugarBean $event a Call or Meeting Bean
  * @return mixed|string|void output of list (html)
  * @throws Exception on json error in Remainders
  */
 public static function getRemindersListView(SugarBean $event)
 {
     global $mod_strings, $app_list_strings;
     $tpl = new Sugar_Smarty();
     $tpl->assign('MOD', $mod_strings);
     $tpl->assign('reminder_time_options', $app_list_strings['reminder_time_options']);
     $tpl->assign('remindersData', Reminder::loadRemindersData($event->module_name, $event->id));
     $tpl->assign('remindersDataJson', Reminder::loadRemindersDataJson($event->module_name, $event->id));
     $tpl->assign('remindersDefaultValuesDataJson', Reminder::loadRemindersDefaultValuesDataJson());
     $tpl->assign('remindersDisabled', json_encode(true));
     return $tpl->fetch('modules/Reminders/tpls/reminders.tpl');
 }