<h2>Where did you find us?</h2> <?php foreach ($this->askOptions as $askId => $askOpt) { ?> <label><?php echo htmlBup::radiobutton('where_find_us', array('value' => $askId)); ?> <?php echo $askOpt['label']; ?> </label> <?php if ($askId == 4) { ?> <label id="bupFindUsUrlShell" style="display: none;">Please, post url: <?php echo htmlBup::text('find_on_web_url'); ?> </label> <?php } elseif ($askId == 5) { ?> <label style="display: none;" id="bupOtherWayTextShell"><?php echo htmlBup::textarea('other_way_desc'); ?> </label> <?php } ?> <?php } ?>
/** * Function to get field params * * @param object $params */ public static function getFieldAttributes($params) { $output = ''; if (!empty($params->attr)) { foreach ($params->attr as $key => $value) { $output .= langBup::_($key) . ':<br />'; $output .= htmlBup::text('params[attr][' . $key . ']', array('value' => $value)) . '<br />'; } } else { $output .= langBup::_('class') . ':<br />'; $output .= htmlBup::text('params[attr][class]', array('value' => '')) . '<br />'; $output .= langBup::_('id') . ':<br />'; $output .= htmlBup::text('params[attr][id]', array('value' => '')) . '<br />'; } return $output; }
<?php echo langBup::_('Exclude:'); echo htmlBup::text('opt_values[exclude]', array('attrs' => 'class="excludeInput" title="If entering multiple files/directories, then separate them with commas."', 'value' => frameBup::_()->getModule('options')->get('exclude'))); ?> </div> <div class="emailOpt"> <table> <tr> <td width="120"><?php echo langBup::_('Email notification:'); ?> </td> <td><?php echo htmlBup::checkbox('opt_values[email_ch]', array('attrs' => 'class="bupCheckboxNotUnCheck"', 'value' => 1, 'checked' => frameBup::_()->getModule('options')->getValueType('email') ? 'checked' : '')); ?> </td> </tr> </table> <div class="emailAddress" <?php echo frameBup::_()->getModule('options')->getValueType('email') ? '' : 'style="display:none"'; ?> > <?php echo htmlBup::text('opt_values[email]', array('attrs' => 'class="excludeInput" placeholder="*****@*****.**" title=""', 'value' => frameBup::_()->getModule('options')->get('email'))); ?> </div> </div> </div>
/** * Returns credentials form * * @since 1.1 * @param array $defaults * @return array */ protected function getCredentialsForm($defaults = array()) { return array('legend' => __('Enter your AWS Access Key,<br/>Secret Key and Bucket name', BUP_LANG_CODE), 'fields' => array(array('label' => __('Access Key', BUP_LANG_CODE), 'field' => htmlBup::text('access', array('value' => isset($defaults['access']) ? $defaults['access'] : '', 'attrs' => 'class="inputField100per"'))), array('label' => __('Secret Key', BUP_LANG_CODE), 'field' => htmlBup::text('secret', array('value' => isset($defaults['access']) ? $defaults['access'] : '', 'attrs' => 'class="inputField100per"'))), array('label' => __('Bucket', BUP_LANG_CODE), 'field' => htmlBup::text('bucket', array('value' => isset($defaults['bucket']) ? $defaults['bucket'] : '', 'attrs' => 'class="inputField100per"')))), 'extra' => array(htmlBup::button(array('value' => __(' Save ', BUP_LANG_CODE), 'attrs' => 'class="button button-primary button-large" id="bupAmazonCredentials"')))); }
<h4 class="cspTitle"><?php langBup::_e('Title'); ?> :</h4> <?php echo htmlBup::text('opt_values[msg_title]', array('value' => $this->optModel->get('msg_title'))); ?> <div class="cspLeftCol"> <?php langBup::_e('Select color'); ?> : <?php echo htmlBup::colorpicker('opt_values[msg_title_color]', array('value' => $this->optModel->get('msg_title_color'))); ?> </div> <div class="cspRightCol"> <?php langBup::_e('Select font'); ?> : <?php echo htmlBup::fontsList('opt_values[msg_title_font]', array('value' => $this->optModel->get('msg_title_font'))); ?> </div> <div class="clearfix"></div> <div class="clearfix"> <?php echo htmlBup::button(array('value' => langBup::_('Set default'), 'attrs' => 'id="cspMsgTitleSetDefault"')); ?> <div id="cspAdminOptMsgTitleDefaultMsg"></div>
/** * Function to process field params */ public function processParams($tag, $id) { return ''; if ($this->name == "params") { if (is_array($this->value) || is_object($this->value)) { $params = $this->value; } else { $params = json_decode($this->value); } $add_option = ''; switch ($tag) { case 5: $add_option = langBup::_('Add Checkbox'); $options_tag = ''; $image_tag = ' style="display:none"'; break; case 9: $add_option = langBup::_('Add Item'); $options_tag = ''; $image_tag = ' style="display:none"'; break; case 12: $add_option = langBup::_('Add Item'); $options_tag = ''; $image_tag = ' style="display:none"'; break; case 10: $options_tag = ''; $add_option = langBup::_('Add Radio Button'); $image_tag = ' style="display:none"'; break; case 8: $image_tag = ''; $options_tag = ' style="display:none"'; break; default: $options_tag = ' style="display:none"'; $image_tag = ' style="display:none"'; break; } if ($tag > 0 || $id == 0) { $output .= '<div class="options options_tag"' . $options_tag . '>'; $output .= '<span class="add_option">' . $add_option . '</span>'; $output .= fieldAdapterBup::_($id, 'getExtraFieldOptions', fieldAdapterBup::STR); $output .= '</div>'; $output .= '<div class="options image_tag"' . $image_tag . '>' . langBup::_('Dimensions') . ':<br />'; $params->width ? $width = $params->width : ''; $params->height ? $height = $params->height : ''; $output .= langBup::_('width') . ':<br />'; $output .= htmlBup::text('params[width]', array('value' => $width)) . '<br />'; $output .= langBup::_('height') . ':<br />'; $output .= htmlBup::text('params[height]', array('value' => $height)) . '<br />'; $output .= '</div>'; } if ($this->adapt['htmlParams']) { $output .= fieldAdapterBup::_($this, $this->adapt['htmlParams'], fieldAdapterBup::STR); } else { $output .= '<a href="javascript:void(0);" class="set_properties">' . langBup::_('Click to set field "id" and "class"') . '</a>'; $output .= '<div class="attributes" style="display:none;">' . langBup::_('Attributes') . ':<br />'; $output .= fieldAdapterBup::_($params, 'getFieldAttributes', fieldAdapterBup::STR); $output .= '</div>'; } return $output; } }
public static function textFieldsDynamicTable($name, $params = array('value' => '', 'attrs' => '', 'options' => array())) { $res = ''; if (empty($params['options'])) { $params['options'] = array(0 => array('label' => '')); } if (!empty($params['options'])) { $pattern = array(); foreach ($params['options'] as $key => $p) { $pattern[$key] = htmlBup::text($name . '[][' . $key . ']'); } $countOptions = count($params['options']); $remove = '<a href="#" onclick="toeRemoveTextFieldsDynamicTable(this); return false;">remove</a>'; $add = '<a href="#" onclick="toeAddTextFieldsDynamicTable(this, ' . $countOptions . '); return false;">add</a>'; $res = '<div class="toeTextFieldsDynamicTable">'; if (empty($params['value'])) { $params['value'] = array(); } elseif (!is_array($params['value'])) { $params['value'] = utilsBup::jsonDecode($params['value']); //$params['value'] = $params['value'][0]; } $i = 0; do { $res .= '<div class="toeTextFieldDynamicRow">'; foreach ($params['options'] as $key => $p) { switch ($countOptions) { case 1: if (isset($params['value'][$i])) { $value = is_array($params['value'][$i]) ? $params['value'][$i][$key] : $params['value'][$i]; } else { $value = ''; } break; case 2: default: $value = isset($params['value'][$i][$key]) ? $params['value'][$i][$key] : ''; break; } $paramsForText = array('value' => $value); $res .= __($p['label'], BUP_LANG_CODE) . htmlBup::text($name . '[' . $i . '][' . $key . ']', $paramsForText); } $res .= $remove . '</div>'; $i++; } while ($i < count($params['value'])); $res .= $add; $res .= '</div>'; } return $res; }
</span> </td> </tr> <tr> <td> <i class="fa fa-question supsystic-tooltip" title="<?php _e('Specify the path where the data is to be backed up. It \'Use relative path\' ckeckbox has been set up, the path will be set against in the root directory, where the WordPress is installed. If \'Use relative path\' checkbox has been of, the full path to the disk root should be specified.', BUP_LANG_CODE); ?> "></i> <?php _e('Warehouse:', BUP_LANG_CODE); ?> <br/><br/> <?php echo htmlBup::text('opt_values[warehouse]', array('attrs' => 'class="input-regular" id="warehouseInput" style="width: 100% !important"', 'value' => str_replace('\\', '/', frameBup::_()->getModule('options')->get('warehouse')))); ?> </td> </tr> <tr> <td> <i class="fa fa-question supsystic-tooltip" title="<?php _e('If the checkbox has been set up, then the backup path must be specified in the Warehouse field against the root directory, where the WordPress is installed. if the checkbox has been off, then the backup path must be specified in the Warehouse field against the disk root."', BUP_LANG_CODE); ?> "></i> <?php _e('Use relative path', BUP_LANG_CODE); ?> <div style="float: right"> <?php echo htmlBup::checkbox('__toggleWarehouseAbs', array('attrs' => 'class="bupCheckbox wareabs" id="warehouseToggle"', 'checked' => frameBup::_()->getModule('options')->get('warehouse_abs') == 1 ? 'checked' : ''));