Пример #1
0
 public static function taxDataHtml($field)
 {
     $listOfDest = array();
     if (!is_array($field->value)) {
         if (empty($field->value)) {
             $field->value = array();
         } else {
             $field->value = (array) json_decode($field->value, true);
         }
     }
     foreach (self::$userfieldDest as $d) {
         $listOfDest[] = array('id' => $d, 'text' => $d, 'checked' => is_array($field->value['dest']) && in_array($d, $field->value['dest']));
     }
     $categories = frameGmp::_()->getModule('products')->getCategories();
     $brands = frameGmp::_()->getModule('products')->getBrands();
     $cOptions = array();
     $bOptions = array();
     if (!empty($categories)) {
         if (!is_array($field->value['categories'])) {
             $field->value['categories'] = array();
         }
         foreach ($categories as $c) {
             $cOptions[] = array('id' => $c->term_taxonomy_id, 'text' => $c->cat_name, 'checked' => in_array($c->term_taxonomy_id, $field->value['categories']));
         }
     }
     if (!empty($brands)) {
         if (!is_array($field->value['brands'])) {
             $field->value['brands'] = array();
         }
         foreach ($brands as $b) {
             $bOptions[] = array('id' => $b->term_taxonomy_id, 'text' => $b->cat_name, 'checked' => in_array($b->term_taxonomy_id, $field->value['brands']));
         }
     }
     return '<div>' . __('Apply To', GMP_LANG_CODE) . '
         <div id="tax_address">
             <b>' . __('Address', GMP_LANG_CODE) . '</b><br />
             ' . __('Destination', GMP_LANG_CODE) . ':' . htmlGmp::checkboxlist('params[dest]', array('optionsGmp' => $listOfDest)) . '<br />
             ' . __('Country', GMP_LANG_CODE) . ':' . htmlGmp::countryList('params[country]', array('notSelected' => true, 'value' => $field->value['country'])) . '<br />
         </div>
         <div id="tax_category">
             <b>' . __('Categories', GMP_LANG_CODE) . '</b><br />
             ' . (empty($cOptions) ? __('You have no categories', GMP_LANG_CODE) : htmlGmp::checkboxlist('params[categories][]', array('optionsGmp' => $cOptions))) . '<br />
                 <b>' . __('Brands', GMP_LANG_CODE) . '</b><br />
             ' . (empty($bOptions) ? __('You have no brands', GMP_LANG_CODE) : htmlGmp::checkboxlist('params[brands][]', array('optionsGmp' => $bOptions))) . '<br />
         </div>
         <div>' . __('Tax Rate', GMP_LANG_CODE) . ': ' . htmlGmp::text('params[rate]', array('value' => $field->value['rate'])) . '</div>
         <div>' . __('Absolute', GMP_LANG_CODE) . ': ' . htmlGmp::checkbox('params[absolute]', array('checked' => $field->value['absolute'])) . '</div>
     </div>';
 }
Пример #2
0
							<tr>
								<th scope="row">
									<label for="marker_opts_description_mouse_hover">
										<?php 
_e('Show description by mouse hover', GMP_LANG_CODE);
?>
:
									</label>
									<i style="float: right;" class="fa fa-question supsystic-tooltip" title="<?php 
_e('Open marker description by mouse hover', GMP_LANG_CODE);
?>
"></i>
								</th>
								<td>
									<?php 
echo htmlGmp::checkbox('marker_opts[params][description_mouse_hover]', array('checked' => ''));
?>
								</td>
							</tr>
							<tr>
								<th scope="row">
									<label for="marker_opts_marker_group_id">
										<?php 
_e('Marker Category', GMP_LANG_CODE);
?>
:
									</label>
									<i style="float: right;" class="fa fa-question supsystic-tooltip" title="<?php 
_e('Choose marker category', GMP_LANG_CODE);
?>
"></i>
Пример #3
0
?>
:</label>
    <?php 
echo htmlGmp::text($this->widget->get_field_name('height'), array('attrs' => 'id="' . $this->widget->get_field_id('height') . '"', 'value' => isset($this->data['height']) ? $this->data['height'] : ''));
?>
<br />
	<label for="<?php 
echo $this->widget->get_field_id('display_as_img');
?>
"><?php 
_e('Display as image', GMP_LANG_CODE);
?>
:</label>
	
    <?php 
echo htmlGmp::checkbox($this->widget->get_field_name('display_as_img'), array('attrs' => 'id="' . $this->widget->get_field_id('display_as_img') . '"', 'checked' => isset($this->data['display_as_img'])));
?>
<br />
	<i><?php 
_e('Map will be displayed as image at sidebar, on click - will be opened in popup', GMP_LANG_CODE);
?>
</i><br />
	<div id="<?php 
echo $this->widget->get_field_id('img_params_shell');
?>
" style="display: none;">
		<label for="<?php 
echo $this->widget->get_field_id('img_height');
?>
"><?php 
_e('Image width (in px)', GMP_LANG_CODE);
Пример #4
0
	<?php 
echo htmlGmp::button(array('value' => langGmp::_('Export Maps'), 'attrs' => 'id="gmpCsvExportMapsBtn" class="btn btn-success"'));
?>
	<?php 
echo htmlGmp::button(array('value' => langGmp::_('Export Markers'), 'attrs' => 'id="gmpCsvExportMarkersBtn" class="btn btn-success"'));
?>
	<br />
	<?php 
echo htmlGmp::checkbox('csv_export_with_markers', array('attrs' => 'id="gmpCsvWithMarkersCheck"'));
?>
	<label for="gmpCsvWithMarkersCheck"><?php 
langGmp::_e('Export maps with markers');
?>
</label>
</div>
<hr />
<div class="gmpFormRow">
	<?php 
echo htmlGmp::ajaxfile('csv_import_file', array('url' => uriGmp::_(array('baseUrl' => admin_url('admin-ajax.php'), 'page' => 'csv', 'action' => 'import', 'reqType' => 'ajax')), 'data' => 'gmpCsvImportData', 'buttonName' => 'Import Maps / Markers', 'responseType' => 'json', 'onSubmit' => 'gmpCsvImportOnSubmit', 'onComplete' => 'gmpCsvImportOnComplete', 'btn_class' => 'btn btn-success'));
?>
	<br />
	<span id="gmpCsvImportMsg"></span>
	<br />
	<?php 
echo htmlGmp::checkbox('csv_import_overwrite_same_names', array('attrs' => 'id="gmpCsvOverwriteSameNames"'));
?>
	<label for="gmpCsvOverwriteSameNames"><?php 
langGmp::_e('Overwrite data with same names');
?>
</label>
</div>
Пример #5
0
 private function _convertDataForDatatable($list)
 {
     foreach ($list as $i => $marker) {
         $list[$i]['marker_check'] = htmlGmp::checkbox('marker_check[' . $list[$i]['id'] . ']');
         $list[$i]['list_icon'] = $this->getView()->getListIcon($list[$i]);
         $list[$i]['list_title'] = $this->getView()->getListTitle($list[$i]);
         $list[$i]['group_title'] = $list[$i]['marker_group']['title'];
         $list[$i]['list_address'] = $this->getView()->getListAddress($list[$i]);
         $list[$i]['uses_on_map'] = $this->getView()->getListUsesOnMap($list[$i]);
         $list[$i]['operations'] = $this->getView()->getListOperations($list[$i]);
     }
     return $list;
 }
Пример #6
0
echo htmlGmp::text('marker_opts[title]', array('attrs' => 'class="gmpInputLarge gmpMarkerTitleOpt gmpHintElem" id="gmpNewMap_marker_title" required="required"', 'hint' => 'Title For Marker'));
?>
			</div>
			<label for="gmpNewMap_marker_title" class="gmpFormLabel"><?php 
langGmp::_e('Marker Name');
?>
</label>
		</div>
		<div class="gmpFormRow">
			<label for="" class="gmpFormLabel"><?php 
langGmp::_e('Set Title as link');
?>
</label>
			<div class="gmpFormElemCon">
			<?php 
echo htmlGmp::checkbox('marker_opts[params][title_is_link]', array('attrs' => 'class="title_is_link gmpMarkerTitleIsLinkOpt gmpHintElem"', 'hint' => langGmp::_('Set Marker Title As Link')));
?>
			</div>
			<div class="markerTitleLink_Container">
			<?php 
echo htmlGmp::text('marker_opts[params][marker_title_link]', array('attrs' => 'id="marker_title_link" class="marker_title_link gmpMarkerTitleIsLinkOpt gmpHintElem" placeholder="http://domain.com"', 'hint' => langGmp::_('Link For Title')));
?>
			</div>
		</div>  
		<div class="gmpFormRow">
			<div class="gmpFormElemCon">
			<?php 
$groupArr = array();
foreach ($this->marker_opts['groups'] as $item) {
    $groupArr[$item['id']] = $item['title'];
}