protected function request()
 {
     $f = new Form();
     $f->start($_POST);
     $f->radio('dest', 'Screen', 'screen');
     $f->hspace(2);
     $f->radio('dest', 'PDF', 'pdf', false);
     $f->button('action_report', 'Report');
     $f->end();
 }
 protected function request()
 {
     $f = new Form();
     $f->start($_POST);
     $f->radio('dest', 'Screen', 'screen');
     $f->hspace(2);
     $f->radio('dest', 'PDF', 'pdf', false);
     $f->hspace(2);
     $f->radio('dest', 'CSV', 'csv', false);
     $f->text('year', 'Year:', 30, 'YYYY');
     $f->button('action_report', 'Report', false);
     $f->end();
 }
Example #3
0
 public function render()
 {
     $attributes = $this->get_attributes();
     $attributes['id'] = $this->get_name();
     $attributes['class'] = 'form-change';
     return Form::radio($this->get_name(), '1', $this->get_value()->get_raw(), $attributes);
 }
Example #4
0
 public function out()
 {
     if ($this->disabled) {
         $this->attributes['disabled'] = 'disabled';
     }
     return '<div class="' . $this->class . '"><label>' . \Form::radio($this->name, $this->value, $this->checked, $this->attributes) . ' ' . $this->caption . '</label></div>';
 }
Example #5
0
 /**
  * @covers Form::radio
  */
 public function testRadio()
 {
     $radios = $this->myForm->radio('radio button', 'resolution');
     $this->assertInstanceOf('Radio', $radios);
     $this->assertEquals('radio button', $radios->getName());
     $this->assertSame($this->myForm, $radios->getForm());
 }
Example #6
0
 public function render_input()
 {
     $params = $this->params();
     if (!isset($params['enum'])) {
         throw new Exception('The Radio field needs an array of possible
             values under the "enum" key in the field params!');
     }
     foreach ($params['enum'] as $val => $val_name) {
         $out[] = "{$val_name}:" . Form::radio($this->name(), $val, $this->value() == $val, array_diff_key(array('enum' => 1), $this->params()));
     }
     return join('&nbsp;&nbsp;', $out);
 }
/**
 * @param array                    $params
 * @param Smarty_Internal_Template $smarty
 *
 * @throws SmartyException
 * @return string
 *
 * @author Kovács Vince
 */
function smarty_function_form_radio($params, Smarty_Internal_Template &$smarty)
{
    if (!isset($params['_name'])) {
        throw new SmartyException('Missing _name attribute for form_radio tag');
    }
    $name = $params['_name'];
    $value = isset($params['_value']) ? $params['_value'] : null;
    $checked = isset($params['_checked']) ? (bool) $params['_checked'] : (isset($params['_populate']) && $params['_populate'] ? (bool) \Input::get($name) : null);
    unset($params['_name']);
    unset($params['_value']);
    unset($params['_checked']);
    return Form::radio($name, $value, $checked, $params);
}
Example #8
0
function box($field, $value, $fieldinfo)
{
    extract($fieldinfo);
    //错误提示
    $errortips = $this->fields[$field]['errortips'];
    if ($minlength) {
        //验证规则
        $this->formValidateRules['info[' . $field . ']'] = array("required" => true);
        //验证不通过提示
        $this->formValidateMessages['info[' . $field . ']'] = array("required" => $errortips ? $errortips : $name . "不能为空!");
    }
    $setting = unserialize($fieldinfo['setting']);
    if ($value == '') {
        $value = $setting['defaultvalue'];
    }
    $options = explode("\n", $setting['options']);
    foreach ($options as $_k) {
        $v = explode("|", $_k);
        $k = trim($v[1]);
        $option[$k] = $v[0];
    }
    $values = explode(',', $value);
    $value = array();
    foreach ($values as $_k) {
        if ($_k != '') {
            $value[] = $_k;
        }
    }
    $value = implode(',', $value);
    switch ($setting['boxtype']) {
        case 'radio':
            $string = Form::radio($option, $value, "name='info[{$field}]' {$fieldinfo['formattribute']}", $setting['width'], $field);
            break;
        case 'checkbox':
            $string = Form::checkbox($option, $value, "name='info[{$field}][]' {$fieldinfo['formattribute']}", 1, $setting['width'], $field);
            break;
        case 'select':
            $string = Form::select($option, $value, "name='info[{$field}]' id='{$field}' {$fieldinfo['formattribute']}");
            break;
        case 'multiple':
            $string = Form::select($option, $value, "name='info[{$field}][]' id='{$field} ' size=2 multiple='multiple' style='height:60px;' {$fieldinfo['formattribute']}");
            break;
    }
    return $string;
}
Example #9
0
 public function render()
 {
     $render = '';
     if (!is_array($this->_config['options'])) {
         $this->_config['options'] = array_combine($this->_extra[$this->_config['options']], $this->_extra[$this->_config['options']]);
     }
     switch ($this->_config['format']) {
         case 'select':
             // Multiple
             if ($this->_config['multiple']) {
                 $render = Form::select($this->_name . '[]', $this->_config['options'], (array) $this->_value, $this->_attributes + array('id' => $this->_id));
                 break;
             }
             // Multichoice
             if ($this->_config['multichoice']) {
                 $render = ZForm::multichoice($this->_name, $this->_config['options'], $this->_value, $this->_attributes + array('id' => $this->_id));
                 break;
             }
             //  Single
             $render = Form::select($this->_name, $this->_config['options'], $this->_value, $this->_attributes + array('id' => $this->_id));
             break;
         default:
             $first = true;
             $i = 0;
             foreach ($this->_config['options'] as $option => $label) {
                 $render .= '<span class="enum-item">';
                 $id = $first ? $this->_id : $this->_id . '_' . $i++;
                 // Multiple (checkboxes)
                 if ($this->_config['multiple']) {
                     $render .= Form::checkbox($this->_name . '[' . $option . ']', $option, in_array($option, $this->_value), $this->_attributes + array('id' => $id));
                 } else {
                     $render .= Form::radio($this->_name, $option, $this->_value == $option or $first and !$this->_value, $this->_attributes + array('id' => $id));
                 }
                 $render .= Form::label($id, $label);
                 $render .= '</span>';
                 $first = false;
             }
             $render = '<div class="enum">' . $render . '</div>';
     }
     return $render;
 }
Example #10
0
 public function box($field, $value, $fieldinfo)
 {
     $setting = string2array($fieldinfo['setting']);
     if ($value == '') {
         $value = $this->fields[$field]['defaultvalue'];
     }
     $options = explode("\n", $this->fields[$field]['options']);
     foreach ($options as $_k) {
         $v = explode("|", $_k);
         $k = trim($v[1]);
         $option[$k] = $v[0];
     }
     $values = explode(',', $value);
     $value = array();
     foreach ($values as $_k) {
         if ($_k != '') {
             $value[] = $_k;
         }
     }
     $value = implode(',', $value);
     switch ($this->fields[$field]['boxtype']) {
         case 'radio':
             $string = Form::radio($option, $value, "name='info[{$field}]'", $setting['width'], $field);
             break;
         case 'checkbox':
             $string = Form::checkbox($option, $value, "name='info[{$field}][]'", 1, $setting['width'], $field);
             break;
         case 'select':
             $string = Form::select($option, $value, "name='info[{$field}]' id='{$field}'");
             break;
         case 'multiple':
             $string = Form::select($option, $value, "name='info[{$field}][]' id='{$field}' size=2 multiple='multiple' style='height:60px;'");
             break;
     }
     return $string;
 }
Example #11
0
<div class="<?php 
echo Arr::get($form, 'input_container_offset_class');
?>
">
	<div id="doc-published">
		<label class="radio radio-inline">
			<?php 
echo Form::radio('published', 1, $document->published == 1);
?>
 <?php 
echo __('Published');
?>
		</label>

		<label class="radio radio-inline">
			<?php 
echo Form::radio('published', 0, $document->published == 0);
?>
 <?php 
echo __('Unpublished');
?>
		</label>
	</div>
</div>	
Example #12
0
Index (Default)</label>
		                                                	<label class="radio"><?php 
echo \Form::radio('meta_robots_index', 0, \Input::post('meta_robots_index', $product->seo->meta_robots_index));
?>
No Index</label>
				                                        </div>
				                                    </div>
				                                    <div class="formRow">
				                                    	<label>Robots Follow</label>
				                                        <div class="input_holder">
				                                        	<label class="radio"><?php 
echo \Form::radio('meta_robots_follow', 1, \Input::post('meta_robots_follow', $product->seo->meta_robots_follow));
?>
Follow (Default)</label>
		                                                	<label class="radio"><?php 
echo \Form::radio('meta_robots_follow', 0, \Input::post('meta_robots_follow', $product->seo->meta_robots_follow));
?>
No Follow</label>
				                                        </div>
				                                    </div>
				                                </div>                                    
				                            </div>
				                        </div><!-- EOF Meta Robots Panel -->
				                        <div class="save_button_holder">
				                        	<?php 
echo \Form::button('save', '<i class="icon-ok icon-white"></i>Save', array('type' => 'submit', 'id' => 'save_button_down_seo', 'class' => 'btn btn-success right'));
?>
				                        </div>
				                    </div><!-- EOF Main Content Holder -->				                 
                                    
				                    <div class="clear"></div>
Example #13
0
 
                        </div>

                        <div class="form-group">
                            <?php 
echo FORM::label($forms['smtp_auth']['key'], __("Smtp auth"), array('class' => 'control-label', 'for' => $forms['smtp_auth']['key']));
?>
                            <div class="radio radio-primary">
                                <?php 
echo Form::radio($forms['smtp_auth']['key'], 1, (bool) $forms['smtp_auth']['value'], array('id' => $forms['smtp_auth']['key'] . '1'));
?>
                                <?php 
echo Form::label($forms['smtp_auth']['key'] . '1', __('Enabled'));
?>
                                <?php 
echo Form::radio($forms['smtp_auth']['key'], 0, !(bool) $forms['smtp_auth']['value'], array('id' => $forms['smtp_auth']['key'] . '0'));
?>
                                <?php 
echo Form::label($forms['smtp_auth']['key'] . '0', __('Disabled'));
?>
                            </div>
                        </div>

                        <div class="form-group">
                            <?php 
echo FORM::label($forms['smtp_user']['key'], __('Smtp user'), array('class' => 'control-label', 'for' => $forms['smtp_user']['key']));
?>
                            <?php 
echo FORM::input($forms['smtp_user']['key'], $forms['smtp_user']['value'], array('placeholder' => "", 'class' => 'tips form-control', 'id' => $forms['smtp_user']['key']));
?>
 
Example #14
0
?>
		<?php 
echo Form::Label('Kosher Level');
?>
        <div id="kosher_rest_search_radio">
            <?php 
foreach ($kosher_options as $key => $option) {
    ?>
				<?php 
    $key++;
    ?>
                <?php 
    $default = $index == '0' ? TRUE : FALSE;
    ?>
                <?php 
    echo Form::radio('kosher_level', $index, FALSE, array('id' => 'kosher_rest_search_radio' . $key, 'class' => 'rest_search_radio'));
    ?>
				<?php 
    echo Form::label('kosher_rest_search_radio' . $key, $option);
    ?>
                <?php 
    $index++;
    ?>
            <?php 
}
?>
        </div>
	</div>
	<div style="width:48%;float:left;display:inline; padding-left:20px">
		<?php 
echo Form::input('city_id', 0, array('id' => 'city_id', 'type' => 'hidden', 'class' => 'rest_search_input'));
Example #15
0
<div class="block">
   <h1>Delete user?</h1>
   <div class="content">
<?php 
echo Form::open('admin_user/delete/' . $id, array('style' => 'display: inline;'));
echo Form::hidden('id', $id);
echo '<p>' . __('Are you sure you want to delete user ":user"', array(':user' => $data['username'])) . '</p>';
echo '<p>' . Form::radio('confirmation', 'Y', false, array('id' => 'conf_y')) . ' <label for="conf_y" style="display: inline;">' . __('Yes') . '</label><br/>';
echo Form::radio('confirmation', 'N', true, array('id' => 'conf_n')) . ' <label for="conf_n" style="display: inline;">' . __('No') . '</label><br/></p>';
echo Form::submit(NULL, __('Delete'));
echo Form::close();
echo Form::open('admin_user/index', array('style' => 'display: inline; padding-left: 10px;'));
echo Form::submit(NULL, __('Cancel'));
echo Form::close();
?>
   </div>
</div>

Example #16
0
Index (Default)</label>
		                                                	<label class="radio"><?php 
echo \Form::radio('meta_robots_index', 0, \Input::post('meta_robots_index', $category->seo->meta_robots_index));
?>
No Index</label>
				                                        </div>
				                                    </div>
				                                    <div class="formRow">
				                                    	<label>Robots Follow</label>
				                                        <div class="input_holder">
				                                        	<label class="radio"><?php 
echo \Form::radio('meta_robots_follow', 1, \Input::post('meta_robots_follow', $category->seo->meta_robots_follow));
?>
Follow (Default)</label>
		                                                	<label class="radio"><?php 
echo \Form::radio('meta_robots_follow', 0, \Input::post('meta_robots_follow', $category->seo->meta_robots_follow));
?>
No Follow</label>
				                                        </div>
				                                    </div>
				                                </div>                                    
				                            </div>
				                        </div><!-- EOF Meta Robots Panel -->
				                        <div class="save_button_holder">
				                        	<?php 
echo \Form::button('save', '<i class="icon-ok icon-white"></i> Save', array('type' => 'submit', 'class' => 'btn btn-success right'));
?>
				                        </div>
				                    </div><!-- EOF Main Content Holder -->
				                    
                                    <!-- Sidebar Holder -->
?>

    <?php 
echo Form::label('Male', 'Male:', ['class' => 'control-label']);
?>

    <?php 
echo Form::radio('gender', 'male', ['class' => 'form-control']);
?>

    <?php 
echo Form::label('Female', 'Female:', ['class' => 'control-label']);
?>

    <?php 
echo Form::radio('gender', 'female', ['class' => 'form-control']);
?>

</div>

<?php 
echo Form::submit('Update Contact', ['class' => 'btn btn-primary']);
?>


<?php 
echo Form::close();
?>


<?php 
Example #18
0
                // Only root categories in first pass
                if ($category_item->parent_id == 0) {
                    if ($category && in_array($category_item->id, $hide_radio)) {
                        array_push($hide_radio, $category_item->id);
                    }
                    ?>
                        				<li>
                        					<?php 
                    echo !empty($category_item->children) ? '<div class="hitarea"></div>' : '';
                    ?>
                        					<div class="radio_link_holder">
                            					<?php 
                    if ($category) {
                        ?>
                        							<?php 
                        echo \Form::radio('parent_id', $category_item->id, \Input::post('parent_id', $selected !== false ? $selected : $category->parent_id), in_array($category_item->id, $hide_radio) ? array('style' => 'display: none;', 'disabled' => 'diabled') : array());
                        ?>
                            					<?php 
                    }
                    ?>
                        						<a href="<?php 
                    echo \Uri::create('admin/product/category/' . $link . '/' . $category_item->id);
                    ?>
" <?php 
                    echo $selected == $category_item->id ? 'class="active"' : '';
                    ?>
>
                        							<?php 
                    echo $category_item->title;
                    echo !empty($category_item->children) ? ' <span class="tree_count">(' . count($category_item->children) . ')</span>' : '';
                    ?>
Example #19
0
if (isset($edited_Skin->version)) {
    // Skin version
    echo '<div class="skin_setting_row">';
    echo '<label>' . T_('Skin version') . ':</label>';
    echo '<span>' . $edited_Skin->version . '</span>';
    echo '</div>';
}
// Skin type
echo '<div class="skin_setting_row">';
echo '<label>' . T_('Skin type') . ':</label>';
echo '<span>' . $edited_Skin->type . '</span>';
echo '</div>';
// Containers
if ($skin_containers = $edited_Skin->get_containers()) {
    $container_ul = '<ul><li>' . implode('</li><li>', $skin_containers) . '</li></ul>';
} else {
    $container_ul = '-';
}
echo '<div class="skin_setting_row">';
echo '<label>' . T_('Containers') . ':</label>';
echo '<span>' . $container_ul . '</span>';
echo '</div>';
echo '</div>';
echo '<div class="skin_settings_form">';
$Form->begin_fieldset(T_('System Settings for this skin') . get_manual_link('skin-system-settings'));
$Form->text_input('skin_name', $edited_Skin->name, 32, T_('Skin name'), T_('As seen by blog owners'), array('required' => true));
$Form->radio('skin_type', $edited_Skin->type, array(array('normal', T_('Normal'), T_('Normal skin for general browsing')), array('mobile', T_('Mobile'), T_('Mobile skin for mobile phones browsers')), array('tablet', T_('Tablet'), T_('Tablet skin for tablet browsers')), array('feed', T_('XML Feed'), T_('Special system skin for XML feeds like RSS and Atom')), array('sitemap', T_('XML Sitemap'), T_('Special system skin for XML sitemaps'))), T_('Skin type'), true);
$Form->end_fieldset();
echo '</div>';
$Form->end_fieldset();
$Form->end_form(array(array('submit', 'submit', T_('Save Changes!'), 'SaveButton')));
Example #20
0
echo Form::select('classification', Input::post('classification') ? Input::post('classification') : (isset($media) ? $media->classification : ''), $classification, array('class' => 'form-control'));
?>
		</td>
	</tr>
	<tr>
		<th class="text-right">WEB転載</th>
		<td>
			<label class="radio-inline">
				<?php 
echo Form::radio('is_web_reprint', 1, Input::post('is_web_reprint') && Input::post('is_web_reprint') == 1 ? true : (isset($media) && $media->is_web_reprint == 1 ? true : false));
?>
				あり
			</label>
			<label class="radio-inline">
				<?php 
echo Form::radio('is_web_reprint', 0, Input::post('is_web_reprint') && Input::post('is_web_reprint') == 0 ? true : (isset($media) && $media->is_web_reprint == 0 ? true : false));
?>
				なし
			</label>
			<span class="text-info">※いずれか必須</span>
			<label id="is_web_reprint-error" class="error" for="is_web_reprint"></label>
		</td>
	</tr>
	<tr>
		<th class="text-right">掲載・公開について</th>
		<td>
			<?php 
echo Form::input('public_description', Input::post('public_description') ? Input::post('public_description') : (isset($media) ? $media->public_description : ''), array('class' => 'form-control', 'size' => 50));
?>
		</td>
	</tr>
Example #21
0
 private static function generateRadioButton($id, $attributes_input, $model, $attributes)
 {
     $radioOptions = array();
     if (!isset($attributes["radioButtonOption"])) {
         throw new Exception("radioButtonOption is required if you want to create a radioButton input", 1);
     }
     $radioButtonOption = $attributes["radioButtonOption"];
     if (is_array($radioButtonOption["options"])) {
         foreach ($radioButtonOption["options"] as $keyOption => $option) {
             $value = $keyOption;
             $title = $option;
             unset($attributes["radioButtonOption"]);
             if ($value == $model->{$id}) {
                 $activeOption = true;
             } else {
                 $activeOption = false;
             }
             $test = Form::radio($attributes_input["name"], $value, $activeOption, $attributes) . "<span> {$title} </span>";
             array_push($radioOptions, $test);
         }
     }
     return implode(" ", $radioOptions);
 }
Example #22
0
            // Only root pages in first pass
            if ($page_item->parent_id == 0) {
                if ($application && in_array($page_item->id, $hide_radio)) {
                    array_push($hide_radio, $page_item->id);
                }
                ?>
			                                    				<li>
			                                    					<?php 
                echo !empty($page_item->children) ? '<div class="hitarea"></div>' : '';
                ?>
			                                    					<div class="radio_link_holder">
				                                    					<?php 
                if ($application) {
                    ?>
			                                    							<?php 
                    echo \Form::radio('parent_id', $page_item->id, \Input::post('parent_id', $application->parent_id), in_array($page_item->id, $hide_radio) ? array('style' => 'display: none;', 'disabled' => 'diabled') : array());
                    ?>
				                                    					<?php 
                }
                ?>
			                                    						<a href="<?php 
                echo \Uri::create('admin/application/' . $link . '/' . $page_item->id);
                ?>
" <?php 
                echo $selected == $page_item->id ? 'class="active"' : '';
                ?>
>
			                                    							<?php 
                echo $page_item->title;
                echo !empty($page_item->children) ? ' <span class="tree_count">(' . count($page_item->children) . ')</span>' : '';
                ?>
 public function postMdNosh()
 {
     $url = 'https://noshchartingsystem.com/nosh-sso/providersearch?term=' . Input::get('term');
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_URL, $url);
     curl_setopt($ch, CURLOPT_HEADER, 0);
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     curl_setopt($ch, CURLOPT_TIMEOUT, 60);
     $output = curl_exec($ch);
     $result = json_decode($output, true);
     $return = '';
     if ($result['response'] != 'false') {
         $i = 0;
         foreach ($result['message'] as $row) {
             $return .= '<label for="mdnosh_provider_' . $i . '" class="pure-checkbox" style="display:block;margin-left:20px;">';
             $return .= Form::radio('mdnosh_email', $row['email'], false, ['id' => 'mdnosh_email_' . $i, 'style' => 'float:left; margin-left:-20px; margin-right:7px;', 'class' => 'mdnosh_email_select']);
             $return .= ' <span id="mdnosh_email_label_span_' . $i . '">' . $row['label'] . '</span>';
             $return .= '</label>';
             $i++;
         }
     } else {
         $return .= 'No providers identified with the search terms provided';
     }
     return $return;
 }
Example #24
0
 /**
  * Returns the description of this ShowStyle
  */
 public function showDescription()
 {
     $form = new Form();
     return $form->radio("showStyle", $this->title, 0, "") . " <strong>(" . $this->title . ") Den här stilen kommer bara att användas till agreesidan. (exakt EN av denna typ)</strong>";
 }
Example #25
0
$creating = is_create_action($action);
$Form = new Form(NULL, 'ftyp_checkchanges', 'post', 'compact');
$Form->global_icon(T_('Delete this filetype!'), 'delete', regenerate_url('action', 'action=delete'));
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action'));
$Form->begin_form('fform', $creating ? T_('New file type') : T_('File type'));
$Form->add_crumb('filetype');
$Form->hidden_ctrl();
$Form->hidden('action', $creating ? 'create' : 'update');
if (!$creating) {
    $Form->hidden('ftyp_ID', $edited_Filetype->ID);
}
$Form->text_input('ftyp_extensions', $edited_Filetype->extensions, 40, T_('Extensions'), '', array('maxlength' => 30, 'required' => true, 'note' => sprintf('E.g. &laquo;%s&raquo;' . ', ' . T_('separated by whitespace'), 'html')));
$Form->text_input('ftyp_name', $edited_Filetype->name, 40, T_('File type name'), sprintf('E.g. &laquo;%s&raquo;', 'HTML file'), array('maxlength' => 30, 'required' => true));
$Form->text_input('ftyp_mimetype', $edited_Filetype->mimetype, 40, T_('Mime type'), sprintf('E.g. &laquo;%s&raquo;', 'text/html'), array('maxlength' => 50, 'required' => true));
$Form->select_input_array('ftyp_icon', $edited_Filetype->icon, get_available_filetype_icons(), T_('Icon'));
$Form->radio('ftyp_viewtype', $edited_Filetype->viewtype, array(array('browser', T_('Open with browser (popup)'), T_('Let the browser handle the file in a popup.')), array('text', T_('Open with text viewer (popup)'), T_('Use the online text viewer (recommended for .txt)')), array('image', T_('Open with image viewer (popup)'), T_('Use the online image viewer (recommended for .gif .png .jpg)')), array('external', T_('Open with external app (no popup)'), T_('Let the browser handle the file in a popup. Note: if you do not want Word to open inside of IE, you must uncheck "browse in same window" in Windows\' file types.')), array('download', T_('Download to disk (no popup)'), T_('Tell the browser to save the file to disk instead of displaying it.'))), T_('View type'), true);
// Check if the extension is in the array of the not allowed upload extensions from _advanced.php
$not_allowed = false;
$extensions = explode(' ', $edited_Filetype->extensions);
foreach ($extensions as $extension) {
    if (in_array($extension, $force_upload_forbiddenext)) {
        $not_allowed = true;
        continue;
    }
}
$Form->radio('ftyp_allowed', $edited_Filetype->allowed, array(array('any', T_('Allow anyone (including anonymous users) to upload/rename files of this type')), array('registered', T_('Allow only registered users to upload/rename files of this type')), array('admin', T_('Allow only admins to upload/rename files of this type'))), T_('Allow upload'), true);
if ($creating) {
    $Form->end_form(array(array('submit', 'submit', T_('Record'), 'SaveButton'), array('submit', 'submit', T_('Record, then Create New'), 'SaveButton'), array('submit', 'submit', T_('Record, then Create Similar'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
} else {
    $Form->end_form(array(array('submit', 'submit', T_('Update'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
}
Example #26
0
        if (array_key_exists('note', $settings)) {
            $note = $settings['note'];
        } else {
            $note = get_affected_paths($settings['path']);
        }
        $Form->checkbox('bk_' . $name, $current_Backup->backup_paths[$name], $settings['label'], $note);
    }
}
$Form->end_fieldset();
// Backup settings for database tables
$Form->begin_fieldset(T_('Database tables'), array('class' => 'fieldset clear'));
// Display checkboxes
foreach ($backup_tables as $name => $settings) {
    $note = '';
    if (array_key_exists('note', $settings)) {
        $note = $settings['note'];
    } else {
        $note = get_affected_tables($settings['table']);
    }
    $Form->checkbox('bk_' . $name, $current_Backup->backup_tables[$name], $settings['label'], $note);
}
$Form->end_fieldset();
// Enable/Disable maintenance mode
$Form->begin_fieldset(T_('General Options') . get_manual_link('set-system-lock-during-backup'), array('class' => 'fieldset clear'));
$Form->radio('bk_lock_type', 'maintenance_mode', array(array('maintenance_mode', T_('Maintenance mode') . ' (' . T_('Recommended') . ')', T_('check this to completely lock b2evolution')), array('maintenance_lock', T_('Maintenance lock'), T_('check this to prevent login (except for admins), sending comments/messages and receiving DB updates (other than logging)')), array('open', T_('Leave the site open for modifications during backup. (Not recommended).'))), T_('Lock b2evolution while backing up'), true);
if (function_exists('gzopen')) {
    $Form->checkbox('bk_pack_backup_files', $current_Backup->pack_backup_files, 'ZIP', T_('Compress backup files into ZIP archive.'));
}
$Form->add_crumb('backup');
$Form->end_fieldset();
$Form->end_form(array(array('submit', 'actionArray[backup]', T_('Backup'), 'SaveButton')));
         }
         $field .= Form::checkbox($element->name, $value, $checked, $element->attributes) . '<span class="checkBoxLabel">' . $label . '</span>' . ($element->spacer ? $element->spacer : '&nbsp;');
     }
     break;
 case 'radio':
     // check if is assoc array
     $assoc = Arr::is_assoc($element->options);
     $field = '';
     foreach ($element->options as $value => $label) {
         if ($assoc == false) {
             // only values given: value is $label, get label from textfile
             $value = $label;
             $label = text('option.' . $element->key . '.' . $value);
         }
         $checked = $value == $element->value;
         $field .= Form::radio($element->name, $value, $checked, $element->attributes) . '<span class="radioLabel">' . $label . '</span>' . ($element->spacer ? $element->spacer : '&nbsp;');
     }
     break;
 case 'button':
     $field = Form::button($element->name, $element->label, $element->attributes);
     break;
 case 'file':
     $field = Form::file($element->name, $element->attributes);
     break;
 case 'image':
     $field = Form::image($element->name, $element->value, $element->attributes, false);
     break;
 case 'text':
 case 'text_small':
 case 'input':
 case 'input_small':
Example #28
0
          <hr>
          <div class="form-horizontal" id="default-settings">
            <div class="form-group">
              <?php 
echo FORM::label('map_active', __('Map on homepage'), array('class' => 'control-label col-sm-4', 'for' => 'map_active'));
?>
              <div class="col-sm-8">
                <div class="radio radio-primary">
                  <?php 
echo Form::radio('map_active', 1, (bool) $map_active, array('id' => 'map_active' . '1'));
?>
                  <?php 
echo Form::label('map_active' . '1', __('Enabled'));
?>
                  <?php 
echo Form::radio('map_active', 0, !(bool) $map_active, array('id' => 'map_active' . '0'));
?>
                  <?php 
echo Form::label('map_active' . '0', __('Disabled'));
?>
                </div>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-sm-4" for="bg_color">
                <?php 
echo __('Background Color');
?>
              </label>
              <div class="col-sm-8">
                <input type="text" name="bg_color" class="form-control color {hash:true, adjust:false}" value="#FFFFFF" onchange="drawVisualization();">
Example #29
0
 on invoice
			#<?php 
echo Form::input('invoice', $post['invoice']);
?>
 using:</p>

		<ul class="gateway">
			<li><label><?php 
echo Form::radio('gateway', 'paypal', $post['gateway'] === 'paypal');
?>
 <?php 
echo HTML::image('https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif', array('alt' => 'PayPal'));
?>
</label></li>
			<li><label><?php 
echo Form::radio('gateway', 'gcheckout', $post['gateway'] === 'gcheckout');
?>
 <?php 
echo HTML::image('https://checkout.google.com/buttons/checkout.gif?merchant_id=760570731838371&w=168&h=44&style=white&variant=text&loc=en_US', array('alt' => 'Google Checkout'));
?>
</label></li>
		</ul>

		<p><?php 
echo Form::button(NULL, 'Send Payment');
?>
</p>

	<?php 
echo form::close();
?>
Example #30
0
        
                    <hr>
        
                    <div class="form-group">
                        <?php 
echo FORM::label($forms['disallow_nudes']['id'], __('Disallow nude pictures'), array('class' => 'control-label', 'for' => $forms['disallow_nudes']['id']));
?>
                        <div class="radio radio-primary">
                            <?php 
echo Form::radio($forms['disallow_nudes']['key'], 1, (bool) $forms['disallow_nudes']['value'], array('id' => $forms['disallow_nudes']['key'] . '1'));
?>
                            <?php 
echo Form::label($forms['disallow_nudes']['key'] . '1', __('Enabled'));
?>
                            <?php 
echo Form::radio($forms['disallow_nudes']['key'], 0, !(bool) $forms['disallow_nudes']['value'], array('id' => $forms['disallow_nudes']['key'] . '0'));
?>
                            <?php 
echo Form::label($forms['disallow_nudes']['key'] . '0', __('Disabled'));
?>
                        </div>
                    </div>

                    <hr>
                    <?php 
echo FORM::button('submit', __('Save'), array('type' => 'submit', 'class' => 'btn btn-primary', 'action' => Route::url('oc-panel', array('controller' => 'settings', 'action' => 'image'))));
?>
                </div>
            </div>
        <?php 
echo FORM::close();