Ejemplo n.º 1
0
 /**
  * Run this widget.
  * This method registers necessary javascript and renders the needed HTML code.
  */
 public function run()
 {
     $id = $this->getId();
     if (isset($this->htmlOptions['id'])) {
         $id = $this->htmlOptions['id'];
     } else {
         $this->htmlOptions['id'] = $id;
     }
     if (empty($this->options)) {
         $options = '';
     } else {
         $options = CJavaScript::encode($this->options);
     }
     if ($this->baseInputNameForSortableCollection != null) {
         echo ZurmoHtml::hiddenField($this->baseInputNameForSortableCollection);
     }
     Yii::app()->getClientScript()->registerScript(__CLASS__ . '#' . $id, "jQuery('#{$id}').sortable({$options});");
     echo ZurmoHtml::openTag($this->tagName, $this->htmlOptions) . "\n";
     if (empty($this->items) && $this->showEmptyList) {
         echo '<li></li>' . "\n";
     }
     foreach ($this->items as $id => $data) {
         echo strtr($this->itemTemplate, array_merge(array('{id}' => $id), $data)) . "\n";
     }
     echo ZurmoHtml::closeTag($this->tagName);
 }
 public function render()
 {
     $content = ZurmoHtml::openTag('div', array('class' => 'default-button'));
     $content .= parent::render();
     $content .= ZurmoHtml::closeTag('div');
     return $content;
 }
 protected function renderContent()
 {
     $content = $this->renderTitleContent();
     $content .= '<ul class="configuration-list">';
     $modules = Module::getModuleObjects();
     $moduleClassNamesAndLabels = array();
     foreach ($modules as $module) {
         $moduleTreeMenuItems = $module->getDesignerMenuItems();
         if ($module->isEnabled() && !empty($moduleTreeMenuItems)) {
             $moduleClassNamesAndLabels[get_class($module)] = $module::getModuleLabelByTypeAndLanguage('Plural');
         }
     }
     asort($moduleClassNamesAndLabels);
     foreach ($moduleClassNamesAndLabels as $moduleClassName => $label) {
         if (RightsUtil::canUserAccessModule($moduleClassName, Yii::app()->user->userModel)) {
             $route = $this->moduleId . '/' . $this->controllerId . '/modulesMenu/';
             $content .= ZurmoHtml::openTag('li');
             $content .= '<h4>' . $label . '</h4>';
             $content .= ZurmoHtml::link(ZurmoHtml::wrapLabel(Zurmo::t('Core', 'Configure')), Yii::app()->createUrl($route, array('moduleClassName' => $moduleClassName)), array('class' => 'white-button'));
             $content .= ZurmoHtml::closeTag('li');
         }
     }
     $content .= '</ul>';
     return $content;
 }
 /**
  * @return string
  */
 public function render()
 {
     $content = ZurmoHtml::openTag('div', $this->resolveHtmlOptionsForRendering());
     $content .= ZurmoHtml::link($this->resolveLabelAndWrap(), '#', array('class' => 'button-action'));
     $content .= ZurmoHtml::closeTag('div');
     return $content;
 }
 protected function renderEditableByAttribute($attribute)
 {
     $content = ZurmoHtml::openTag('div', array('class' => 'multi-select-checkbox-input'));
     $content .= $this->renderEditableCheckBoxByAttribute($attribute);
     $content .= $this->form->labelEx($this->model, $attribute, array('for' => $this->getEditableInputId($attribute)));
     $content .= ZurmoHtml::closeTag('div');
     return $content;
 }
 /**
  * @param bean $row
  * @param $id
  */
 protected function renderExpandableRow($row, $id)
 {
     $content = ZurmoHtml::openTag('tr', array('style' => 'display:none;'));
     $content .= ZurmoHtml::openTag('td', array('class' => 'hasDrillDownContent', 'colspan' => count($this->columns)));
     $content .= ZurmoHtml::tag('div', array('class' => 'drillDownContent', 'id' => 'drillDownContentFor-' . $id));
     $content .= ZurmoHtml::closeTag('td');
     $content .= ZurmoHtml::closeTag('tr');
     return $content;
 }
 public function render()
 {
     $content = ZurmoHtml::openTag('div', array('class' => 'default-button'));
     $label = ZurmoHtml::tag('i', array('class' => $this->params['iconClass']), null);
     $label .= ZurmoHtml::tag('span', array('class' => 'button-label'), $this->getLabel());
     $content .= $ajaxLink = ZurmoHtml::ajaxLink($label, $this->getDefaultRoute(), $this->getAjaxLinkOptions(), $this->getHtmlOptions());
     $content .= ZurmoHtml::closeTag('div');
     return $content;
 }
 public function render()
 {
     $id = HeaderLinksView::USER_GAME_DASHBOARD_LINK_ID;
     $content = ZurmoHtml::openTag('div', array('class' => 'default-button'));
     $label = ZurmoHtml::tag('i', array('class' => $this->params['iconClass']), null);
     $label .= ZurmoHtml::tag('span', array('class' => 'button-label'), $this->getLabel());
     $content .= $ajaxLink = ZurmoHtml::ajaxLink($label, $this->getDefaultRoute(), HeaderLinksView::resolveAjaxOptionsForGameDashboardModel($id), $this->getHtmlOptions());
     $content .= ZurmoHtml::closeTag('div');
     return $content;
 }
 protected function renderContent()
 {
     $url = $this->getCreateMeetingUrl();
     $content = ZurmoHtml::openTag('div', array('class' => $this->getIconName()));
     $content .= $this->getMessageContent();
     if (RightsUtil::doesUserHaveAllowByRightName('MeetingsModule', MeetingsModule::getCreateRight(), Yii::app()->user->userModel)) {
         $content .= ZurmoHtml::link(ZurmoHtml::wrapLabel($this->getCreateLinkDisplayLabel()), $url, array('class' => 'z-button green-button'));
     }
     $content .= ZurmoHtml::closeTag('div');
     return $content;
 }
Ejemplo n.º 10
0
 protected function renderMenuRecursive($items)
 {
     foreach ($items as $item) {
         $liClose = null;
         $rendered = false;
         if (!array_key_exists('renderHeader', $item) || $item['renderHeader']) {
             $rendered = true;
             $liClose = ZurmoHtml::closeTag('li') . "\n";
             $liOptions = array();
             if (isset($item['itemOptions'])) {
                 $liOptions = $item['itemOptions'];
             }
             echo ZurmoHtml::openTag('li', $liOptions);
             if (isset($item['linkOptions'])) {
                 $htmlOptions = $item['linkOptions'];
             } else {
                 $htmlOptions = array();
             }
             if (!empty($item['label'])) {
                 $resolvedLabelContent = $this->renderLabelPrefix() . ZurmoHtml::tag('span', array(), $item['label']);
             } else {
                 $resolvedLabelContent = static::resolveAndGetSpanAndDynamicLabelContent($item);
             }
             if (isset($item['ajaxLinkOptions'])) {
                 echo ZurmoHtml::ajaxLink($resolvedLabelContent, $item['url'], $item['ajaxLinkOptions'], $htmlOptions);
             } elseif (isset($item['url'])) {
                 echo ZurmoHtml::link($this->renderLinkPrefix() . $resolvedLabelContent, $item['url'], $htmlOptions);
             } else {
                 if (!empty($item['label'])) {
                     echo ZurmoHtml::link($resolvedLabelContent, "javascript:void(0);", $htmlOptions);
                 } else {
                     echo $resolvedLabelContent;
                 }
             }
         }
         if (isset($item['items']) && count($item['items'])) {
             $nestedUlOpen = null;
             $nestedUlClose = null;
             if ($rendered) {
                 $nestedUlOpen = "\n" . ZurmoHtml::openTag('ul', $this->submenuHtmlOptions) . "\n";
                 $nestedUlClose = ZurmoHtml::closeTag('ul') . "\n";
             }
             echo $nestedUlOpen;
             $this->renderMenuRecursive($item['items']);
             echo $nestedUlClose;
         }
         echo $liClose;
     }
 }
 protected function renderSelectLink()
 {
     if (!$this->shouldRenderSelectLink) {
         return null;
     }
     $cs = Yii::app()->getClientScript();
     $cs->registerCoreScript('bbq');
     $cs->registerScriptFile(Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('application.core.elements.assets')) . '/Modal.js', CClientScript::POS_END);
     $this->registerSelectLinkScripts();
     $content = ZurmoHtml::openTag('div', array('class' => 'has-model-select'));
     $content .= ZurmoHtml::hiddenField($this->getIdForHiddenSelectLinkField());
     $content .= ZurmoHtml::ajaxLink('<span class="model-select-icon"></span>', Yii::app()->createUrl($this->getSourceUrlForSelectLink(), $this->getSelectLinkUrlParams()), $this->resolveAjaxOptionsForSelectingModel(), array('id' => $this->getWidgetId() . '-select-link'));
     $content .= ZurmoHtml::closeTag('div');
     return $content;
 }
 protected function renderForm()
 {
     list($form, $formStart) = $this->controller->renderBeginWidget('ZurmoActiveForm', array('id' => 'image-import-form', 'action' => Yii::app()->controller->createUrl('imageModel/uploadFromUrl'), 'enableAjaxValidation' => true, 'clientOptions' => array('validateOnSubmit' => true, 'validateOnChange' => false, 'beforeValidate' => 'js:$(this).beforeValidateAction', 'afterValidate' => 'js:$(this).afterValidateAjaxAction', 'afterValidateAjax' => $this->renderPreviewImportedImageScript())));
     $content = $formStart;
     $content .= $form->labelEx($this->formModel, 'url');
     $content .= ZurmoHtml::openTag('div', array('class' => 'import-url-field'));
     $content .= $form->urlField($this->formModel, 'url');
     $content .= $form->error($this->formModel, 'url');
     $content .= ZurmoHtml::closeTag('div');
     $linkOptions = array('onclick' => "\$(this).addClass('attachLoadingTarget').closest('form').submit();" . "\$(this).makeOrRemoveLoadingSpinner(true, \$(this), 'dark');", 'class' => 'secondary-button');
     $content .= ZurmoHtml::tag('div', array('id' => 'import-image-hidden-div', 'class' => Redactor::LINK_FOR_INSERT_CLASS, 'style' => 'display:none;'), '');
     $spinner = ZurmoHtml::tag('span', array('class' => 'z-spinner'));
     $label = ZurmoHtml::tag('span', array('class' => 'z-label'), Zurmo::t('ZurmoModule', 'Import'));
     $content .= ZurmoHtml::link($spinner . $label, "#", $linkOptions);
     $content .= $this->controller->renderEndWidget();
     return $content;
 }
 /**
  * @return string
  */
 public function render()
 {
     $kanbanBoardClass = 'default-button';
     if ($this->getActive() == static::TYPE_KANBAN_BOARD) {
         $kanbanBoardClass .= ' active';
     }
     $content = ZurmoHtml::openTag('div', array('class' => $kanbanBoardClass));
     $content .= ZurmoHtml::link($this->resolveLabelForKanbanBoard(), $this->getKanbanBoardUrl(), array('title' => Zurmo::t('Core', 'View as Kanban Board')));
     $content .= ZurmoHtml::closeTag('div');
     $gridClass = 'default-button';
     if ($this->getActive() == static::TYPE_NON_KANBAN_BOARD) {
         $gridClass .= ' active';
     }
     $content .= ZurmoHtml::openTag('div', array('class' => $gridClass));
     $content .= ZurmoHtml::link($this->resolveLabelForNonKanbanBoard(), $this->getNonKanbanBoardUrl(), array('title' => $this->getViewLabelForNonKanbanBoard()));
     $content .= ZurmoHtml::closeTag('div');
     return $content;
 }
 protected function renderBannerContent()
 {
     if (Yii::app()->edition != 'Community') {
         return;
     }
     $content = ZurmoHtml::openTag('div', array('class' => 'get-pro-message'));
     $content .= ZurmoHtml::openTag('div');
     $content .= ZurmoHtml::openTag('h2');
     $content .= Zurmo::t('ZurmoModule', 'Achieve more with a Zurmo subscription');
     $content .= ZurmoHtml::closeTag('h2');
     $content .= ZurmoHtml::openTag('p');
     $content .= Zurmo::t('HomeModule', 'Get more features, proactive support, access ' . 'to training and consulting, blazing fast hosting, ' . 'and in-depth documentation with a Zurmo subscription.');
     $content .= ZurmoHtml::closeTag('p');
     $content .= '<a href="http://www.zurmo.com/needSupport.php?source=amenu" class="z-button"><span class="z-label">' . Zurmo::t('ZurmoModule', 'Learn More' . '</span></a>');
     $content .= ZurmoHtml::closeTag('div');
     $content .= ZurmoHtml::closeTag('div');
     return $content;
 }
 protected function renderMarketingListsList()
 {
     $colGroupContent = ZurmoHtml::openTag('colgroup');
     $colGroupContent .= ZurmoHtml::tag('col', array('style' => 'width:20%'));
     $colGroupContent .= ZurmoHtml::tag('col', array('style' => 'width:80%'));
     $colGroupContent .= ZurmoHtml::closeTag('colgroup');
     $rowsContentArray = array();
     foreach ($this->marketingLists as $marketingList) {
         $marketingListModel = $marketingList['model'];
         $subscribed = $marketingList['subscribed'];
         $columnsContent = ZurmoHtml::tag('td', array(), $this->renderToggleSubscriptionSwitch($marketingListModel->id, $subscribed));
         $columnsContent .= ZurmoHtml::tag('td', array(), strval($marketingListModel));
         $rowsContentArray[] = ZurmoHtml::tag('tr', array(), $columnsContent);
     }
     $linkColumnsContent = ZurmoHtml::tag('td', array(), $this->renderUnsubscribeAllLink());
     $linkColumnsContent .= ZurmoHtml::tag('td');
     $rowsContentArray[] = ZurmoHtml::tag('tr', array(), $linkColumnsContent);
     $rowsContent = implode("\n", $rowsContentArray);
     $content = $colGroupContent . $rowsContent;
     $tableContent = ZurmoHtml::tag('table', array(), $content);
     return $tableContent;
 }
 /**
  * Designed to render cells as divs instead of tds.
  * @param integer $row the row number (zero-based)
  */
 public function renderStackedDataCell($row)
 {
     $data = $this->owner->grid->dataProvider->data[$row];
     $options = $this->owner->htmlOptions;
     if ($this->owner->cssClassExpression !== null) {
         $class = $this->owner->evaluateExpression($this->owner->cssClassExpression, array('row' => $row, 'data' => $data));
         if (isset($options['class'])) {
             $options['class'] .= ' ' . $class;
         } else {
             $options['class'] = $class;
         }
     }
     ob_start();
     $this->owner->renderDataCellContentFromOutsideClass($row, $data);
     $content = ob_get_contents();
     ob_end_clean();
     if ($content != null && $content != $this->owner->grid->nullDisplay) {
         echo ZurmoHtml::openTag('div', $options);
         echo $content;
         echo '</div>';
     }
 }
Ejemplo n.º 17
0
 /**
  * Override to handle spanning of columns.  Used primarily by matrix reports to render a grid
  */
 public function renderDataCell($row)
 {
     $data = $this->grid->dataProvider->data[$row];
     $options = $this->htmlOptions;
     if ($this->cssClassExpression !== null) {
         $class = $this->evaluateExpression($this->cssClassExpression, array('row' => $row, 'data' => $data));
         if (!empty($class)) {
             if (isset($options['class'])) {
                 $options['class'] .= ' ' . $class;
             } else {
                 $options['class'] = $class;
             }
         }
     }
     $rowSpan = $data->getSelectedColumnRowSpan($this->name);
     $options['rowSpan'] = $rowSpan;
     if ($rowSpan > 0) {
         echo ZurmoHtml::openTag('th', $options);
         $this->renderDataCellContent($row, $data);
         echo '</th>';
     }
 }
 public function renderLanguageRow($languageCode, $languageData = null)
 {
     if (!$languageData) {
         $languageData = $this->getLanguageDataByLanguageCode($languageCode);
     }
     $content = ZurmoHtml::openTag('li', array('id' => 'language-row-' . $languageCode));
     $content .= ZurmoHtml::tag('h4', array(), $languageData['label']);
     if ($languageData['active']) {
         if (isset($languageData['lastUpdateDatetime']) && !empty($languageData['lastUpdateDatetime'])) {
             $content .= ' - ' . Zurmo::t('ZurmoModule', 'Last updated on {date}', array('{date}' => $languageData['lastUpdateDatetime']));
         }
         if ($languageCode != Yii::app()->sourceLanguage) {
             if (!Yii::app()->languageHelper->canDeactivateLanguage($languageCode)) {
                 $content .= ' - ' . Zurmo::t('ZurmoModule', 'Language in use.');
             }
             $content .= $this->renderUpdateButton($languageCode, $languageData);
             $content .= $this->renderDeactivateButton($languageCode, $languageData);
         }
     } else {
         $content .= $this->renderActivateButton($languageCode, $languageData);
     }
     $content .= ZurmoHtml::closeTag('li');
     return $content;
 }
Ejemplo n.º 19
0
 protected function renderMenuRecursive($items)
 {
     foreach ($items as $item) {
         echo ZurmoHtml::openTag('li', isset($item['itemOptions']) ? $item['itemOptions'] : array());
         if (isset($item['linkOptions'])) {
             $htmlOptions = $item['linkOptions'];
         } else {
             $htmlOptions = array();
         }
         $resolvedLabelContent = '<span>' . $item['label'] . static::resolveAndGetSpanAndDynamicLabelContent($item) . '</span>';
         if (isset($item['ajaxLinkOptions'])) {
             echo ZurmoHtml::ajaxLink($resolvedLabelContent, $item['url'], $item['ajaxLinkOptions'], $htmlOptions);
         } elseif (isset($item['url'])) {
             echo ZurmoHtml::link('<span></span>' . $resolvedLabelContent, $item['url'], $htmlOptions);
         } else {
             echo ZurmoHtml::link($resolvedLabelContent, "javascript:void(0);", $htmlOptions);
         }
         if (isset($item['items']) && count($item['items'])) {
             echo "\n" . ZurmoHtml::openTag('ul', $this->submenuHtmlOptions) . "\n";
             $this->renderMenuRecursive($item['items']);
             echo ZurmoHtml::closeTag('ul') . "\n";
         }
         echo ZurmoHtml::closeTag('li') . "\n";
     }
 }
 protected function renderLeadingHeaders()
 {
     $previousGroupByValuesCount = 1;
     for ($i = 0; $i < count($this->leadingHeaders['rows']); $i++) {
         echo ZurmoHtml::openTag('tr');
         for ($j = 0; $j < $this->leadingHeaders['axisCrossingColumnCount']; $j++) {
             echo ZurmoHtml::tag('th', array(), null);
         }
         for ($k = 0; $k < $previousGroupByValuesCount; $k++) {
             foreach ($this->leadingHeaders['rows'][$i]['groupByValues'] as $value) {
                 echo ZurmoHtml::tag('th', array('colspan' => $this->leadingHeaders['rows'][$i]['colSpan']), $value);
             }
         }
         $previousGroupByValuesCount = count($this->leadingHeaders['rows'][$i]['groupByValues']);
         if ($i == 0 && isset($this->leadingHeaders['renderTotalColumn']) && $this->leadingHeaders['renderTotalColumn']) {
             $lastRow = end($this->leadingHeaders['rows']);
             $colSpanForTotal = $lastRow['colSpan'];
             echo ZurmoHtml::tag('th', array('class' => 'total-column', 'colspan' => $colSpanForTotal, 'rowspan' => count($this->leadingHeaders['rows'])), Zurmo::t('Core', 'Total'));
         }
         echo '</tr>';
     }
 }
 protected function resolveTdCloseAndOpenContentForHorizontalLayout()
 {
     if ($this->getLayout() == 'horizontal') {
         $urlToImage = PlaceholderImageUtil::resolveTransparentImageUrl(true);
         $content = ZurmoHtml::closeTag('td');
         $content .= ZurmoHtml::openTag('td', array('class' => 'social-horizontal-expander'));
         $content .= ZurmoHtml::image($urlToImage, '', array('width' => '15', 'height' => '15'));
         $content .= ZurmoHtml::closeTag('td');
         $content .= ZurmoHtml::openTag('td');
         return $content;
     }
 }
 protected function resolveAndRenderTaskCardDetailsStatusContent(Task $task, $row)
 {
     $statusContent = $this->renderCardDataContent($this->cardColumns['status'], $task, $row);
     if ($statusContent != null) {
         $content = ZurmoHtml::openTag('div', array('class' => 'task-action-toolbar pillbox'));
         $content .= $this->renderCardDataContent($this->cardColumns['status'], $task, $row);
         $content .= ZurmoHtml::closeTag('div');
         return $content;
     }
 }
Ejemplo n.º 23
0
 protected function renderMenuRecursive($items)
 {
     $item = $items[0];
     $options = isset($item['itemOptions']) ? $item['itemOptions'] : array();
     $class = array();
     if ($item['active'] && $this->activeCssClass != '') {
         $class[] = $this->activeCssClass;
     }
     if ($class !== array()) {
         if (empty($options['class'])) {
             $options['class'] = implode(' ', $class);
         } else {
             $options['class'] .= ' ' . implode(' ', $class);
         }
     }
     if (isset($item['itemOptions']['iconClass'])) {
         $icon = ZurmoHtml::tag('i', array('class' => $item['itemOptions']['iconClass']), null);
     } else {
         $icon = null;
     }
     if (!isset($item['dynamicLabel'])) {
         $item['dynamicLabel'] = null;
     }
     if (isset($item['url'])) {
         $label = $this->linkLabelWrapper === null ? $item['label'] : CHtml::tag($this->linkLabelWrapper, $this->linkLabelWrapperHtmlOptions, $item['label']);
         $label = ZurmoHtml::tag('span', array('class' => 'button-label'), $label);
         echo CHtml::link($icon . $label . $item['dynamicLabel'], $item['url'], array('class' => 'button-action'));
         $spanForTrigger = null;
     } else {
         $item['linkOptions']['class'] = 'button-label';
         $spanForTrigger = $icon;
         $spanForTrigger .= CHtml::tag('span', isset($item['linkOptions']) ? $item['linkOptions'] : array(), $item['label']);
         // Not Coding Standard
         $spanForTrigger .= $item['dynamicLabel'];
     }
     if (isset($item['items']) && count($item['items']) || isset($item['dynamicContent'])) {
         $label = null;
         if ($this->renderIconTrigger) {
             $label = ZurmoHtml::tag('i', array('class' => 'icon-trigger'), null);
         }
         if (isset($spanForTrigger)) {
             echo ZurmoHtml::link($spanForTrigger . $label, null, array('class' => 'button-action-trigger'));
         } else {
             echo ZurmoHtml::link($label, null, array('class' => 'button-trigger'));
         }
         echo ZurmoHtml::openTag('ul', isset($item['submenuOptions']) ? $item['submenuOptions'] : $this->submenuHtmlOptions);
         if (isset($item['dynamicContent'])) {
             echo ZurmoHtml::openTag('li');
             echo $item['dynamicContent'];
             echo ZurmoHtml::closeTag('li');
         }
         if (isset($item['items']) && count($item['items'])) {
             foreach ($item['items'] as $item) {
                 $options = isset($item['itemOptions']) ? $item['itemOptions'] : array();
                 $class = array();
                 if ($item['active'] && $this->activeCssClass != '') {
                     $class[] = $this->activeCssClass;
                 }
                 if ($class !== array()) {
                     if (empty($options['class'])) {
                         $options['class'] = implode(' ', $class);
                     } else {
                         $options['class'] .= ' ' . implode(' ', $class);
                     }
                 }
                 echo ZurmoHtml::openTag('li', $options);
                 echo $this->renderMenuItem($item);
                 echo ZurmoHtml::closeTag('li');
             }
         }
         echo ZurmoHtml::closeTag('ul');
     }
 }
Ejemplo n.º 24
0
 protected function renderSubMenu(array $item)
 {
     $nestedUlOpen = null;
     $nestedUlClose = null;
     if ($this->doRenderMenuHeader($item)) {
         // only nest it if we rendered the header, no point in nesting it if we didn't.
         $nestedUlOpen = "\n" . ZurmoHtml::openTag('ul', $this->submenuHtmlOptions) . "\n";
         $nestedUlClose = ZurmoHtml::closeTag('ul') . "\n";
     }
     echo $nestedUlOpen;
     $this->renderMenuRecursive($item['items']);
     echo $nestedUlClose;
 }
Ejemplo n.º 25
0
 /**
  * @param $attributeData
  * @return string
  */
 public static function getPlacedAttributeContent($attributeData)
 {
     $label = ZurmoHtml::tag('label', array(), Zurmo::t('ContactWebFormsModule', 'Label'));
     $value = ZurmoHtml::tag('label', array(), Zurmo::t('Core', 'Value'));
     $content = ZurmoHtml::openTag('li');
     $content .= ZurmoHtml::openTag('div', array('class' => 'dynamic-row webform-chosen-field clearfix'));
     $content .= ZurmoHtml::tag('span', array('class' => 'is-required-checkbox'), $attributeData['{isRequiredElement}']);
     $content .= ZurmoHtml::tag('span', array('class' => 'field-label'), $label . $attributeData['{attributeLabelElement}']);
     $content .= ZurmoHtml::tag('span', array('class' => 'is-hidden-checkbox'), $attributeData['{isHiddenElement}']);
     $content .= ZurmoHtml::openTag('span', array('id' => 'hiddenAttributeElement_' . $attributeData['{attributeName}'], 'class' => 'hidden-field-label', 'style' => $attributeData['{hideHiddenAttributeElementStyle}']));
     $content .= $value . $attributeData['{renderHiddenAttributeElement}'];
     $content .= ZurmoHtml::closeTag('span');
     $content .= $attributeData['{removePlacedAttributeLink}'];
     $content .= ZurmoHtml::closeTag('li');
     return $content;
 }
Ejemplo n.º 26
0
 protected function renderForm()
 {
     $this->renderScripts();
     list($form, $formStart) = $this->controller->renderBeginWidget('ZurmoActiveForm', array('id' => 'image-edit-form', 'enableAjaxValidation' => true, 'clientOptions' => array('validateOnSubmit' => true, 'validateOnChange' => false, 'beforeValidate' => 'js:$(this).beforeValidateAction', 'afterValidate' => 'js:$(this).afterValidateAjaxAction', 'afterValidateAjax' => $this->renderConfigSaveAjax())));
     $src = ImageFileModelUtil::getUrlForGetImageFromImageFileName($this->model->getImageCacheFileName());
     $content = $formStart;
     $content .= ZurmoHtml::openTag('div', array('class' => 'form-inputs right-column'));
     $content .= ZurmoHtml::openTag('div', array('class' => 'image-resize-field clearfix'));
     $content .= $form->labelEx($this->formModel, 'cropX');
     $content .= $form->numberField($this->formModel, 'cropX');
     $content .= $form->error($this->formModel, 'cropX');
     $content .= ZurmoHtml::closeTag('div');
     $content .= ZurmoHtml::openTag('div', array('class' => 'image-resize-field clearfix'));
     $content .= $form->labelEx($this->formModel, 'cropY');
     $content .= $form->numberField($this->formModel, 'cropY');
     $content .= $form->error($this->formModel, 'cropY');
     $content .= ZurmoHtml::closeTag('div');
     $content .= ZurmoHtml::openTag('div', array('class' => 'image-resize-field clearfix'));
     $content .= $form->labelEx($this->formModel, 'cropWidth');
     $content .= $form->numberField($this->formModel, 'cropWidth');
     $content .= $form->error($this->formModel, 'cropWidth');
     $content .= ZurmoHtml::closeTag('div');
     $content .= ZurmoHtml::openTag('div', array('class' => 'image-resize-field clearfix'));
     $content .= $form->labelEx($this->formModel, 'cropHeight');
     $content .= $form->numberField($this->formModel, 'cropHeight');
     $content .= $form->error($this->formModel, 'cropHeight');
     $content .= ZurmoHtml::closeTag('div');
     $content .= ZurmoHtml::openTag('div', array('class' => 'image-resize-field clearfix'));
     $content .= $form->labelEx($this->formModel, 'imageWidth');
     $content .= $form->numberField($this->formModel, 'imageWidth');
     $content .= $form->error($this->formModel, 'imageWidth');
     $content .= ZurmoHtml::closeTag('div');
     $content .= ZurmoHtml::openTag('div', array('class' => 'image-resize-field clearfix'));
     $content .= $form->labelEx($this->formModel, 'imageHeight');
     $content .= $form->numberField($this->formModel, 'imageHeight');
     $content .= $form->error($this->formModel, 'imageHeight');
     $content .= ZurmoHtml::closeTag('div');
     $content .= ZurmoHtml::openTag('div', array('class' => 'image-resize-field clearfix'));
     $content .= $form->labelEx($this->formModel, 'lockImageProportion');
     $content .= $form->checkBox($this->formModel, 'lockImageProportion');
     $content .= $form->error($this->formModel, 'lockImageProportion');
     $content .= ZurmoHtml::closeTag('div');
     $content .= ZurmoHtml::closeTag('div');
     $content .= ZurmoHtml::tag('div', array('class' => 'left-column'), ZurmoHtml::image($src, '', array('class' => 'crop-and-resize')));
     $linkOptions = array('onclick' => "\$(this).addClass('attachLoadingTarget').closest('form').submit()", 'class' => 'z-button');
     $content .= ZurmoHtml::openTag('div', array('class' => 'view-toolbar-container clearfix'));
     $content .= ZurmoHtml::openTag('div', array('class' => 'form-toolbar'));
     $content .= ZurmoHtml::link(ZurmoHtml::tag('span', array('class' => 'z-label'), Zurmo::t('Core', 'Save')), "#", $linkOptions);
     $content .= ZurmoHtml::closeTag('div');
     $content .= ZurmoHtml::closeTag('div');
     $content .= $this->controller->renderEndWidget();
     return $content;
 }
 protected function renderRightSideTopContent()
 {
     $content = null;
     $content .= ZurmoHtml::openTag('div', array('class' => 'wide form'));
     $clipWidget = new ClipWidget();
     list($form, $formStart) = $clipWidget->renderBeginWidget('ZurmoActiveForm', array_merge(array('id' => static::getRightSideFormId()), $this->resolveActiveFormAjaxValidationOptions()));
     $content .= $formStart;
     $content .= $this->renderStatusContent($form);
     $content .= $this->renderOwnerContent($form);
     $content .= $this->renderRequestedByUserContent($form);
     $content .= $this->renderDueDateTimeContent($form);
     $content .= $this->renderNotificationSubscribersContent();
     $formEnd = $clipWidget->renderEndWidget();
     $content .= $formEnd;
     $content .= ZurmoHtml::closeTag('div');
     return $content;
 }
 protected function renderLeadingHeaders()
 {
     $previousGroupByValuesCount = 1;
     for ($i = 0; $i < count($this->leadingHeaders['rows']); $i++) {
         echo ZurmoHtml::openTag('tr');
         for ($j = 0; $j < $this->leadingHeaders['axisCrossingColumnCount']; $j++) {
             echo ZurmoHtml::tag('th', array(), null);
         }
         for ($k = 0; $k < $previousGroupByValuesCount; $k++) {
             foreach ($this->leadingHeaders['rows'][$i]['groupByValues'] as $value) {
                 echo ZurmoHtml::tag('th', array('colspan' => $this->leadingHeaders['rows'][$i]['colSpan']), $value);
             }
         }
         $previousGroupByValuesCount = count($this->leadingHeaders['rows'][$i]['groupByValues']);
         echo '</tr>';
     }
 }
Ejemplo n.º 29
0
 protected function renderContentStartFormDiv()
 {
     return ZurmoHtml::openTag('div', array('class' => 'wide form'));
 }