protected function getInput() { JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); $params = JComponentHelper::getParams("com_jevents"); $value = (int) $this->value; if ($value == -1) { if (version_compare(JVERSION, '3.0.0', "<")) { $default25 = (string) $this->element["default25"]; if ($default25 != "") { $this->value = $this->default = intval($default25); } } else { if (version_compare(JVERSION, '3.0.0', ">=")) { $default30 = (string) $this->element["default30"]; if ($default30 != "") { $this->value = $this->default = intval($default30); } } } } if (!$params->get("bootstrapchosen", 1)) { $x = 1; } return parent::getInput(); }
protected function getInput() { JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); if (class_exists("DateTimeZone")) { $zones = DateTimeZone::listIdentifiers(); static $options; if (!isset($options)) { $options = array(); $options[] = JHTML::_('select.option', '', '- ' . JText::_('SELECT_TIMEZONE') . ' -'); foreach ($zones as $zone) { if (strpos($zone, "/") === false && strpos($zone, "UTC") === false) { continue; } if (strpos($zone, "Etc") === 0) { continue; } $options[] = JHTML::_('select.option', $zone, $zone); } } return JHTML::_('select.genericlist', $options, $this->name, 'class="inputbox"', 'value', 'text', $this->value, $this->id); } else { /* * Required to avoid a cycle of encoding & * html_entity_decode was used in place of htmlspecialchars_decode because * htmlspecialchars_decode is not compatible with PHP 4 */ $value = htmlspecialchars(html_entity_decode($value, ENT_QUOTES), ENT_QUOTES); return '<input type="text" name="' . $this->name . '" id="' . $this->id . '" value="' . $this->value . '" />'; } }
/** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { ob_start(); $event = $this->form->jevdata[$this->name]["event"]; $eventfield = $this->name == "publish_up" ? "startDate" : "endDate"; $params = JComponentHelper::getParams(JEV_COM_COMPONENT); $minyear = JEVHelper::getMinYear(); $maxyear = JEVHelper::getMaxYear(); $inputdateformat = $params->get("com_editdateformat", "d.m.Y"); static $firsttime; if (!defined($firsttime)) { $document = JFactory::getDocument(); $js = "\neventEditDateFormat='{$inputdateformat}';//Date.defineParser(eventEditDateFormat.replace('d','%d').replace('m','%m').replace('Y','%Y'));"; $document->addScriptDeclaration($js); $firsttime = false; } $cal = JEVHelper::loadCalendar($this->name, $this->name, $event->{$eventfield}(), $minyear, $maxyear, 'var elem =jevjq(this);' . $this->element['onhidestart'], "var elem = jevjq(this);" . $this->element['onchange'], $inputdateformat); echo $cal; ?> <input type="hidden" name="<?php echo $this->name; ?> 2" id="<?php echo $this->name; ?> 2" value="" /> <?php $html = ob_get_clean(); JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); return $html; }
protected function getInput() { $this->value = str_replace('<br />', "\n", strpos($this->value, " ") > 0 ? $this->value : JText::_($this->value)); JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); return parent::getInput(); }
protected function getInput() { JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); $input = parent::getInput(); return $input; }
protected function getInput() { if (!JevJoomlaVersion::isCompatible("3.4")) { return ""; } JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); $layouttype = $this->getAttribute("layouttype"); $target = $this->getAttribute("target"); $csstarget = $this->getAttribute("csstarget"); JHtml::script("https://www.jevents.net/jevlayouts/LatestEvents.js"); $html = "<script>jQuery(document).ready(function (\$){loadJevPreview('{$target}', '{$csstarget}');});</script>"; $id = $this->id; $html .= <<<DROPDOWN <div class="dropdown btn-group" id="{$id}"> <button class="btn btn-default dropdown-toggle" type="button" id="dropdown{$target}" data-toggle="dropdown" aria-expanded="false"> Select Layout <span class="caret"></span> </button> <ul class="dropdown-menu" role="menu" aria-labelledby="dropdown{$target}" id="dropdownUL_{$target}" role="menu"> <li role="presentation"><a role="menuitem" class="dropdownpopover" href="#" data-title="Current Customised Value" data-content="Custom Format String customised by you">Current Value</a></li> </ul> </div> DROPDOWN; return $html; }
protected function getInput() { JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); if ($this->fieldname == "rp_id") { // The active event id field. if (0 == (int) $this->value) { $value = ''; } else { $value = (int) $this->value; } return '<input type="text" id="selectedrepeat" name="' . $this->name . '" value="' . $value . '" />'; } // Load the modal behavior script. JevHtmlBootstrap::modal('a.modal'); $js = "\n\t\tfunction jSelectEvent_" . $this->id . "(link, title, Itemid, evid, rpid) {\n\t\t\t\$('selectedeventtitle').value = title;\n\t\t\t\$('selectedevent').value = evid;\n\t\t\t\$('selectedrepeat').value = rpid;\n\t\t\tSqueezeBox.close();\n\t\t\treturn false;\n\t\t}"; // Add the script to the document head. JFactory::getDocument()->addScriptDeclaration($js); // Setup variables for display. $html = array(); $link = 'index.php?option=com_jevents&task=icalevent.select&tmpl=component&' . JSession::getFormToken() . '=1&nomenu=1&function=jSelectEvent_' . $this->id; // get the repeat id $rpidfield = $this->form->getField("rp_id", "request"); $rp_id = $rpidfield->value; $db = JFactory::getDBO(); $db->setQuery('SELECT det.summary as title' . ' FROM #__jevents_vevdetail as det ' . ' LEFT JOIN #__jevents_repetition as rep ON rep.eventdetail_id = det.evdet_id' . ' WHERE rep.rp_id = ' . (int) $rp_id); $title = $db->loadResult(); echo $db->getErrorMsg(); if ($error = $db->getErrorMsg()) { JError::raiseWarning(500, $error); } if (empty($title)) { $title = JText::_('COM_JEVENTS_FIELD_SELECT_EVENT_LABEL'); } $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); // The current user display field. $html[] = '<div class="fltlft">'; $html[] = ' <input type="text" id="selectedeventtitle" value="' . $title . '" disabled="disabled" size="35" />'; $html[] = '</div>'; // The user select button. $html[] = '<div class="button2-left">'; $html[] = ' <div class="blank">'; $html[] = ' <a class="modal" title="' . JText::_('COM_JEVENTS_CHANGE_EVENT') . '" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 800, y: 450}}">' . JText::_('COM_JEVENTS_CHANGE_EVENT_BUTTON') . '</a>'; $html[] = ' </div>'; $html[] = '</div>'; // The active event id field. if (0 == (int) $this->value) { $value = ''; } else { $value = (int) $this->value; } // class='required' for client side validation $class = ''; if ($this->required) { $class = ' class="required modal-value"'; } $html[] = '<input type="hidden" id="selectedevent" ' . $class . ' name="' . $this->name . '" value="' . $value . '" />'; return implode("\n", $html); }
protected function getInput() { JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); if ($this->fieldname == "rp_id") { // The active event id field. if (0 == (int) $this->value) { $value = ''; } else { $value = (int) $this->value; } return '<input type="hidden" id="selectedrepeat" name="' . $this->name . '" value="' . $value . '" />'; } // Load the modal behavior script. JLoader::register('JevModal', JPATH_LIBRARIES . "/jevents/jevmodal/jevmodal.php"); JevModal::modal("a.selectmodal"); $js = "\n\t\tfunction jSelectEvent_" . $this->id . "(link, title, Itemid, evid, rpid) {\n\t\t\tjQuery('#selectedeventtitle').val( title);\n\t\t\tjQuery('#selectedevent').val( evid);\n\t\t\tjQuery('#selectedrepeat').val( rpid);\n\t\t\tjQuery('#selectEvent').modal('hide');\n\t\t\treturn false;\n\t\t}"; // Add the script to the document head. JFactory::getDocument()->addScriptDeclaration($js); // Setup variables for display. $html = array(); $link = 'index.php?option=com_jevents&task=icalevent.select&tmpl=component&' . JSession::getFormToken() . '=1&nomenu=1&function=jSelectEvent_' . $this->id; // get the repeat id $rpidfield = $this->form->getField("rp_id", "request"); $rp_id = $rpidfield->value; $db = JFactory::getDBO(); $db->setQuery('SELECT det.summary as title' . ' FROM #__jevents_vevdetail as det ' . ' LEFT JOIN #__jevents_repetition as rep ON rep.eventdetail_id = det.evdet_id' . ' WHERE rep.rp_id = ' . (int) $rp_id); $title = $db->loadResult(); echo $db->getErrorMsg(); if ($error = $db->getErrorMsg()) { JError::raiseWarning(500, $error); } if (empty($title)) { $title = JText::_('COM_JEVENTS_FIELD_SELECT_EVENT_LABEL'); } $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); // The current user display field. $html[] = '<div class="fltlft input-append" >'; $html[] = ' <input type="text" id="selectedeventtitle" value="' . $title . '" disabled="disabled" size="50" />'; $link = "javascript:jevModalPopup('selectEvent', '" . $link . "', '" . JText::_("COM_JEVENTS_CHANGE_EVENT_BUTTON", array('jsSafe' => true)) . "'); "; // The user select button. $html[] = ' <a class="selectmodal btn btn-primary" title="' . JText::_('COM_JEVENTS_CHANGE_EVENT') . '" href="' . $link . '" ><span class="icon-list icon-white"></span>' . JText::_('COM_JEVENTS_CHANGE_EVENT_BUTTON') . '</a>'; $html[] = '</div>'; // The active event id field. if (0 == (int) $this->value) { $value = ''; } else { $value = (int) $this->value; } // class='required' for client side validation $class = ''; if ($this->required) { $class = ' class="required modal-value"'; } $html[] = '<input type="hidden" id="selectedevent" ' . $class . ' name="' . $this->name . '" value="' . $value . '" />'; return implode("\n", $html); }
protected function getInput() { if (is_string($this->value)) { $this->value = explode(",", $this->value); } JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); return parent::getInput(); }
/** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); if (isset($this->form->jevdata[$this->name]["users"])) { return $this->form->jevdata[$this->name]["users"]; } else { return ""; } }
/** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { $glist = $this->form->jevdata[$this->name]["glist"]; JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); if ($glist) { return $glist; } return ""; }
protected function getInput() { $style = ' class="jev_none" '; // if not showing copyright show message if (!$this->value) { $style = ' class="jev_block" '; } JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); return parent::getInput() . '<div id="jevcopymsg" ' . $style . '>' . JText::_("Before removing the copyright footer please read this important message at the <a href='https://www.jevents.net/hidecopyright?tmpl=component&template=beez_20' title='get hide copyright code' class='modal' rel='{handler: \"iframe\", size: {x: 650, y: 450}}'>JEvents website</a>.") . '</div>'; }
/** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { $input = parent::getInput(); if (strpos($input, "placeholder") === false) { $placeholder = $this->element['placeholder'] ? ' placeholder="' . htmlspecialchars(JText::_($this->element['placeholder'])) . '"' : ''; $input = str_replace("/>", " {$placeholder} />", $input); } JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); return $input; }
protected function getInput() { JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); if (!defined("JEV_COM_COMPONENT")) { define("JEV_COM_COMPONENT", "com_jevents"); define("JEV_COMPONENT", str_replace("com_", "", JEV_COM_COMPONENT)); } JEVHelper::stylesheet('eventsadmin.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/'); return parent::getInput(); }
/** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { $cfg = JEVConfig::getInstance(); $hideColour = false; if ($cfg->get('com_calForceCatColorEventForm', 0) == 1 && !JFactory::getApplication()->isAdmin()) { $hideColour = true; } else { if ($cfg->get('com_calForceCatColorEventForm', 0) == 2) { $hideColour = true; } else { $hideColour = false; } } if (!$hideColour) { JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); ob_start(); ?> <table id="pick1064797275" style="background-color:<?php echo $this->value . ';color:' . JevMapColor($this->value); ?> ;border:solid 1px black;"> <tr> <td nowrap="nowrap"> <input type="hidden" id="pick1064797275field" name="color" value="<?php echo $this->value; ?> "/> <a id="colorPickButton" href="javascript:void(0)" onclick="document.getElementById('fred').style.visibility='visible';" style="visibility:visible;color:<?php echo JevMapColor($this->value); ?> ;font-weight:bold;"><?php echo JText::_('JEV_COLOR_PICKER'); ?> </a> </td> <td> <div style="position:relative;z-index:9999;"> <iframe id="fred" src="<?php echo JURI::root() . "components/" . JEV_COM_COMPONENT . "/libraries/colours.html?id=fred"; ?> " class="jev_ev_colour_picker_i"></iframe> </div> </td> </tr> </table> <?php return ob_get_clean(); } return ""; }
/** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { if ($this->form->jevdata[$this->name]["repeatId"] == 0) { if (!isset($this->form->jevdata[$this->name]["excats"])) { $this->form->jevdata[$this->name]["excats"] = false; } $input = JEventsHTML::buildCategorySelect($this->value, 'id="catid" ', $this->form->jevdata[$this->name]["dataModel"]->accessibleCategoryList(), $this->form->jevdata[$this->name]["with_unpublished_cat"], true, 0, 'catid', JEV_COM_COMPONENT, $this->form->jevdata[$this->name]["excats"], "ordering", true); } else { $input = ""; } JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); return $input; }
protected function getInput() { JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); // if no value set then default to zero if (intval($this->value) == 0) { $options = (array) $this->getOptions(); foreach ($options as $option) { if ($option->sendEmail) { $this->value = $option->value; break; } } } return parent::getInput(); }
/** * Method to get the field options. * * @return array The field option objects. * @since 1.6 */ public function getInput() { // load core and extra mootools JHTML::_('behavior.framework'); JHtmlBehavior::framework(); JHtmlBehavior::framework(true); // Must load admin language files $lang = JFactory::getLanguage(); $lang->load("com_jevents", JPATH_ADMINISTRATOR); $node = $this->element; $value = $this->value; $name = $this->name; $control_name = $this->type; $help = $node['help']; if (!is_null($help) && version_compare(JVERSION, '1.6.0', ">=")) { if (is_object($help)) { $help = (string) $help; } $help = isset($help) && JString::strlen($help) <= 0 ? null : $help; } if (!is_null($help)) { $parts = explode(",", $value); $helps = explode(",", $help); foreach ($parts as $key => $valuepart) { $help = $helps[$key]; list($helpfile, $varname, $part) = explode("::", $help); $lang = JFactory::getLanguage(); $langtag = $lang->getTag(); if (file_exists(JPATH_COMPONENT_ADMINISTRATOR . '/help/' . $langtag . '/' . $helpfile)) { $jeventHelpPopup = JPATH_COMPONENT_ADMINISTRATOR . '/help/' . $langtag . '/' . $helpfile; } else { $jeventHelpPopup = JPATH_COMPONENT_ADMINISTRATOR . '/help/en-GB/' . $helpfile; } if (!file_exists($jeventHelpPopup)) { return ""; } include $jeventHelpPopup; $help = $this->help(${$varname}, $part); $parts[$key] = JText::_($valuepart) . $help; } $value = implode(", ", $parts); } JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); return "<strong style='color:#993300'>" . JText::_($value) . "</strong>"; }
/** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { $params = JComponentHelper::getParams(JEV_COM_COMPONENT); $showpriority = $params->get("showpriority", 0); JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); // only those who can publish globally can set priority field if ($showpriority && JEVHelper::isEventPublisher(true)) { $list = array(); for ($i = 0; $i < 10; $i++) { $list[] = JHTML::_('select.option', $i, $i, 'val', 'text'); } return JHTML::_('select.genericlist', $list, 'priority', "style='width:50px'", 'val', 'text', $this->value); } else { return ""; } }
protected function getInput() { if (version_compare(JVERSION, "3.0", "lt")) { return "<p style='float:left'>" . JText::_("JEV_JOOMLA_3_ONWARDS") . "</p>"; } JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); $falist = array("fa-adjust" => "", "fa-adn" => "", "fa-align-center" => "", "fa-align-justify" => "", "fa-align-left" => "", "fa-align-right" => "", "fa-ambulance" => "", "fa-anchor" => "", "fa-android" => "", "fa-angle-double-down" => "", "fa-angle-double-left" => "", "fa-angle-double-right" => "", "fa-angle-double-up" => "", "fa-angle-down" => "", "fa-angle-left" => "", "fa-angle-right" => "", "fa-angle-up" => "", "fa-apple" => "", "fa-archive" => "", "fa-arrow-circle-down" => "", "fa-arrow-circle-left" => "", "fa-arrow-circle-o-down" => "", "fa-arrow-circle-o-left" => "", "fa-arrow-circle-o-right" => "", "fa-arrow-circle-o-up" => "", "fa-arrow-circle-right" => "", "fa-arrow-circle-up" => "", "fa-arrow-down" => "", "fa-arrow-left" => "", "fa-arrow-right" => "", "fa-arrow-up" => "", "fa-arrows" => "", "fa-arrows-alt" => "", "fa-arrows-h" => "", "fa-arrows-v" => "", "fa-asterisk" => "", "fa-automobile (alias)" => "", "fa-backward" => "", "fa-ban" => "", "fa-bank (alias)" => "", "fa-bar-chart-o" => "", "fa-barcode" => "", "fa-bars" => "", "fa-beer" => "", "fa-behance" => "", "fa-behance-square" => "", "fa-bell" => "", "fa-bell-o" => "", "fa-bitbucket" => "", "fa-bitbucket-square" => "", "fa-bitcoin (alias)" => "", "fa-bold" => "", "fa-bolt" => "", "fa-bomb" => "", "fa-book" => "", "fa-bookmark" => "", "fa-bookmark-o" => "", "fa-briefcase" => "", "fa-btc" => "", "fa-bug" => "", "fa-building" => "", "fa-building-o" => "", "fa-bullhorn" => "", "fa-bullseye" => "", "fa-cab (alias)" => "", "fa-calendar" => "", "fa-calendar-o" => "", "fa-camera" => "", "fa-camera-retro" => "", "fa-car" => "", "fa-caret-down" => "", "fa-caret-left" => "", "fa-caret-right" => "", "fa-caret-square-o-down" => "", "fa-caret-square-o-left" => "", "fa-caret-square-o-right" => "", "fa-caret-square-o-up" => "", "fa-caret-up" => "", "fa-certificate" => "", "fa-chain (alias)" => "", "fa-chain-broken" => "", "fa-check" => "", "fa-check-circle" => "", "fa-check-circle-o" => "", "fa-check-square" => "", "fa-check-square-o" => "", "fa-chevron-circle-down" => "", "fa-chevron-circle-left" => "", "fa-chevron-circle-right" => "", "fa-chevron-circle-up" => "", "fa-chevron-down" => "", "fa-chevron-left" => "", "fa-chevron-right" => "", "fa-chevron-up" => "", "fa-child" => "", "fa-circle" => "", "fa-circle-o" => "", "fa-circle-o-notch" => "", "fa-circle-thin" => "", "fa-clipboard" => "", "fa-clock-o" => "", "fa-cloud" => "", "fa-cloud-download" => "", "fa-cloud-upload" => "", "fa-cny (alias)" => "", "fa-code" => "", "fa-code-fork" => "", "fa-codepen" => "", "fa-coffee" => "", "fa-cog" => "", "fa-cogs" => "", "fa-columns" => "", "fa-comment" => "", "fa-comment-o" => "", "fa-comments" => "", "fa-comments-o" => "", "fa-compass" => "", "fa-compress" => "", "fa-copy (alias)" => "", "fa-credit-card" => "", "fa-crop" => "", "fa-crosshairs" => "", "fa-css3" => "", "fa-cube" => "", "fa-cubes" => "", "fa-cut (alias)" => "", "fa-cutlery" => "", "fa-dashboard (alias)" => "", "fa-database" => "", "fa-dedent (alias)" => "", "fa-delicious" => "", "fa-desktop" => "", "fa-deviantart" => "", "fa-digg" => "", "fa-dollar (alias)" => "", "fa-dot-circle-o" => "", "fa-download" => "", "fa-dribbble" => "", "fa-dropbox" => "", "fa-drupal" => "", "fa-edit (alias)" => "", "fa-eject" => "", "fa-ellipsis-h" => "", "fa-ellipsis-v" => "", "fa-empire" => "", "fa-envelope" => "", "fa-envelope-o" => "", "fa-envelope-square" => "", "fa-eraser" => "", "fa-eur" => "", "fa-euro (alias)" => "", "fa-exchange" => "", "fa-exclamation" => "", "fa-exclamation-circle" => "", "fa-exclamation-triangle" => "", "fa-expand" => "", "fa-external-link" => "", "fa-external-link-square" => "", "fa-eye" => "", "fa-eye-slash" => "", "fa-facebook" => "", "fa-facebook-square" => "", "fa-fast-backward" => "", "fa-fast-forward" => "", "fa-fax" => "", "fa-female" => "", "fa-fighter-jet" => "", "fa-file" => "", "fa-file-archive-o" => "", "fa-file-audio-o" => "", "fa-file-code-o" => "", "fa-file-excel-o" => "", "fa-file-image-o" => "", "fa-file-movie-o (alias)" => "", "fa-file-o" => "", "fa-file-pdf-o" => "", "fa-file-photo-o (alias)" => "", "fa-file-picture-o (alias)" => "", "fa-file-powerpoint-o" => "", "fa-file-sound-o (alias)" => "", "fa-file-text" => "", "fa-file-text-o" => "", "fa-file-video-o" => "", "fa-file-word-o" => "", "fa-file-zip-o (alias)" => "", "fa-files-o" => "", "fa-film" => "", "fa-filter" => "", "fa-fire" => "", "fa-fire-extinguisher" => "", "fa-flag" => "", "fa-flag-checkered" => "", "fa-flag-o" => "", "fa-flash (alias)" => "", "fa-flask" => "", "fa-flickr" => "", "fa-floppy-o" => "", "fa-folder" => "", "fa-folder-o" => "", "fa-folder-open" => "", "fa-folder-open-o" => "", "fa-font" => "", "fa-forward" => "", "fa-foursquare" => "", "fa-frown-o" => "", "fa-gamepad" => "", "fa-gavel" => "", "fa-gbp" => "", "fa-ge (alias)" => "", "fa-gear (alias)" => "", "fa-gears (alias)" => "", "fa-gift" => "", "fa-git" => "", "fa-git-square" => "", "fa-github" => "", "fa-github-alt" => "", "fa-github-square" => "", "fa-gittip" => "", "fa-glass" => "", "fa-globe" => "", "fa-google" => "", "fa-google-plus" => "", "fa-google-plus-square" => "", "fa-graduation-cap" => "", "fa-group (alias)" => "", "fa-h-square" => "", "fa-hacker-news" => "", "fa-hand-o-down" => "", "fa-hand-o-left" => "", "fa-hand-o-right" => "", "fa-hand-o-up" => "", "fa-hdd-o" => "", "fa-header" => "", "fa-headphones" => "", "fa-heart" => "", "fa-heart-o" => "", "fa-history" => "", "fa-home" => "", "fa-hospital-o" => "", "fa-html5" => "", "fa-image (alias)" => "", "fa-inbox" => "", "fa-indent" => "", "fa-info" => "", "fa-info-circle" => "", "fa-inr" => "", "fa-instagram" => "", "fa-institution (alias)" => "", "fa-italic" => "", "fa-joomla" => "", "fa-jpy" => "", "fa-jsfiddle" => "", "fa-key" => "", "fa-keyboard-o" => "", "fa-krw" => "", "fa-language" => "", "fa-laptop" => "", "fa-leaf" => "", "fa-legal (alias)" => "", "fa-lemon-o" => "", "fa-level-down" => "", "fa-level-up" => "", "fa-life-bouy (alias)" => "", "fa-life-ring" => "", "fa-life-saver (alias)" => "", "fa-lightbulb-o" => "", "fa-link" => "", "fa-linkedin" => "", "fa-linkedin-square" => "", "fa-linux" => "", "fa-list" => "", "fa-list-alt" => "", "fa-list-ol" => "", "fa-list-ul" => "", "fa-location-arrow" => "", "fa-lock" => "", "fa-long-arrow-down" => "", "fa-long-arrow-left" => "", "fa-long-arrow-right" => "", "fa-long-arrow-up" => "", "fa-magic" => "", "fa-magnet" => "", "fa-mail-forward (alias)" => "", "fa-mail-reply (alias)" => "", "fa-mail-reply-all (alias)" => "", "fa-male" => "", "fa-map-marker" => "", "fa-maxcdn" => "", "fa-medkit" => "", "fa-meh-o" => "", "fa-microphone" => "", "fa-microphone-slash" => "", "fa-minus" => "", "fa-minus-circle" => "", "fa-minus-square" => "", "fa-minus-square-o" => "", "fa-mobile" => "", "fa-mobile-phone (alias)" => "", "fa-money" => "", "fa-moon-o" => "", "fa-mortar-board (alias)" => "", "fa-music" => "", "fa-navicon (alias)" => "", "fa-openid" => "", "fa-outdent" => "", "fa-pagelines" => "", "fa-paper-plane" => "", "fa-paper-plane-o" => "", "fa-paperclip" => "", "fa-paragraph" => "", "fa-paste (alias)" => "", "fa-pause" => "", "fa-paw" => "", "fa-pencil" => "", "fa-pencil-square" => "", "fa-pencil-square-o" => "", "fa-phone" => "", "fa-phone-square" => "", "fa-photo (alias)" => "", "fa-picture-o" => "", "fa-pied-piper" => "", "fa-pied-piper-alt" => "", "fa-pied-piper-square (alias)" => "", "fa-pinterest" => "", "fa-pinterest-square" => "", "fa-plane" => "", "fa-play" => "", "fa-play-circle" => "", "fa-play-circle-o" => "", "fa-plus" => "", "fa-plus-circle" => "", "fa-plus-square" => "", "fa-plus-square-o" => "", "fa-power-off" => "", "fa-print" => "", "fa-puzzle-piece" => "", "fa-qq" => "", "fa-qrcode" => "", "fa-question" => "", "fa-question-circle" => "", "fa-quote-left" => "", "fa-quote-right" => "", "fa-ra (alias)" => "", "fa-random" => "", "fa-rebel" => "", "fa-recycle" => "", "fa-reddit" => "", "fa-reddit-square" => "", "fa-refresh" => "", "fa-renren" => "", "fa-reorder (alias)" => "", "fa-repeat" => "", "fa-reply" => "", "fa-reply-all" => "", "fa-retweet" => "", "fa-rmb (alias)" => "", "fa-road" => "", "fa-rocket" => "", "fa-rotate-left (alias)" => "", "fa-rotate-right (alias)" => "", "fa-rouble (alias)" => "", "fa-rss" => "", "fa-rss-square" => "", "fa-rub" => "", "fa-ruble (alias)" => "", "fa-rupee (alias)" => "", "fa-save (alias)" => "", "fa-scissors" => "", "fa-search" => "", "fa-search-minus" => "", "fa-search-plus" => "", "fa-send (alias)" => "", "fa-send-o (alias)" => "", "fa-share" => "", "fa-share-alt" => "", "fa-share-alt-square" => "", "fa-share-square" => "", "fa-share-square-o" => "", "fa-shield" => "", "fa-shopping-cart" => "", "fa-sign-in" => "", "fa-sign-out" => "", "fa-signal" => "", "fa-sitemap" => "", "fa-skype" => "", "fa-slack" => "", "fa-sliders" => "", "fa-smile-o" => "", "fa-sort" => "", "fa-sort-alpha-asc" => "", "fa-sort-alpha-desc" => "", "fa-sort-amount-asc" => "", "fa-sort-amount-desc" => "", "fa-sort-asc" => "", "fa-sort-desc" => "", "fa-sort-down (alias)" => "", "fa-sort-numeric-asc" => "", "fa-sort-numeric-desc" => "", "fa-sort-up (alias)" => "", "fa-soundcloud" => "", "fa-space-shuttle" => "", "fa-spinner" => "", "fa-spoon" => "", "fa-spotify" => "", "fa-square" => "", "fa-square-o" => "", "fa-stack-exchange" => "", "fa-stack-overflow" => "", "fa-star" => "", "fa-star-half" => "", "fa-star-half-empty (alias)" => "", "fa-star-half-full (alias)" => "", "fa-star-half-o" => "", "fa-star-o" => "", "fa-steam" => "", "fa-steam-square" => "", "fa-step-backward" => "", "fa-step-forward" => "", "fa-stethoscope" => "", "fa-stop" => "", "fa-strikethrough" => "", "fa-stumbleupon" => "", "fa-stumbleupon-circle" => "", "fa-subscript" => "", "fa-suitcase" => "", "fa-sun-o" => "", "fa-superscript" => "", "fa-support (alias)" => "", "fa-table" => "", "fa-tablet" => "", "fa-tachometer" => "", "fa-tag" => "", "fa-tags" => "", "fa-tasks" => "", "fa-taxi" => "", "fa-tencent-weibo" => "", "fa-terminal" => "", "fa-text-height" => "", "fa-text-width" => "", "fa-th" => "", "fa-th-large" => "", "fa-th-list" => "", "fa-thumb-tack" => "", "fa-thumbs-down" => "", "fa-thumbs-o-down" => "", "fa-thumbs-o-up" => "", "fa-thumbs-up" => "", "fa-ticket" => "", "fa-times" => "", "fa-times-circle" => "", "fa-times-circle-o" => "", "fa-tint" => "", "fa-toggle-down (alias)" => "", "fa-toggle-left (alias)" => "", "fa-toggle-right (alias)" => "", "fa-toggle-up (alias)" => "", "fa-trash-o" => "", "fa-tree" => "", "fa-trello" => "", "fa-trophy" => "", "fa-truck" => "", "fa-try" => "", "fa-tumblr" => "", "fa-tumblr-square" => "", "fa-turkish-lira (alias)" => "", "fa-twitter" => "", "fa-twitter-square" => "", "fa-umbrella" => "", "fa-underline" => "", "fa-undo" => "", "fa-university" => "", "fa-unlink (alias)" => "", "fa-unlock" => "", "fa-unlock-alt" => "", "fa-unsorted (alias)" => "", "fa-upload" => "", "fa-usd" => "", "fa-user" => "", "fa-user-md" => "", "fa-users" => "", "fa-video-camera" => "", "fa-vimeo-square" => "", "fa-vine" => "", "fa-vk" => "", "fa-volume-down" => "", "fa-volume-off" => "", "fa-volume-up" => "", "fa-warning (alias)" => "", "fa-wechat (alias)" => "", "fa-weibo" => "", "fa-weixin" => "", "fa-wheelchair" => "", "fa-windows" => "", "fa-won (alias)" => "", "fa-wordpress" => "", "fa-wrench" => "", "fa-xing" => "", "fa-xing-square" => "", "fa-yahoo" => "", "fa-yen (alias)" => "", "fa-youtube" => "", "fa-youtube-play" => "", "fa-youtube-square" => ""); static $options; if (!isset($options)) { $options = array(); $options[] = JHTML::_('select.option', '', '- ' . JText::_('SELECT_FONTAWESOME_ICON') . ' -'); foreach ($falist as $name => $faicon) { $options[] = JHTML::_('select.option', $faicon, $faicon . " " . $name); } } return JHTML::_('select.genericlist', $options, $this->name, 'class="inputbox" style="font-family:\'FontAwesome\', Arial;" ', 'value', 'text', $this->value, $this->id); }
/** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); if (JFactory::getApplication()->isAdmin() || JEVHelper::isEventPublisher()) { $ev_id = $this->form->jevdata[$this->name]["ev_id"]; if ($ev_id == 0) { // published by default $this->value = 1; } $poptions = array(); $poptions[] = JHTML::_('select.option', 0, JText::_("JUNPUBLISHED")); $poptions[] = JHTML::_('select.option', 1, JText::_("JPUBLISHED")); $poptions[] = JHTML::_('select.option', -1, JText::_("JTRASHED")); return JHTML::_('select.genericlist', $poptions, 'state', 'class="inputbox" size="1"', 'value', 'text', $this->value); } else { return '<input type="hidden" name="state" id="state" value="' . $this->value . '" />'; } }
/** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { ob_start(); $event = $this->form->jevdata[$this->name]["event"]; $dispatcher = JDispatcher::getInstance(); $res = $dispatcher->trigger('onEditLocation', array(&$event)); if (count($res) == 0 || !$res[0]) { ?> <input class="inputbox" type="text" name="location" size="80" maxlength="120" value="<?php echo JEventsHtml::special($this->value); ?> " /> <?php } $input = ob_get_clean(); JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); return $input; }
protected function getInput() { // load any custom fields $dispatcher = JDispatcher::getInstance(); JPluginHelper::importPlugin("jevents"); $id = $this->id; if (version_compare(JVERSION, '3.3.0', '>=')) { $res = $dispatcher->trigger('onEditMenuItem', array(&$this->data, &$this->value, $this->type, $this->name, $this->id, $this->form)); } JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); if (array_key_exists($id, $this->data)) { $item = $this->data[$id]; if (isset($item->html) && $item->html != "") { return $item->html; } } else { return ""; } }
/** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { ob_start(); $native = $this->form->jevdata[$this->name]["native"]; $clistChoice = $this->form->jevdata[$this->name]["clistChoice"]; $clist = $this->form->jevdata[$this->name]["clist"]; $nativeCals = $this->form->jevdata[$this->name]["nativeCals"]; if ($native && $clistChoice) { ?> <script type="text/javascript" > function preselectCategory(select){ var lookup = new Array(); lookup[0]=0; <?php foreach ($nativeCals as $nc) { echo 'lookup[' . $nc->ics_id . ']=' . $nc->catid . ';'; } ?> document.adminForm['catid'].value=lookup[select.value]; // trigger Bootstrap Chosen replacement try { jQuery(document.adminForm['catid']).trigger("liszt:updated"); } catch (e){ } } </script> <?php echo $clist; } else { if ($clistChoice) { echo $clist; } else { echo $clist; } } $input = ob_get_clean(); JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); return $input; }
/** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { // Initialize variables. $html = array(); $attr = ''; // Initialize some field attributes. $attr .= $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : ''; $attr .= (string) $this->element['disabled'] == 'true' ? ' disabled="disabled"' : ''; $attr .= $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : ''; // Initialize JavaScript field attributes. $attr .= $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : ''; $html[] = '<input type="text" name="' . $this->name . '" value="' . $this->value . '" id="pick1064797275field"/><br/>'; $html[] = '<div class="clr"></div>'; $html[] = '<iframe id="fred" frameborder="" src="' . JURI::root() . "components/com_jevents/libraries/colours.html?id=fred&j16=1" . '" class="jev_colour_picker_i" ></iframe>'; $conditionparam = $this->form->getName() != "com_config.component" ? '_params' : ''; $html[] = '<div class="clr" id="jform' . $conditionparam . '_jevcolourpicker"></div>'; //$html[] = '<div class="clr"></div>'; // add script to auto open the basic options tab! $doc = JFactory::getDocument(); $script = <<<SCRIPT window.addEvent('load', function() { \tvar basicoptions = document.getElement('#basic-options') \tif (basicoptions && !basicoptions.hasClass('pane-toggler-down')) { \t basicoptions.fireEvent('click', basicoptions, 1000); \t}; }); SCRIPT; $doc->addScriptDeclaration($script); JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); if (JevJoomlaVersion::isCompatible("3.0")) { JEVHelper::stylesheet('eventsadmin.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/'); } else { JEVHelper::stylesheet('eventsadmin16.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/'); } return implode($html); }
protected function getInput() { JEVHelper::ConditionalFields($this->element, $this->form->getName()); // Mkae sure jQuery is loaded if (JevJoomlaVersion::isCompatible("3.0")) { JHtml::_('jquery.framework'); JHtml::_('jquery.ui', array("core", "sortable")); JHtml::_('bootstrap.framework'); JEVHelper::script("components/com_jevents/assets/js/jQnc.js"); // this script should come after all the URL based scripts in Joomla so should be a safe place to know that noConflict has been set JFactory::getDocument()->addScriptDeclaration("checkJQ();"); } else { if (JComponentHelper::getParams(JEV_COM_COMPONENT)->get("fixjquery", 1)) { JFactory::getDocument()->addScript("//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"); JFactory::getDocument()->addScript("//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"); JEVHelper::script("components/com_jevents/assets/js/jQnc.js"); // this script should come after all the URL based scripts in Joomla so should be a safe place to know that noConflict has been set JFactory::getDocument()->addScriptDeclaration("checkJQ();"); } } JEVHelper::script('administrator/components/com_jevents/assets/js/columns.js'); $user = JFactory::getUser(); $collist = array(); $collist[] = array(JText::_("JEV_CORE_DATA", true), "disabled"); $collist[] = array(JText::_("JEV_FIELD_TITLE", true), "TITLE"); $collist[] = array(JText::_("JEV_FIELD_TITLE_LINK", true), "TITLE_LINK"); $collist[] = array(JText::_("JEV_FIELD_REPEATSUMMARY", true), "REPEATSUMMARY"); $collist[] = array(JText::_("JEV_FIELD_STARTDATE", true), "STARTDATE"); $collist[] = array(JText::_("JEV_FIELD_STARTTIME", true), "STARTTIME"); $collist[] = array(JText::_("JEV_FIELD_ISOSTARTTIME", true), "ISOSTART"); $collist[] = array(JText::_("JEV_FIELD_ENDDATE", true), "ENDDATE"); $collist[] = array(JText::_("JEV_FIELD_ENDTIME", true), "ENDTIME"); $collist[] = array(JText::_("JEV_FIELD_ISOENDTIME", true), "ISOEND"); $collist[] = array(JText::_("JEV_FIELD_MULTIENDDATE", true), "MULTIENDDATE"); $collist[] = array(JText::_("JEV_FIELD_DURATION", true), "DURATION"); $collist[] = array(JText::_("JEV_FIELD_PREVIOUSNEXT", true), "PREVIOUSNEXT"); $collist[] = array(JText::_("JEV_FIELD_FIRSTREPEAT", true), "FIRSTREPEAT"); $collist[] = array(JText::_("JEV_FIELD_LASTREPEAT", true), "LASTREPEAT"); $collist[] = array(JText::_("JEV_FIELD_CREATOR_LABEL", true), "CREATOR_LABEL"); $collist[] = array(JText::_("JEV_FIELD_CREATOR", true), "CREATOR"); $collist[] = array(JText::_("JEV_FIELD_HITS", true), "HITS"); $collist[] = array(JText::_("JEV_FIELD_DESCRIPTION", true), "DESCRIPTION"); $collist[] = array(JText::_("JEV_FIELD_LOCATION_LABEL", true), "LOCATION_LABEL"); $collist[] = array(JText::_("JEV_FIELD_LOCATION", true), "LOCATION"); $collist[] = array(JText::_("JEV_FIELD_CONTACT_LABEL", true), "CONTACT_LABEL"); $collist[] = array(JText::_("JEV_FIELD_CONTACT", true), "CONTACT"); $collist[] = array(JText::_("JEV_FIELD_EXTRAINFO", true), "EXTRAINFO"); $collist[] = array(JText::_("JEV_FIELD_CATEGORY", true), "CATEGORY"); $collist[] = array(JText::_("JEV_FIELD_ALL_CATEGORIES", true), "ALLCATEGORIES"); $collist[] = array(JText::_("JEV_FIELD_CATEGORY_LINK", true), "CATEGORYLNK"); $collist[] = array(JText::_("JEV_FIELD_CATEGORY_IMAGE", true), "CATEGORYIMG"); $collist[] = array(JText::_("JEV_FIELD_CATEGORY_IMAGES", true), "CATEGORYIMGS"); $collist[] = array(JText::_("JEV_FIELD_CATEGORY_DESCRIPTION", true), "CATDESC"); $collist[] = array(JText::_("JEV_FIELD_COLOUR", true), "COLOUR"); $collist[] = array(JText::_("JEV_FIELD_CALENDAR", true), "CALENDAR"); $collist[] = array(JText::_("JEV_FIELD_CREATIONDATE", true), "CREATED"); $collist[] = array(JText::_("JEV_FIELD_LINKSTART", true), "LINKSTART"); $collist[] = array(JText::_("JEV_FIELD_LINKEND", true), "LINKEND"); $collist[] = array(JText::_("JEV_FIELD_URL", true), "URL"); $collist[] = array(JText::_("JEV_ACCESS_LEVEL", true), "ACCESS"); $collist[] = array(JText::_("JEV_EVENT_PRIORITY", true), "PRIORITY"); // get list of enabled plugins $jevplugins = JPluginHelper::getPlugin("jevents"); foreach ($jevplugins as $jevplugin) { if (JPluginHelper::importPlugin("jevents", $jevplugin->name)) { $classname = "plgJevents" . ucfirst($jevplugin->name); if (is_callable(array($classname, "fieldNameArray"))) { $lang = JFactory::getLanguage(); $lang->load("plg_jevents_" . $jevplugin->name, JPATH_ADMINISTRATOR); $fieldNameArray = call_user_func(array($classname, "fieldNameArray"), 'list'); if (!isset($fieldNameArray['labels'])) { continue; } $collist[] = array($fieldNameArray["group"], "disabled"); for ($i = 0; $i < count($fieldNameArray['labels']); $i++) { if ($fieldNameArray['labels'][$i] == "" || $fieldNameArray['labels'][$i] == " Label") { continue; } $collist[] = array(str_replace(":", " ", $fieldNameArray['labels'][$i]), $fieldNameArray['values'][$i]); } } } } $invalue = array(); $indexedgroups = array(); if ($this->value != "") { $ingroups = explode("||", $this->value); foreach ($ingroups as $group) { $group = explode("|", $group); if ($group[0] == "") { continue; } $invalue[] = $group[0]; if (count($group) < 3) { $group[2] = $group[0]; } list($id, $fieldlabel, $label) = $group; $col = new stdClass(); $col->fieldlabel = $fieldlabel; $col->id = $id; $col->label = $label; $col->raw = implode("|", $group); $indexedgroups[$id] = $col; } } $input = '<div style="clear:left"></div><table><tr valign="top"> <td><div style="font-weight:bold">' . JText::_("JEV_CLICK_TO_ADD_COLUMN") . '</div> <div id="columnchoices" style="margin-top:10px;padding:5px;min-width:200px;height:150px;border:solid 1px #ccc;overflow-y:auto" >'; foreach ($collist as $col) { if (count($col) < 3) { $col[2] = $col[0]; } list($fieldlabel, $id, $label) = $col; if (!in_array($id, $invalue)) { // we can't handle parameters yet if (strpos($id, ":")) { continue; } if ($id == "disabled") { $input .= '<div><strong>' . $fieldlabel . "</strong></div>\n"; } else { $input .= '<div>' . $fieldlabel . "<span style='display:none'>{$id}</span></div>\n"; } } } $input .= '</div></td> <td><div style="font-weight:bold;margin-left:20px;">' . JText::_("JEV_COLUMNS_DRAG_TO_REORDER_OR_CLICK_TO_REMOVE") . '</div> <div id="columnmatches" style="margin:10px 0px 0px 20px;padding-top:5px;min-width:250px;">'; $invalues = array(); foreach ($invalue as $col) { $input .= '<div id="column' . $col . '" style="clear:left;"><div style="width:200px;display:inline-block;">' . $indexedgroups[$col]->fieldlabel . "</div><input type='text' value='" . $indexedgroups[$col]->label . "' style='margin-left:20px;' /></div>"; $invalues[] = $indexedgroups[$col]->raw; } $invalues = implode("||", $invalues); $input .= '</div></td> </tr></table>'; $input .= '<textarea style="display:block" name="' . $this->name . '" id="jevcolumns">' . $invalues . '</textarea>'; $input .= '<div style="clear:left"></div>'; $input .= '<script type="text/javascript">setupColumnChoices(true);setupColumnLis(true);</script>'; return $input; }
/** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { $event = $this->form->jevdata[$this->name]["event"]; ob_start(); $name = $this->name; $partname = explode("_", $name); $partname = $partname[0]; $time24function = $partname . "time24"; if ($partname == "start") { $test = $event->alldayevent(); } else { $test = $event->alldayevent() || $event->noendtime(); } $btngroup = JevJoomlaVersion::isCompatible("3.0") ? "btn-group" : ""; $btn = JevJoomlaVersion::isCompatible("3.0") ? "btn" : ""; ?> <div id="<?php echo $partname; ?> _24h_area" class="jev_inline"> <input class="inputbox" type="text" name="<?php echo $partname; ?> _time" id="<?php echo $name; ?> " size="8" <?php echo $test ? "disabled='disabled'" : ""; ?> maxlength="8" value="<?php echo $event->{$time24function}(); ?> " onchange="checkTime(this);"/> </div> <div id="<?php echo $partname; ?> _12h_area" class="jev_inline"> <input class="inputbox" type="text" name="<?php echo $partname; ?> _12h" id="<?php echo $partname; ?> _12h" size="8" maxlength="8" <?php echo $test ? "disabled='disabled'" : ""; ?> value="" onchange="check12hTime(this);" /> <div class="radio <?php echo $btngroup; ?> " id="<?php echo $partname; ?> _ampm" style="display:inline;"> <label for="<?php echo $partname; ?> AM" class="radio <?php echo $btn; ?> "> <input type="radio" name="<?php echo $partname; ?> _ampm" id="<?php echo $partname; ?> AM" value="none" checked="checked" onclick="toggleAMPM('<?php echo $partname; ?> AM');" <?php echo $test ? "disabled='disabled'" : ""; ?> /> <?php echo JText::_('JEV_AM'); ?> </label> <label for="<?php echo $partname; ?> PM" class="radio <?php echo $btn; ?> "> <input type="radio" name="<?php echo $partname; ?> _ampm" id="<?php echo $partname; ?> PM" value="none" onclick="toggleAMPM('<?php echo $partname; ?> PM');" <?php echo $test ? "disabled='disabled'" : ""; ?> /> <?php echo JText::_('JEV_PM'); ?> </label> </div> </div> <?php $html = ob_get_clean(); JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); return $html; }
/** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { $maxDirectNumber = 50; JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); $creator = intval($this->value) > 0 ? intval($this->value) : (isset($user) ? $user->id : 0); // If user is jevents can deleteall or has backend access then allow them to specify the creator $jevuser = JEVHelper::getAuthorisedUser(); $user = JFactory::getUser(); //$access = JAccess::check($user->id, "core.deleteall", "com_jevents"); $access = $user->authorise('core.admin', 'com_jevents') || $user->authorise('core.deleteall', 'com_jevents'); $db = JFactory::getDBO(); if ($jevuser && $jevuser->candeleteall || $access) { $params = JComponentHelper::getParams(JEV_COM_COMPONENT); $authorisedonly = $params->get("authorisedonly", 0); // if authorised only then load from database if ($authorisedonly) { $sql = "SELECT count(tl.id) FROM #__jev_users AS tl "; $sql .= " LEFT JOIN #__users as ju ON tl.user_id=ju.id "; $sql .= " WHERE tl.cancreate=1"; $sql .= " ORDER BY ju.name ASC"; $db->setQuery($sql); $userCount = $db->loadResult(); if ($userCount <= $maxDirectNumber) { $sql = "SELECT tl.*, ju.* FROM #__jev_users AS tl "; $sql .= " LEFT JOIN #__users as ju ON tl.user_id=ju.id "; $sql .= " WHERE tl.cancreate=1"; $sql .= " ORDER BY ju.name ASC"; $db->setQuery($sql); $users = $db->loadObjectList(); } } else { $rules = JAccess::getAssetRules("com_jevents", true); $creatorgroups = $rules->getData(); // need to merge the arrays because of stupid way Joomla checks super user permissions //$creatorgroups = array_merge($creatorgroups["core.admin"]->getData(), $creatorgroups["core.create"]->getData()); // use union orf arrays sincee getData no longer has string keys in the resultant array //$creatorgroups = $creatorgroups["core.admin"]->getData()+ $creatorgroups["core.create"]->getData(); // use union orf arrays sincee getData no longer has string keys in the resultant array $creatorgroupsdata = $creatorgroups["core.admin"]->getData(); // take the higher permission setting foreach ($creatorgroups["core.create"]->getData() as $creatorgroup => $permission) { if ($permission) { $creatorgroupsdata[$creatorgroup] = $permission; } } $userids = array(0); foreach ($creatorgroupsdata as $creatorgroup => $permission) { if ($permission == 1) { $userids = array_merge(JAccess::getUsersByGroup($creatorgroup, true), $userids); } } $sql = "SELECT count(id) FROM #__users where id IN (" . implode(",", array_values($userids)) . ") and block=0 ORDER BY name asc"; $db->setQuery($sql); $userCount = $db->loadResult(); if ($userCount <= $maxDirectNumber) { $sql = "SELECT * FROM #__users where id IN (" . implode(",", array_values($userids)) . ") and block=0 ORDER BY name asc"; $db->setQuery($sql); $users = $db->loadObjectList(); } } // get list of creators - if fewer than 200 if (!isset($users)) { // Use Typeahead instead if ($userCount > $maxDirectNumber) { $creatorname = ""; if ($creator > 0) { $sql = "SELECT * FROM #__users where id = {$creator}"; $db->setQuery($sql); $creatorData = $db->loadObject(); if ($creatorData) { $creatorname = $creatorData->name . " (" . $creatorData->username . ")"; } } ob_start(); ?> <input type="hidden" name='jev_creatorid' id='jev_creatorid' value="<?php echo $creator; ?> "/> <div id="scrollable-dropdown-menu" style="float:left"> <input name="creatorid_notused" id="ta_creatorid" class="jevtypeahead" placeholder="<?php echo $creatorname; ?> " type="text" autocomplete="off" size="50"> </div> <?php JLoader::register('JevTypeahead', JPATH_LIBRARIES . "/jevents/jevtypeahead/jevtypeahead.php"); $datapath = JRoute::_("index.php?option=com_jevents&ttoption=com_jevents&typeaheadtask=gwejson&file=findcreator", false); //$prefetchdatapath = JRoute::_("index.php?option=com_jevents&ttoption=com_jevents&typeaheadtask=gwejson&file=findcreator&prefetch=1", false); JevTypeahead::typeahead('#ta_creatorid', array('remote' => $datapath, 'data_value' => 'title', 'data_id' => 'creator_id', 'field_selector' => '#jev_creatorid', 'minLength' => 2, 'limit' => 10, 'scrollable' => 1)); return ob_get_clean(); } return ""; } $userOptions[] = JHTML::_('select.option', '-1', JText::_('SELECT_USER')); foreach ($users as $user) { if ($user->id == 0) { continue; } $userOptions[] = JHTML::_('select.option', $user->id, $user->name . " ( " . $user->username . " )"); } $userlist = JHTML::_('select.genericlist', $userOptions, 'jev_creatorid', 'class="inputbox" size="1" ', 'value', 'text', $creator); return $userlist; } return ""; }
protected function getInput() { parent::getOptions(); $availableFields = array(); $jevplugins = JPluginHelper::getPlugin("jevents"); //we dinamically get the size of the select box $size = 5; //$options['CATEGORY'] = JText::_("JEV_FIELD_CATEGORY",true); // title is always required //$options['TITLE'] = JText::_("JEV_FIELD_TITLE",true); $options['DESCRIPTION'] = JText::_("JEV_FIELD_DESCRIPTION", true); $options['LOCN'] = JText::_("JEV_FIELD_LOCATION", true); $options['CONTACT'] = JText::_("JEV_FIELD_CONTACT", true); $options['EXTRA'] = JText::_("JEV_FIELD_EXTRAINFO", true); $group = array(); $group['value'] = JText::_("JEV_CORE_DATA", true); $group['text'] = JText::_("JEV_CORE_DATA", true); $group['items'] = $options; $optionsGroup[] = $group; unset($options); foreach ($jevplugins as $jevplugin) { // At present we only support JEvents, Agenda & Minutes, CCK plugin, Standard Images and Files, Resources Manager, Metatags and Tags if (!in_array($jevplugin->name, array("agendaminutes", "jevcck", "jevfiles", "jevmetatags", "jevpeople", "jevtags"))) { continue; } $classname = "plgJevents" . ucfirst($jevplugin->name); if (is_callable(array($classname, "fieldNameArray"))) { $lang = JFactory::getLanguage(); $lang->load("plg_jevents_" . $jevplugin->name, JPATH_ADMINISTRATOR); $fieldNameArray = call_user_func(array($classname, "fieldNameArray"), "edit"); if (!isset($fieldNameArray['labels'])) { continue; } $fieldNameArrayCount = count($fieldNameArray['labels']); if ($fieldNameArrayCount > 0) { $size += $fieldNameArrayCount; for ($i = 0; $i < $fieldNameArrayCount; $i++) { if ($fieldNameArray['labels'][$i] == "" || $fieldNameArray['labels'][$i] == " Label") { continue; } if ($fieldNameArray['values'][$i] == 'people_selfallocation') { continue; } $options[$fieldNameArray['values'][$i]] = $fieldNameArray['labels'][$i]; $availableFields[$jevplugin->name][] = JHtml::_('select.option', $fieldNameArray['values'][$i], $fieldNameArray['labels'][$i]); } $group = array(); $group['value'] = $fieldNameArray['group']; $group['text'] = $fieldNameArray['group']; $group['items'] = $options; $optionsGroup[] = $group; unset($options); } } } if (!empty($optionsGroup)) { $size = $size < 10 ? $size : 10; $attr = array('list.attr' => 'multiple="true"' . 'size="' . $size . '"', 'list.select' => $this->value, 'id' => $this->id); $input = JHTML::_('select.groupedlist', $optionsGroup, $this->name, $attr); } JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); return $input; }