} else {
    ?>
<a href="<?php 
    echo $d->href;
    ?>
" <?php 
    echo $class;
    ?>
>
	<?php 
    if ($d->downloadImg !== '') {
        ?>
		<img src="<?php 
        echo $d->downloadImg;
        ?>
" alt="<?php 
        echo $d->title;
        ?>
" />
	<?php 
    } else {
        ?>
		<?php 
        echo FabrikHelperHTML::icon('icon-download icon-white') . ' ' . FText::_('PLG_ELEMENT_FILEUPLOAD_DOWNLOAD');
        ?>
	<?php 
    }
    ?>
</a>
<?php 
}
Ejemplo n.º 2
0
        ?>
" name="annonymous[]" class="inputbox" value="1" />
					<?php 
    }
    ?>
				</td>
			</tr>
		<?php 
}
?>

		<tr>
			<td colspan="2">
				<button class="button btn btn-success submit" style="margin-left:0">
					<?php 
echo FabrikHelperHTML::icon('icon-comments-2');
?>
					<?php 
echo FText::_('PLG_FORM_COMMENT_POST_COMMENT');
?>
				</button>
				<input type="hidden" name="reply_to" value="<?php 
echo $d->replyTo;
?>
" />
				<input type="hidden" name="renderOrder" value="<?php 
echo $d->renderOrder;
?>
" />
			</td>
		</tr>
Ejemplo n.º 3
0
    }
    ?>
			<table class="filtertable table table-striped">
				<thead>
				<tr class="fabrik___heading">
					<th><?php 
    echo FText::_('COM_FABRIK_SEARCH');
    ?>
:</th>
					<th style="text-align:right">
						<?php 
    if ($d->showClearFilters) {
        ?>
							<a class="clearFilters" href="#">
								<?php 
        echo FabrikHelperHTML::icon('icon-refresh', FText::_('COM_FABRIK_CLEAR'));
        ?>
							</a>
						<?php 
    }
    ?>
					</th>
				</tr>
				</thead>
				<tfoot>
				<tr>
					<td colspan="2"></td>
				</tr>
				</tfoot>
				<?php 
    $c = 0;
Ejemplo n.º 4
0
 /**
  * Create the form bottom hidden fields
  *
  * @param   object &$form Object containing form view properties
  *
  * @return  void
  */
 protected function _loadTmplBottom(&$form)
 {
     $input = $this->app->input;
     $itemId = FabrikWorker::itemId();
     /** @var FabrikFEModelForm $model */
     $model = $this->getModel();
     $listModel = $model->getListModel();
     $row = JArrayHelper::toObject($model->data);
     $canDelete = $listModel->canDelete($row);
     $params = $model->getParams();
     $task = 'form.process';
     $refer = $input->server->get('HTTP_REFERER', '', 'string');
     // $$$rob - if returning from a failed validation then we should use the fabrik_referrer post var
     $refer = str_replace('&', '&amp;', $input->get('fabrik_referrer', $refer, 'string'));
     $thisRowId = is_array($model->getRowId()) ? implode('|', $model->getRowId()) : $model->getRowId();
     $fields = array();
     $fields[] = '<input type="hidden" name="listid" value="' . $listModel->getId() . '" />';
     $fields[] = '<input type="hidden" name="listref" value="' . $listModel->getId() . '" />';
     $fields[] = '<input type="hidden" name="rowid" value="' . $thisRowId . '" />';
     $fields[] = '<input type="hidden" name="Itemid" value="' . $itemId . '" />';
     $fields[] = '<input type="hidden" name="option" value="com_' . $this->package . '" />';
     $fields[] = '<input type="hidden" name="task" value="' . $task . '" />';
     $fields[] = '<input type="hidden" name="isMambot" value="' . $this->isMambot . '" />';
     $fields[] = '<input type="hidden" name="formid" value="' . $model->get('id') . '" />';
     $fields[] = '<input type="hidden" name="returntoform" value="0" />';
     $fields[] = '<input type="hidden" name="fabrik_referrer" value="' . $refer . '" />';
     $fields[] = '<input type="hidden" name="fabrik_ajax" value="' . (int) $model->isAjax() . '" />';
     $fields[] = '<input type="hidden" name="package" value="' . $this->app->getUserState('com_fabrik.package', 'fabrik') . '" />';
     $fields[] = '<input type="hidden" name="packageId" value="' . $model->packageId . '" />';
     if ($useKey = FabrikWorker::getMenuOrRequestVar('usekey', '')) {
         // $$$rob v's been set from -1 to the actual row id - so ignore usekey not sure if we should comment this out
         // see http://fabrikar.com/forums/showthread.php?t=10297&page=5
         $fields[] = '<input type="hidden" name="usekey" value="' . $useKey . '" />';
         $pk_val = FArrayHelper::getValue($model->data, $listModel->getPrimaryKey(true));
         if (empty($pk_val)) {
             $fields[] = '<input type="hidden" name="usekey_newrecord" value="1" />';
         }
     }
     /** $$$ hugh - testing a fix for pagination issue when submitting a 'search form'.
      * If this is a search form, we need to clear 'limitstart', otherwise ... say we
      * were last on page 4 of the (unfiltered) target table, and the search yields less than 4 pages,
      * we end up with a blank table 'cos the wrong LIMIT's are applied to the query
      */
     $saveInSessions = $params->get('save_insession', '');
     if (is_array($saveInSessions)) {
         foreach ($saveInSessions as $saveInSession) {
             if ($saveInSession == '1') {
                 $fields[] = '<input type="hidden" name="limitstart" value="0" />';
                 break;
             }
         }
     }
     $fields[] = JHTML::_('form.token');
     $resetLabel = FText::_($params->get('reset_button_label'));
     $resetIcon = $params->get('reset_icon', '');
     $copyLabel = FText::_($params->get('copy_button_label'));
     $copyIcon = $params->get('copy_icon', '');
     $applyLabel = FText::_($params->get('apply_button_label'));
     $applyIcon = $params->get('apply_icon', '');
     $deleteLabel = FText::_($params->get('delete_button_label', 'Delete'));
     $deleteIcon = $params->get('delete_icon', '');
     $goBackLabel = FText::_($params->get('goback_button_label'));
     $goBackIcon = $params->get('goback_icon', '');
     $btnLayout = FabrikHelperHTML::getLayout('fabrik-button');
     if ($resetIcon !== '') {
         $resetIcon = FabrikHelperHTML::icon($resetIcon);
         $before = $params->get('reset_icon_location', 'before') == 'before';
         $resetLabel = $before ? $resetIcon . '&nbsp;' . $resetLabel : $resetLabel . '&nbsp;' . $resetIcon;
     }
     $layoutData = (object) array('type' => 'reset', 'class' => 'btn-warning button', 'name' => 'Reset', 'label' => $resetLabel);
     $form->resetButton = $params->get('reset_button', 0) && $this->editable == '1' ? $btnLayout->render($layoutData) : '';
     if ($copyIcon !== '') {
         $copyIcon = FabrikHelperHTML::icon($copyIcon);
         $copyLabel = $params->get('copy_icon_location', 'before') == 'before' ? $copyIcon . '&nbsp;' . $copyLabel : $copyLabel . '&nbsp;' . $copyIcon;
     }
     $layoutData = (object) array('type' => 'submit', 'class' => 'button', 'name' => 'Copy', 'label' => $copyLabel);
     $form->copyButton = $params->get('copy_button', 0) && $this->editable && $model->getRowId() != '' ? $btnLayout->render($layoutData) : '';
     if ($applyIcon !== '') {
         $applyIcon = FabrikHelperHTML::icon($applyIcon);
         $before = $params->get('apply_icon_location', 'before') == 'before';
         $applyLabel = $before ? $applyIcon . '&nbsp;' . $applyLabel : $applyLabel . '&nbsp;' . $applyIcon;
     }
     $layoutData = (object) array('type' => $model->isAjax() ? 'button' : 'submit', 'class' => 'button', 'name' => 'apply', 'label' => $applyLabel);
     $form->applyButton = $params->get('apply_button', 0) && $this->editable ? $btnLayout->render($layoutData) : '';
     if ($deleteIcon !== '') {
         $deleteIcon = FabrikHelperHTML::icon($deleteIcon);
         $before = $params->get('delete_icon_location', 'before') == 'before';
         $deleteLabel = $before ? $deleteIcon . '&nbsp;' . $deleteLabel : $deleteLabel . '&nbsp;' . $deleteIcon;
     }
     $layoutData = (object) array('type' => 'submit', 'class' => 'btn-danger button', 'name' => 'delete', 'label' => $deleteLabel);
     $form->deleteButton = $params->get('delete_button', 0) && $canDelete && $this->editable && $thisRowId != '' ? $btnLayout->render($layoutData) : '';
     if ($goBackIcon !== '') {
         $goBackIcon = FabrikHelperHTML::icon($goBackIcon);
         $before = $params->get('goback_icon_location', 'before') == 'before';
         $goBackLabel = $before ? $goBackIcon . '&nbsp;' . $goBackLabel : $goBackLabel . '&nbsp;' . $goBackIcon;
     }
     $layoutData = (object) array('type' => 'button', 'class' => 'button', 'name' => 'Goback', 'label' => $goBackLabel, 'attributes' => $model->isAjax() ? '' : FabrikWorker::goBackAction());
     $form->gobackButton = $params->get('goback_button', 0) ? $btnLayout->render($layoutData) : '';
     if ($model->isEditable() && $params->get('submit_button', 1)) {
         $submitClass = FabrikString::clean($form->submit_button_label);
         $submitIcon = $params->get('save_icon', '');
         $submitLabel = FText::_($form->submit_button_label);
         if ($submitIcon !== '') {
             $submitIcon = FabrikHelperHTML::icon($submitIcon);
             $before = $params->get('save_icon_location', 'before') == 'before';
             $submitLabel = $before ? $submitIcon . '&nbsp;' . $submitLabel : $submitLabel . '&nbsp;' . $submitIcon;
         }
         $layoutData = (object) array('type' => $model->isAjax() ? 'button' : 'submit', 'class' => 'btn-primary button ' . $submitClass, 'name' => 'Submit', 'label' => $submitLabel);
         $form->submitButton = $btnLayout->render($layoutData);
     } else {
         $form->submitButton = '';
     }
     if ($this->isMultiPage) {
         $layoutData = (object) array('type' => 'button', 'class' => 'fabrikPagePrevious button', 'name' => 'fabrikPagePrevious', 'label' => FabrikHelperHTML::icon('icon-previous', FText::_('COM_FABRIK_PREV')));
         $form->prevButton = $btnLayout->render($layoutData);
         $layoutData = (object) array('type' => 'button', 'class' => 'fabrikPageNext button', 'name' => 'fabrikPageNext', 'label' => FText::_('COM_FABRIK_NEXT') . '&nbsp;' . FabrikHelperHTML::icon('icon-next'));
         $form->nextButton = $btnLayout->render($layoutData);
     } else {
         $form->nextButton = '';
         $form->prevButton = '';
     }
     // $$$ hugh - hide actions section is we're printing, or if not actions selected
     $noButtons = empty($form->nextButton) && empty($form->prevButton) && empty($form->submitButton) && empty($form->gobackButton) && empty($form->deleteButton) && empty($form->applyButton) && empty($form->copyButton) && empty($form->resetButton);
     $this->hasActions = $input->get('print', '0') == '1' || $noButtons ? false : true;
     $format = $model->isAjax() ? 'raw' : 'html';
     $fields[] = '<input type="hidden" name="format" value="' . $format . '" />';
     $groups = $model->getGroupsHiarachy();
     foreach ($groups as $groupModel) {
         if ($groupModel->isJoin()) {
             $groupPk = $groupModel->getJoinModel()->getForeignId();
             // Use raw otherwise we inject the actual <input> into the hidden field's value
             $groupPk .= '_raw';
             $groupRowIds = (array) FArrayHelper::getValue($this->data, $groupPk, array());
             $groupRowIds = htmlentities(json_encode($groupRowIds));
             // Used to check against in group process(), when deleting removed repeat groups
             $fields[] = '<input type="hidden" name="fabrik_group_rowids[' . $groupModel->getId() . ']" value="' . $groupRowIds . '" />';
         }
         $group = $groupModel->getGroup();
         $c = $groupModel->repeatTotal;
         // Used for validations
         $fields[] = '<input type="hidden" name="fabrik_repeat_group[' . $group->id . ']" value="' . $c . '" id="fabrik_repeat_group_' . $group->id . '_counter" />';
     }
     // $$$ hugh - testing social_profile_hash stuff
     if ($input->get('fabrik_social_profile_hash', '') != '') {
         $fields[] = '<input type="hidden" name="fabrik_social_profile_hash" value="' . $input->get('fabrik_social_profile_hash', '') . '" id="fabrik_social_profile_hash" />';
     }
     $this->_cryptQueryString($fields);
     $this->_cryptViewOnlyElements($fields);
     $this->hiddenFields = implode("\n", $fields);
 }
Ejemplo n.º 5
0
            echo FabrikHelperHTML::icon('icon-refresh');
            ?>
 <?php 
            echo FText::_('COM_FABRIK_CLEAR');
            ?>
	  			</a>
	  		</th>
	  	</tr>
	  </thead>

	  <tfoot>
	  	<tr>
	  		<th colspan="2" style="text-align:right;">
	  			<button type="submit" class="btn btn-primary">
				    <?php 
            echo FabrikHelperHTML::icon('icon-filter');
            ?>
 <?php 
            echo FText::_('COM_FABRIK_GO');
            ?>
	  			</button>
	  		</th>
	  	</tr>
	  </tfoot>

	  <tbody>
	  <?php 
            $c = 0;
            foreach ($filters as $filter) {
                $required = $filter->required == 1 ? ' class="notempty"' : '';
                ?>
<?php

/**
 * Layout for modal filter state, per element
 *
 * @package     Joomla
 * @subpackage  Fabrik
 * @copyright   Copyright (C) 2005-2016 fabrikar.com - All rights reserved.
 * @license     GNU/GPL http://www.gnu.org/copyleft/gpl.html
 */
$d = $displayData;
?>
<span class="label label-inverse">
	<span data-modal-state-label><?php 
echo $d->label;
?>
</span>:
	<span data-modal-state-value><?php 
echo $d->displayValue . ' ';
?>
</span>
	<a data-filter-clear="<?php 
echo $d->key;
?>
" href="#" style="color: white;">
		<?php 
echo FabrikHelperHTML::icon('icon-cancel', '', 'style="text-align: right; "');
?>
	</a>
</span>
Ejemplo n.º 7
0
 /**
  * Get to field
  *
  * @return string
  */
 public function getToField()
 {
     $input = $this->app->input;
     $this->_type = 'table';
     $this->_id = $input->getInt('id', 0);
     $params = $this->getParams();
     $toType = $this->_toType();
     if ($toType == 'field') {
         $to = $this->_emailTo();
         switch ($params->get('emailtable_email_to_field_how', 'readonly')) {
             case 'editable':
                 $input = '<input type="text" name="list_email_to" id="list_email_to" value="' . $to . '" />';
                 break;
             case 'hidden':
                 $input = '<input name="list_email_to" id="list_email_to" value="' . $to . '" type="hidden" />';
                 break;
             case 'readonly':
             default:
                 $input = '<input type="text" name="list_email_to" id="list_email_to" value="' . $to . '" readonly="readonly" />';
                 break;
         }
         return $input;
     } elseif ($toType == 'list') {
         return $this->formModel->getElementList('list_email_to');
     } elseif ($toType == 'table' || $toType == 'table_picklist') {
         $table = $params->get('emailtable_to_table_table');
         $tableEmail = $params->get('emailtable_to_table_email');
         $tableName = $params->get('emailtable_to_table_name');
         $toTableModel = JModelLegacy::getInstance('list', 'FabrikFEModel');
         $toTableModel->setId($table);
         $toDb = $toTableModel->getDb();
         $tableName = FabrikString::safeColName($tableName);
         $tableEmail = FabrikString::safeColName($tableEmail);
         $emailTableTo_table = $toDb->qn($toTableModel->getTable()->db_table_name);
         $query = $toDb->getQuery(true);
         $query->select($tableEmail . ' AS email, ' . $tableName . ' AS name')->from($emailTableTo_table)->order('name ASC');
         $toDb->setQuery($query);
         $results = $toDb->loadObjectList();
         if (empty($results)) {
             return FText::_('PLG_LIST_EMAIL_TO_TABLE_NO_DATA');
         }
         $empty = new stdClass();
         $attribs = 'class="fabrikinput inputbox input-medium" multiple="multiple" size="5"';
         if ($toType == 'table_picklist') {
             $html = '<div class="pull-left" style="margin:0 20px 20px 0">';
             $html .= JHTML::_('select.genericlist', $results, 'email_to_selectfrom[]', $attribs, 'email', 'name', '', 'email_to_selectfrom');
             $html .= '<br /><a href="#" class="btn btn-small" id="email_add">' . FabrikHelperHTML::icon('icon-plus') . ' ' . FText::_('COM_FABRIK_ADD') . ' &gt;&gt;</a>';
             $html .= '</div>';
             $html .= '<div class="span6">';
             $html .= JHTML::_('select.genericlist', $empty, 'list_email_to[]', $attribs, 'email', 'name', '', 'list_email_to');
             $html .= '<br /><a href="#" class="btn btn-small" id="email_remove">&lt;&lt; ' . FText::_('COM_FABRIK_DELETE') . ' ' . FabrikHelperHTML::icon('icon-delete') . '</a>';
             $html .= '</div>';
             $html .= '<div style="clear:both"></div>';
         } else {
             $attribs = 'class="fabrikinput inputbox input-large" multiple="multiple" size="5"';
             $html = JHTML::_('select.genericlist', $results, 'list_email_to[]', $attribs, 'email', 'name', '', 'list_email_to');
         }
         return $html;
     }
 }
Ejemplo n.º 8
0
}
if ($this->params->get('show_week', true)) {
    ?>
				<button class="btn weekViewLink"><?php 
    echo FabrikHelperHTML::icon('icon-list');
    ?>
 <?php 
    echo FText::_('PLG_VISUALIZATION_CALENDAR_WEEK');
    ?>
</button>
				<?php 
}
if ($this->params->get('show_month', true)) {
    ?>
				<button class="btn monthViewLink"><?php 
    echo FabrikHelperHTML::icon('icon-calendar');
    ?>
 <?php 
    echo FText::_('PLG_VISUALIZATION_CALENDAR_MONTH');
    ?>
</button>
				<?php 
}
?>
			</div>
		</div>
	</div>

	<?php 
if ($row->intro_text != '') {
    ?>
Ejemplo n.º 9
0
 /**
  * Get the tag icon
  *
  * @return string
  */
 protected function tagIcon()
 {
     $params = $this->getParams();
     $icon = $params->get('tag_icon', '');
     $icon = $icon === '' ? '' : FabrikHelperHTML::icon($icon);
     return $icon;
 }
Ejemplo n.º 10
0
 /**
  * Render the element admin settings
  *
  * @param   array  $data          Admin data
  * @param   int    $repeatCounter Repeat plugin counter
  * @param   string $mode          How the fieldsets should be rendered currently support 'nav-tabs' (@since 3.1)
  *
  * @return  string    admin html
  */
 public function onRenderAdminSettings($data = array(), $repeatCounter = null, $mode = null)
 {
     $this->makeDbTable();
     $version = new JVersion();
     $j3 = version_compare($version->RELEASE, '3.0') >= 0 ? true : false;
     $type = str_replace('fabrik_', '', $this->_type);
     $form = $this->getPluginForm($repeatCounter);
     $repeatScript = '';
     // Copy over the data into the params array - plugin fields can have data in either
     // jform[params][name] or jform[name]
     $dontMove = array('width', 'height');
     if (!array_key_exists('params', $data)) {
         $data['params'] = array();
     }
     foreach ($data as $key => $val) {
         if (is_object($val)) {
             $val = isset($val->{$repeatCounter}) ? $val->{$repeatCounter} : '';
             $data['params'][$key] = $val;
         } else {
             if (is_array($val)) {
                 $data['params'][$key] = FArrayHelper::getValue($val, $repeatCounter, '');
             } else {
                 // Textarea now stores width/height in params, don't want to copy over old w/h values into the params array
                 if (!in_array($key, $dontMove)) {
                     $data['params'][$key] = $val;
                 }
             }
         }
     }
     // Bind the plugins data to the form
     $form->bind($data);
     // $$$ rob 27/04/2011 - listfields element needs to know things like the group_id, and
     // as bind() only saves the values from $data with a corresponding xml field we set the raw data as well
     $form->rawData = $data;
     $str = array();
     $repeatGroupCounter = 0;
     // Paul - If there is a string for plugin_DESCRIPTION then display this as a legend
     $inistr = strtoupper('PLG_' . $type . '_' . $this->_name . '_DESCRIPTION');
     $inival = FText::_($inistr);
     if ($inistr != $inival) {
         // Handle strings with HTML
         $inival2 = '';
         /**
          * $$$ hugh - this was blowing up with the massively useful error "Cannot parse
          * XML 0" and refusing to load the plugin if the description has any non-XML-ish HTML
          * markup, or if there was some malformed HTML.  So redoing it with a regular expression,
          * which may not match on some formats, as I haven't done a huge amount of testing,
          * but at least it won't error out!
          */
         /*
         if (substr($inival, 0, 3) == '<p>' || substr($inival, 0, 3) == '<p ')
         {
         	$xml = new SimpleXMLElement('<xml>' . $inival . '</xml>');
         	$lines = $xml->xpath('/xml/p[position()<2]');
         
         	while (list( , $node) = each($lines))
         	{
         		$legend = $node;
         	}
         
         	$inival2 = str_replace($legend, '', $inival);
         	$inival = $legend;
         }
         */
         $p_re = '#^\\s*(<p\\s*\\S*\\s*>.*?</p>)#i';
         $matches = array();
         if (preg_match($p_re, $inival, $matches)) {
             $inival2 = preg_replace($p_re, '', $inival);
             $inival = $matches[1];
         } elseif (substr($inival, 0, 1) != '<' && strpos($inival, '<br') > 0) {
             // Separate first part for legend and convert rest to paras
             $lines = preg_split('/<br\\s*\\/\\s*>/', $inival, PREG_SPLIT_NO_EMPTY);
             $inival = $lines[0];
             unset($lines[0]);
             $inival2 = '<b><p>' . implode('</p>\\n<p>', $lines) . '<br/><br/></p></b>';
         }
         $str[] = '<legend>' . $inival . '</legend>';
         if ($inival2 != '') {
             $str[] = $inival2;
         }
     }
     if ($mode === 'nav-tabs') {
         $this->renderFromNavTabHeadings($form, $str, $repeatCounter);
         $str[] = '<div class="tab-content">';
     }
     $c = 0;
     $fieldsets = $form->getFieldsets();
     if (count($fieldsets) <= 1) {
         $mode = null;
     }
     // Filer the forms fieldsets for those starting with the correct $searchName prefix
     foreach ($fieldsets as $fieldset) {
         if ($mode === 'nav-tabs') {
             $tabClass = $c === 0 ? ' active' : '';
             $str[] = '<div role="tabpanel" class="tab-pane' . $tabClass . '" id="tab-' . $fieldset->name . '-' . $repeatCounter . '">';
         }
         $class = $j3 ? 'form-horizontal ' : 'adminform ';
         $class .= $type . 'Settings page-' . $this->_name;
         $repeat = isset($fieldset->repeatcontrols) && $fieldset->repeatcontrols == 1;
         // Bind data for repeat groups
         $repeatDataMax = 1;
         if ($repeat) {
             $opts = new stdClass();
             $opts->repeatmin = isset($fieldset->repeatmin) ? $fieldset->repeatmin : 1;
             $repeatScript[] = "new FbRepeatGroup('{$fieldset->name}', " . json_encode($opts) . ');';
             $repeatData = array();
             foreach ($form->getFieldset($fieldset->name) as $field) {
                 if ($repeatDataMax < count($field->value)) {
                     $repeatDataMax = count($field->value);
                 }
             }
             $form->bind($repeatData);
         }
         $id = isset($fieldset->name) ? ' id="' . $fieldset->name . '"' : '';
         $style = isset($fieldset->modal) && $fieldset->modal ? 'style="display:none"' : '';
         $str[] = '<fieldset class="' . $class . '"' . $id . ' ' . $style . '>';
         if ($mode == '' && $fieldset->label != '') {
             $str[] = '<legend>' . FText::_($fieldset->label) . '</legend>';
         }
         $form->repeat = $repeat;
         $j3 = FabrikWorker::j3();
         if ($repeat) {
             if ($j3) {
                 $str[] = '<a class="btn" href="#" data-button="addButton">' . FabrikHelperHTML::icon('icon-plus', FText::_('COM_FABRIK_ADD')) . '</a>';
                 $str[] = '<a class="btn" href="#" data-button="deleteButton">' . FabrikHelperHTML::icon('icon-minus', FText::_('COM_FABRIK_REMOVE')) . '</a>';
             } else {
                 $str[] = '<a class="addButton" href="#" data-button="addButton">' . FabrikHelperHTML::icon('icon-plus', FText::_('COM_FABRIK_ADD')) . '</a>';
             }
         }
         for ($r = 0; $r < $repeatDataMax; $r++) {
             if ($repeat) {
                 $str[] = '<div class="repeatGroup">';
                 $form->repeatCounter = $r;
             }
             if (!$j3) {
                 $str[] = '<ul class="adminformlist">';
             }
             foreach ($form->getFieldset($fieldset->name) as $field) {
                 if ($repeat) {
                     if (is_array($field->value)) {
                         if (array_key_exists($r, $field->value)) {
                             $field->setValue($field->value[$r]);
                         } else {
                             $field->setValue('');
                         }
                     }
                 }
                 if ($j3) {
                     $str[] = '<div class="control-group">';
                     $str[] = '<div class="control-label">' . $field->label . '</div>';
                     $str[] = '<div class="controls">' . $field->input . '</div>';
                     $str[] = '</div>';
                 } else {
                     $str[] = '<li>' . $field->label . $field->input . '</li>';
                 }
             }
             if ($repeat && !$j3) {
                 $str[] = '<li><a class="removeButton delete btn" href="#">' . FabrikHelperHTML::icon('icon-minus-sign', FText::_('COM_FABRIK_REMOVE')) . '</a></li>';
             }
             if (!$j3) {
                 $str[] = '</ul>';
             }
             if ($repeat) {
                 $str[] = "</div>";
             }
         }
         $str[] = '</fieldset>';
         if ($mode === 'nav-tabs') {
             $str[] = '</div>';
         }
         $c++;
     }
     if ($mode === 'nav-tabs') {
         $str[] = '</div>';
     }
     if (!empty($repeatScript)) {
         $repeatScript = "window.addEvent('domready', function () {\n" . implode("\n", $repeatScript) . "\n})\n";
         FabrikHelperHTML::script('administrator/components/com_fabrik/models/fields/repeatgroup.js', $repeatScript);
     }
     return implode("\n", $str);
 }
<?php

/**
 * Repeat group delete button
 */
defined('JPATH_BASE') or die;
$d = $displayData;
?>
<a class="deleteGroup btn btn-small btn-danger" href="#"  data-toggle="tooltip" title="<?php 
echo FText::_('COM_FABRIK_DELETE_GROUP');
?>
">
	<?php 
echo FabrikHelperHTML::icon('icon-minus');
?>
</a>
Ejemplo n.º 12
0
<?php

/**
 * Email form layout
 */
defined('JPATH_BASE') or die;
$d = $displayData;
?>
<a class="btn" data-fabrik-print href="<?php 
echo $d->link;
?>
">
	<?php 
echo FabrikHelperHTML::icon('icon-print', FText::_('COM_FABRIK_PRINT'));
?>
</a>
Ejemplo n.º 13
0
<?php

/**
 * Email form layout
 */
defined('JPATH_BASE') or die;
$d = $displayData;
if (!$d->popup) {
    ?>

	<a class="btn btn-default fabrikWin" rel='{"title":"<?php 
    echo FText::_('JGLOBAL_EMAIL');
    ?>
", "loadMethod":"iframe", "height":"300px"}' href="<?php 
    echo $d->link;
    ?>
">
		<?php 
    echo FabrikHelperHTML::icon('icon-envelope', FText::_('JGLOBAL_EMAIL'));
    ?>
	</a>

	<?php 
}
<?php

/**
 * Repeat group delete button for table format
 */
defined('JPATH_BASE') or die;
$d = $displayData;
?>
<a class="deleteGroup" href="#">
	<?php 
echo FabrikHelperHTML::icon('icon-minus fabrikTip tip-small', '', 'data-role="fabrik_delete_group" opts="{trigger: \'hover\'}" title="' . FText::_('COM_FABRIK_DELETE_GROUP') . '"');
?>
</a>
Ejemplo n.º 15
0
<?php

/**
 * Repeat group add button
 */
defined('JPATH_BASE') or die;
$d = $displayData;
?>
<a class="addGroup btn btn-small btn-success" href="#">
	<?php 
echo FabrikHelperHTML::icon('icon-plus fabrikTip tip-small', '', 'data-role="fabrik_duplicate_group" opts="{trigger: \'hover\'}" title="' . FText::_('COM_FABRIK_ADD_GROUP') . '"');
?>
</a>
Ejemplo n.º 16
0
    echo FabrikHelperHTML::icon('icon-eye-open');
    ?>
				<strong><?php 
    echo $group['name'];
    ?>
</strong>
			</a>
		</li>
		<?php 
    foreach ($group['elements'] as $element => $label) {
        ?>
		<li>
			<a data-toggle-col="<?php 
        echo $element;
        ?>
" data-toggle-parent-group="<?php 
        echo $group['name'];
        ?>
" data-toggle-state="open">
				<?php 
        echo FabrikHelperHTML::icon('icon-eye-open', $label);
        ?>
			</a>
		</li>
		<?php 
    }
}
?>
	</ul>
</li>
<?php

defined('JPATH_BASE') or die;
$d = $displayData;
?>
<div id="<?php 
echo $d->id;
?>
" class="fabrikSubElementContainer">
<?php 
if ($d->showNone) {
    if ($d->j3) {
        ?>
		<button class="btn btn-mini clearslider pull-left" style="margin-right:10px"><?php 
        echo FabrikHelperHTML::icon('icon-remove');
        ?>
</button>
		<?php 
    } else {
        ?>
		<div class="clearslider_cont">
			<img src="<?php 
        echo $d->outSrc;
        ?>
" style="cursor:pointer;padding:3px;"
				alt="<?php 
        echo FText::_('PLG_ELEMENT_SLIDER_CLEAR');
        ?>
" class="clearslider" />
		</div>
		<?php 
					<th class="span1 plupload_file_action">&nbsp;</th>
				</tr>
			</thead>
			<tbody class="plupload_filelist" id="<?php 
    echo $id;
    ?>
_dropList">
			</tbody>
			<tfoot>
				<tr>
					<td colspan="4">
								<a id="<?php 
    echo $id;
    ?>
_browseButton" class="btn btn-primary" href="#"><?php 
    echo FabrikHelperHTML::icon('icon-plus-sign icon-plus');
    ?>
						<?php 
    echo FText::_('PLG_ELEMENT_FILEUPLOAD_ADD_FILES');
    ?>
</a>
							<span class="plupload_upload_status"></span>
					</td>
				</tr>
			</tfoot>
		</table>
<?php 
} else {
    FabrikHelperHTML::stylesheet(COM_FABRIK_LIVESITE . 'plugins/fabrik_element/fileupload/lib/plupload/css/plupload.queue.css');
    ?>
		<div class="plupload_header">
								<a id="<?php 
    echo $id;
    ?>
_browseButton" class="btn btn-mini" href="#"><?php 
    echo FabrikHelperHTML::icon('icon-plus-sign icon-plus');
    ?>
						<?php 
    echo FText::_('PLG_ELEMENT_FILEUPLOAD_ADD_FILES');
    ?>
</a>
								<a id="<?php 
    echo $id;
    ?>
_startButton" class="btn btn-mini disabled plupload_start" data-action="plupload_start" href="#">
								<?php 
    echo FabrikHelperHTML::icon('icon-upload');
    ?>
						<?php 
    echo FText::_('PLG_ELEMENT_FILEUPLOAD_START_UPLOAD');
    ?>
</a>
							<span class="plupload_upload_status"></span>
					</td>
				</tr>
			</tfoot>
		</table>
<?php 
} else {
    FabrikHelperHTML::stylesheet(COM_FABRIK_LIVESITE . 'plugins/fabrik_element/fileupload/lib/plupload/css/plupload.queue.css');
    ?>
		<div class="plupload_header">
Ejemplo n.º 20
0
        if ($d->hidden) {
            ?>
			<input type="hidden" name="<?php 
            echo $d->name;
            ?>
" value="<?php 
            echo $d->value;
            ?>
" id="<?php 
            echo $d->id;
            ?>
" />
		<?php 
        } else {
            ?>
			<div class="input-append">
				<?php 
            echo $d->input;
            ?>
				<span class="add-on">
					<?php 
            echo FabrikHelperHTML::icon('icon-user');
            ?>
				</span>
			</div>
		<?php 
        }
    } else {
        echo $d->readOnly;
    }
}
Ejemplo n.º 21
0
<?php

/**
 * Repeat group add button
 */
defined('JPATH_BASE') or die;
$d = $displayData;
?>
<a class="addGroup btn btn-small btn-success" href="#">
	<?php 
echo FabrikHelperHTML::icon('icon-plus fabrikTip tip-small', '', 'opts="{trigger: \'hover\'}" title="' . FText::_('COM_FABRIK_ADD_GROUP') . '"');
?>
</a>
Ejemplo n.º 22
0
<?php

/**
 * Bootstrap List Template: Default Headings
 *
 * @package     Joomla
 * @subpackage  Fabrik
 * @copyright   Copyright (C) 2005-2015 fabrikar.com - All rights reserved.
 * @license     GNU/GPL http://www.gnu.org/copyleft/gpl.html
 * @since       3.0
 */
// No direct access
defined('_JEXEC') or die('Restricted access');
$btnLayout = $this->getModel()->getLayout('fabrik-button');
$layoutData = (object) array('class' => 'btn-info fabrik_filter_submit button', 'name' => 'filter', 'label' => FabrikHelperHTML::icon('icon-filter', FText::_('COM_FABRIK_GO')));
?>
	<tr class="fabrik___heading">
		<?php 
foreach ($this->headings as $key => $heading) {
    $h = $this->headingClass[$key];
    $style = empty($h['style']) ? '' : 'style="' . $h['style'] . '"';
    ?>
			<th class="heading <?php 
    echo $h['class'];
    ?>
" <?php 
    echo $style;
    ?>
>
				<span><?php 
    echo $heading;
?>
	id="<?php 
echo $d->id;
?>
" size="<?php 
echo $d->size;
?>
"
	value="<?php 
echo $d->value;
?>
" />

	<?php 
if (!$d->timerReadOnly) {
    ?>
	<button class="btn" id="<?php 
    echo $d->id;
    ?>
_button">
		<?php 
    echo FabrikHelperHTML::icon($d->icon);
    ?>
		 <span><?php 
    echo FText::_('PLG_ELEMENT_TIMER_START');
    ?>
</span>
	</button>
</div>
<?php 
}
?>
	<small><?php 
echo JHTML::date($d->comment->time_date, $d->dateFormat, 'UTC');
?>
</small>
	<?php 
if ($d->internalRating) {
    ?>
	<div class="rating">
	<?php 
    $r = (int) $d->comment->rating;
    for ($i = 0; $i < $r; $i++) {
        if ($d->j3) {
            ?>
			<?php 
            echo FabrikHelperHTML::icon('icon-star');
            ?>
		<?php 
        } else {
            ?>
<img src="' . $d->insrc . '" alt="star" />
		<?php 
        }
    }
    ?>
	</div>
	<?php 
}
?>
</div>
Ejemplo n.º 25
0
								<?php 
            echo FText::_('COM_FABRIK_ADD');
            ?>
 &gt;&gt;
							</a>
						</div>
						<div class="span6">
							<?php 
            echo JHtml::_('select.genericlist', $empty, 'list_email_to[]', $attribs, 'email', 'name', '', 'list_email_to');
            ?>
							<br /><a href="#" class="btn btn-small" id="email_remove">&lt;&lt;
								<?php 
            echo FText::_('COM_FABRIK_DELETE');
            ?>
 <?php 
            echo FabrikHelperHTML::icon('icon-delete');
            ?>
</a>
						</div>
					</div>
					<?php 
        } else {
            echo JHtml::_('select.genericlist', $results, 'list_email_to[]', 'class="fabrikinput inputbox input-large" multiple="multiple" size="5"', 'email', 'name', '', 'list_email_to');
        }
    }
}
if ($this->showSubject) {
    ?>
			<label>
				<?php 
    echo FText::_('PLG_LIST_EMAIL_SUBJECT');
Ejemplo n.º 26
0
<?php

/**
 * Email form layout
 */
defined('JPATH_BASE') or die;
$d = $displayData;
?>
<a href="<?php 
echo $d->pdfURL;
?>
" data-role="open-form-pdf" class="btn btn-default">
	<?php 
echo FabrikHelperHTML::icon('icon-file', FText::_('COM_FABRIK_PDF'));
?>
</a>&nbsp;
<?php 
if ($d->editable) {
    ?>
	<div class="colourPickerBackground colourpicker-widget fabrikWindow" style="display:none;min-width:350px;min-height:250px;">
		<div class="draggable modal-header">
			<div class="colourpicker_output img-rounded" style="width:15px;height:15px;float:left;margin-right:10px;"></div> 
			<?php 
    echo FText::_('PLG_FABRIK_COLOURPICKER_COLOUR');
    ?>

			<?php 
    if ($d->j3) {
        ?>
			<a class="pull-right" href="#">
				<?php 
        echo FabrikHelperHTML::icon('icon-cancel icon-remove-sign');
        ?>
</a>
			<?php 
    } else {
        echo FabrikHelperHTML::image("close.gif", 'form', @$this->tmpl, array());
    }
    if ($d->showPicker) {
        ?>
			</div>
		<div class="itemContentPadder">
			<div class="row-fluid">
				  <div class="span7">
					    <ul class="nav nav-tabs">
						      <li class="active"><a href="#<?php 
        echo $d->id;
Ejemplo n.º 28
0
    /**
     * Execute and display a template script.
     *
     * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
     *
     * @return  mixed  A string if successful, otherwise a JError object.
     */
    public function display($tpl = 'default')
    {
        $app = JFactory::getApplication();
        $package = $app->getUserState('com_fabrik.package', 'fabrik');
        $input = $app->input;
        $j3 = FabrikWorker::j3();
        $Itemid = FabrikWorker::itemId();
        $model = $this->getModel();
        $usersConfig = JComponentHelper::getParams('com_fabrik');
        $id = $input->get('id', $usersConfig->get('visualizationid', $input->get('visualizationid', 0)));
        $model->setId($id);
        $this->row = $model->getVisualization();
        if (!$model->canView()) {
            echo FText::_('JERROR_ALERTNOAUTHOR');
            return false;
        }
        $params = $model->getParams();
        $this->params = $params;
        $this->containerId = $model->getJSRenderContext();
        $this->filters = $this->get('Filters');
        $this->showFilters = $model->showFilters();
        $this->showTitle = $input->getInt('show-title', 1);
        $this->filterFormURL = $this->get('FilterFormURL');
        $calendar = $this->row;
        JHTML::stylesheet('media/com_fabrik/css/list.css');
        $this->canAdd = (bool) $params->get('calendar-read-only', 0) == 1 ? false : $model->getCanAdd();
        $this->requiredFiltersFound = $this->get('RequiredFiltersFound');
        if ($params->get('calendar_show_messages', '1') == '1' && $this->canAdd && $this->requiredFiltersFound) {
            $msg = FText::_('PLG_VISUALIZATION_CALENDAR_DOUBLE_CLICK_TO_ADD');
            $msg .= $model->getDateLimitsMsg();
            $app->enqueueMessage($msg);
        }
        JHTML::stylesheet('media/com_fabrik/css/list.css');
        // Get all list where statements - which are then included in the ajax call to ensure we get the correct data set loaded
        $urlfilters = new stdClass();
        $urlfilters->where = $model->buildQueryWhere();
        $urls = new stdClass();
        // Don't JRoute as its wont load with sef?
        $urls->del = 'index.php?option=com_' . $package . '&controller=visualization.calendar&view=visualization&task=deleteEvent&format=raw&Itemid=' . $Itemid . '&id=' . $id;
        $urls->add = 'index.php?option=com_' . $package . '&view=visualization&format=raw&Itemid=' . $Itemid . '&id=' . $id;
        $user = JFactory::getUser();
        $legend = $params->get('show_calendar_legend', 0) ? $model->getLegend() : '';
        $tpl = $j3 ? 'bootstrap' : 'default';
        $tpl = $params->get('calendar_layout', $j3);
        $options = new stdClass();
        $options->url = $urls;
        $options->dateLimits = $model->getDateLimits();
        $options->deleteables = $model->getDeleteAccess();
        $options->eventLists = $model->getEventLists();
        $options->calendarId = $calendar->id;
        $options->popwiny = $params->get('yoffset', 0);
        $options->urlfilters = $urlfilters;
        $options->canAdd = $this->canAdd;
        $options->showFullDetails = (bool) $params->get('show_full_details', false);
        $options->restFilterStart = FabrikWorker::getMenuOrRequestVar('resetfilters', 0, false, 'request');
        $options->tmpl = $tpl;
        $o = $model->getAddStandardEventFormInfo();
        if ($o != null) {
            $options->listid = $o->id;
        }
        // $$$rob @TODO not sure this is need - it isn't in the timeline viz
        $model->setRequestFilters();
        $options->filters = $model->filters;
        // End not sure
        $options->Itemid = $Itemid;
        $options->show_day = (bool) $params->get('show_day', true);
        $options->show_week = (bool) $params->get('show_week', true);
        $options->days = array(FText::_('SUNDAY'), FText::_('MONDAY'), FText::_('TUESDAY'), FText::_('WEDNESDAY'), FText::_('THURSDAY'), FText::_('FRIDAY'), FText::_('SATURDAY'));
        $options->shortDays = array(FText::_('SUN'), FText::_('MON'), FText::_('TUE'), FText::_('WED'), FText::_('THU'), FText::_('FRI'), FText::_('SAT'));
        $options->months = array(FText::_('JANUARY'), FText::_('FEBRUARY'), FText::_('MARCH'), FText::_('APRIL'), FText::_('MAY'), FText::_('JUNE'), FText::_('JULY'), FText::_('AUGUST'), FText::_('SEPTEMBER'), FText::_('OCTOBER'), FText::_('NOVEMBER'), FText::_('DECEMBER'));
        $options->shortMonths = array(FText::_('JANUARY_SHORT'), FText::_('FEBRUARY_SHORT'), FText::_('MARCH_SHORT'), FText::_('APRIL_SHORT'), FText::_('MAY_SHORT'), FText::_('JUNE_SHORT'), FText::_('JULY_SHORT'), FText::_('AUGUST_SHORT'), FText::_('SEPTEMBER_SHORT'), FText::_('OCTOBER_SHORT'), FText::_('NOVEMBER_SHORT'), FText::_('DECEMBER_SHORT'));
        $options->first_week_day = (int) $params->get('first_week_day', 0);
        $options->monthday = new stdClass();
        $options->monthday->width = (int) $params->get('calendar-monthday-width', 90);
        $options->monthday->height = (int) $params->get('calendar-monthday-height', 80);
        $options->greyscaledweekend = $params->get('greyscaled-week-end', 0) === '1';
        $options->viewType = $params->get('calendar_default_view', 'monthView');
        $options->weekday = new stdClass();
        $options->weekday->width = (int) $params->get('calendar-weekday-width', 90);
        $options->weekday->height = (int) $params->get('calendar-weekday-height', 10);
        $options->open = (int) $params->get('open-hour', 0);
        $options->close = (int) $params->get('close-hour', 24);
        $options->showweekends = (bool) $params->get('calendar-show-weekends', true);
        $options->readonly = (bool) $params->get('calendar-read-only', false);
        $options->timeFormat = $params->get('time_format', '%X');
        $options->readonlyMonth = (bool) $params->get('readonly_monthview', false);
        $options->j3 = FabrikWorker::j3();
        if (FabrikWorker::j3()) {
            $options->buttons = new stdClass();
            $options->buttons->del = '<button class="btn popupDelete" data-task="deleteCalEvent">' . FabrikHelperHTML::icon('icon-delete') . '</button>';
            $options->buttons->edit = '<button class="btn popupEdit" data-task="editCalEvent">' . FabrikHelperHTML::icon('icon-edit') . '</button>';
            $options->buttons->view = '<button class="btn popupView" data-task="viewCalEvent">' . FabrikHelperHTML::icon('icon-eye') . '</button>';
        } else {
            $src = COM_FABRIK_LIVESITE . 'plugins/fabrik_visualization/calendar/views/calendar/tmpl/' . $tpl . '/images/minus-sign.png';
            $options->buttons = '<img src="' . $src . '"
				alt = "del" class="fabrikDeleteEvent" />' . FText::_('PLG_VISUALIZATION_CALENDAR_DELETE');
        }
        $json = json_encode($options);
        JText::script('PLG_VISUALIZATION_CALENDAR_NEXT');
        JText::script('PLG_VISUALIZATION_CALENDAR_PREVIOUS');
        JText::script('PLG_VISUALIZATION_CALENDAR_DAY');
        JText::script('PLG_VISUALIZATION_CALENDAR_WEEK');
        JText::script('PLG_VISUALIZATION_CALENDAR_MONTH');
        JText::script('PLG_VISUALIZATION_CALENDAR_KEY');
        JText::script('PLG_VISUALIZATION_CALENDAR_TODAY');
        JText::script('PLG_VISUALIZATION_CALENDAR_CONF_DELETE');
        JText::script('PLG_VISUALIZATION_CALENDAR_DELETE');
        JText::script('PLG_VISUALIZATION_CALENDAR_VIEW');
        JText::script('PLG_VISUALIZATION_CALENDAR_EDIT');
        JText::script('PLG_VISUALIZATION_CALENDAR_ADD_EDIT_EVENT');
        JText::script('COM_FABRIK_FORM_SAVED');
        JText::script('PLG_VISUALIZATION_CALENDAR_EVENT_START_END');
        JText::script('PLG_VISUALIZATION_CALENDAR_DATE_ADD_TOO_LATE');
        JText::script('PLG_VISUALIZATION_CALENDAR_DATE_ADD_TOO_EARLY');
        $ref = $model->getJSRenderContext();
        $js = array();
        $js[] = "\tvar {$ref} = new fabrikCalendar('{$ref}');";
        $js[] = "\t{$ref}.render({$json});";
        $js[] = "\tFabrik.addBlock('" . $ref . "', {$ref});";
        $js[] = "\t" . $legend . "";
        $js[] = "" . $model->getFilterJs();
        $js = implode("\n", $js);
        $srcs = FabrikHelperHTML::framework();
        $srcs['FbListFilter'] = 'media/com_fabrik/js/listfilter.js';
        $srcs['Calendar'] = 'plugins/fabrik_visualization/calendar/calendar.js';
        FabrikHelperHTML::iniRequireJs($model->getShim());
        FabrikHelperHTML::script($srcs, $js);
        $viewName = $this->getName();
        $this->params = $model->getParams();
        $tpl = $params->get('calendar_layout', $tpl);
        $tmplpath = JPATH_ROOT . '/plugins/fabrik_visualization/calendar/views/calendar/tmpl/' . $tpl;
        $this->_setPath('template', $tmplpath);
        FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/calendar/views/calendar/tmpl/' . $tpl . '/template.css');
        // Adding custom.css, just for the heck of it
        FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/calendar/views/calendar/tmpl/' . $tpl . '/custom.css');
        return parent::display();
    }
Ejemplo n.º 29
0
 /**
  * Search various folder locations for a template image
  *
  * @param   string       $file       File name
  * @param   string       $type       Type e.g. form/list/element
  * @param   string       $tmpl       Template folder name
  * @param   array|string $properties Assoc list of properties or string (if you just want to set the image alt tag)
  * @param   bool         $srcOnly    Src only (default false)
  * @param   array        $opts       Additional render options:
  *                                   forceImage: regardless of in J3 site - render an <img> if set to true
  *                                   (bypasses bootstrap icon loading)
  *
  * @since 3.0
  *
  * @return  string  image
  */
 public static function image($file, $type = 'form', $tmpl = '', $properties = array(), $srcOnly = false, $opts = array())
 {
     if (is_string($properties)) {
         $properties = array('alt' => $properties);
     }
     $forceImage = FArrayHelper::getValue($opts, 'forceImage', false);
     if (FabrikWorker::j3() && $forceImage !== true) {
         unset($properties['alt']);
         $class = FArrayHelper::getValue($properties, 'icon-class', '');
         $class = 'icon-' . JFile::stripExt($file) . ($class ? ' ' . $class : '');
         unset($properties['icon-class']);
         $class .= ' ' . FArrayHelper::getValue($properties, 'class', '');
         unset($properties['class']);
         $p = self::propertiesFromArray($properties);
         if (!$srcOnly) {
             return FabrikHelperHTML::icon($class, '', $p);
         } else {
             return $class;
         }
     }
     $src = self::getImagePath($file, $type, $tmpl);
     $src = str_replace(COM_FABRIK_BASE, COM_FABRIK_LIVESITE, $src);
     $src = str_replace("\\", "/", $src);
     if ($srcOnly) {
         return $src;
     }
     if (isset($properties['class'])) {
         $properties['class'] .= ' fabrikImg';
     } else {
         $properties['class'] = 'fabrikImg';
     }
     $p = self::propertiesFromArray($properties);
     return $src == '' ? '' : '<img src="' . $src . '" ' . $p . '/>';
 }
<?php 
if ($d->canAdd) {
    ?>
<span class="addbutton">
	<a <?php 
    echo $trigger;
    ?>
 href="<?php 
    echo $d->url;
    ?>
" title="<?php 
    echo $d->label;
    ?>
">
	<?php 
    echo FabrikHelperHTML::icon('icon-plus', $d->label);
    ?>
	</a>
</span></a>
<?php 
} else {
    ?>
	<div style="text-align:center">
		<a title="<?php 
    echo FText::_('JERROR_ALERTNOAUTHOR');
    ?>
">
			<img src="<?php 
    echo COM_FABRIK_LIVESITE;
    ?>
media/com_fabrik/images/login.png"