<form id="form-edit-user" class="form-horizontal" enctype="multipart/form-data" action="" method="post" role="form">
								<div class="message-container"></div>
								<div class="form-group">
									<label class="col-sm-2 control-label" for="username">Username</label>
									<div class="col-sm-4">
										<input type="text" name="username" id="username" class="form-control" value="<?php 
echo form_field('username', $data);
?>
">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label" for="email">Email</label>
									<div class="col-sm-4">
										<input type="email" name="email" id="email" class="form-control" value="<?php 
echo form_field('email', $data);
?>
">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label" for="password">Password</label>
									<div class="col-sm-4">
										<input type="password" name="password" id="password" class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label" for="cpassword">Confirm Password</label>
									<div class="col-sm-4">
										<input type="password" name="cpassword" id="rpassword" class="form-control">
									</div>
">
									</div>
								</div>
								<div class="form-group clearfix">
									<label class="col-sm-2 control-label" for="content">Content</label>
									<div class="col-lg-6 col-sm-10">
										<textarea name="content" id="content" class="form-control ckeditor" rows="5"><?php 
echo stripslashes(form_field('content', $data));
?>
</textarea>
									</div>
								</div>
								<div class="form-group clearfix">
									<div class="col-sm-4 col-sm-offset-2">
										<input type="hidden" name="id" value="<?php 
echo form_field('id', $data);
?>
" />
										<input type="submit" name="save" value="Save" class="btn btn-primary" />
									</div>
								</div>
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
		<link href="<?php 
echo SITE_URL;
?>
admin/css/uploadifive.css" media="screen" rel="stylesheet" type="text/css" />
Beispiel #3
0
echo form_field($_field, 'Keep this below 100 characters');
// --------------------------------------------------------------------------
$_field = array();
$_field['key'] = 'seo_description';
$_field['label'] = 'Description';
$_field['placeholder'] = 'Search Engine Optimised description';
$_field['type'] = 'textarea';
$_field['default'] = !empty($item->seo_description) ? $item->seo_description : '';
echo form_field($_field, 'Keep this relevant and below 140 characters');
// --------------------------------------------------------------------------
$_field = array();
$_field['key'] = 'seo_keywords';
$_field['label'] = 'Keywords';
$_field['placeholder'] = 'Comma separated keywords';
$_field['default'] = !empty($item->seo_keywords) ? $item->seo_keywords : '';
echo form_field($_field, 'Comma seperated keywords. Try to keep to 10 or fewer.');
?>
			</fieldset>
		</div>

	</section>
	<p>
	<?php 
$_action = empty($item->id) ? lang('action_create') : lang('action_save_changes');
echo form_submit('submit', $_action);
?>
	</p>
	<?php 
echo form_close();
?>
</div>
							<form id="form-add-step" class="form-horizontal" enctype="multipart/form-data" action="" method="post" role="form">
								<div class="message-container"></div>
								<div class="form-group clearfix">
									<label class="col-sm-2 control-label" for="name">Name</label>
									<div class="col-lg-6 col-sm-10">
										<input type="text" name="name" id="name" class="form-control" value="<?php 
echo form_field('name', $data);
?>
">
									</div>
								</div>
								<div class="form-group clearfix">
									<label class="col-sm-2 control-label" for="content">Content</label>
									<div class="col-lg-6 col-sm-10">
										<textarea name="content" id="content" class="form-control ckeditor" rows="5"><?php 
echo form_field('content', $data);
?>
</textarea>
									</div>
								</div>
								<div class="form-group clearfix">
									<label class="col-sm-2 control-label" for="parent">Section</label>
									<div class="col-lg-6 col-sm-10">
										<select name="parent" id="parent" class="form-control">
											<?php 
option_html('', $sections);
?>
										</select>
									</div>
								</div>
								<div class="form-group clearfix">
Beispiel #5
0
	<legend><?php 
echo lang('accounts_edit_password_legend');
?>
</legend>

	<div class="box-container">
	<?php 
//	Reset Password
$_field = array();
$_field['key'] = 'password';
$_field['label'] = lang('accounts_edit_password_field_password_label');
$_field['default'] = '';
$_field['required'] = FALSE;
$_field['placeholder'] = lang('accounts_edit_password_field_password_placeholder');
echo form_field($_field, lang('accounts_edit_password_field_password_tip'));
// --------------------------------------------------------------------------
//	Require password update on log in
$_field = array();
$_field['key'] = 'temp_pw';
$_field['label'] = lang('accounts_edit_password_field_temp_pw_label');
$_field['default'] = FALSE;
$_field['required'] = FALSE;
$_options = array();
$_options[] = array('value' => 'TRUE', 'label' => lang('accounts_edit_password_field_temp_pw_yes'), 'selected' => $user_edit->temp_pw ? TRUE : FALSE);
$_options[] = array('value' => 'FALSE', 'label' => lang('accounts_edit_password_field_temp_pw_no'), 'selected' => !$user_edit->temp_pw ? TRUE : FALSE);
echo form_field_radio($_field, $_options);
?>
	</div>

</fieldset>
Beispiel #6
0
 function form_field_datetime($field, $help = '')
 {
     $_field = $field;
     $_field['type'] = 'datetime';
     $_field['class'] = isset($field['class']) ? $field['class'] . ' datetime' : 'datetime';
     $_field['placeholder'] = 'YYYY-MM-DD HH:mm:ss';
     return form_field($_field, $help);
 }
Beispiel #7
0
function form_input_hidden($name, $value = null, $custom_html = null)
{
    return form_field($name, $value, null, null, "hidden", $custom_html);
}
Beispiel #8
0
    echo form_field("int", "postInterval", 30);
    ?>
    <?php 
    echo form_field("int", "cookieDays", 365);
    ?>
    <?php 
    echo form_field("str", "layoutType", "liquid");
    ?>
    <?php 
    echo form_field("bol", "contRecording");
    ?>
    <?php 
    echo form_field("bol", "warn");
    ?>
    <?php 
    echo form_field("bol", "disabled");
    ?>
  </fieldset>
</form>

</body>
</html>
<?php 
} else {
    // process request
    $decoded = base64_decode($url);
    if ($decoded === FALSE) {
        $url = base64_encode($url);
    }
    if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'new') {
        header('Location: ' . INDEX_FILE_NAME . '?' . URL_PARAM_NAME . '=' . base64_encode($url));
Beispiel #9
0
 function form_edit($obj)
 {
     $dd = array($obj->id);
     $saved = 0;
     /* recupera post */
     $CI =& get_instance();
     $post = $CI->input->post();
     $cp = $obj->cp;
     /* Recupera dados do banco */
     $recupera = 0;
     /* recupera ACAO do post */
     $acao = '';
     if (!isset($post['acao'])) {
         $recupera = 1;
     }
     /* Save in table */
     if ($recupera == 0) {
         /* Valida */
         $saved = valida_post($cp);
     }
     $tela = '';
     $tela .= '<table class="tabela00" width="100%" border=0 >';
     $tela .= '<tr><td>' . form_open() . '</td></tr>';
     if ($recupera == 1) {
         /* recupera dados do banco */
         if (strlen($obj->tabela) > 0) {
             $data = le_dados($obj);
         } else {
             $recupera = 0;
         }
     } else {
         $data = array();
     }
     $tela .= 'Recupera = ' . $recupera;
     for ($r = 0; $r < count($cp); $r++) {
         /* Recupera dados */
         $vlr = '';
         if ($recupera == 1) {
             /* banco de dados */
             $fld = $cp[$r][1];
             if (isset($data->{$fld})) {
                 $vlr = $data->{$fld};
             }
         } else {
             if (isset($post['dd' . $r])) {
                 $vlr = $post['dd' . $r];
             }
         }
         $tela .= form_field($cp[$r], $vlr);
     }
     $tela .= '</table>';
     $tela .= form_close();
     $data = array('tela' => $tela, 'saved' => $saved);
     return $data;
 }
$_field['class'] = 'select2 weight-unit';
$_field['required'] = TRUE;
$_field['default'] = !empty($variation->shipping->weight_unit) ? $variation->shipping->weight_unit : 'G';
$_options = array();
$_options['G'] = 'Gram';
$_options['KG'] = 'Kilogram';
echo form_field_dropdown($_field, $_options);
// --------------------------------------------------------------------------
$_field = array();
$_field['key'] = 'variation[' . $_counter . '][shipping][weight]';
$_field['label'] = 'Boxed Weight';
$_field['placeholder'] = 'The weight of the item';
$_field['class'] = 'weight';
$_field['required'] = TRUE;
$_field['default'] = isset($variation->shipping->weight) ? $variation->shipping->weight : '';
echo form_field($_field, 'c**k and balls');
// --------------------------------------------------------------------------
$_field = array();
$_field['key'] = 'variation[' . $_counter . '][shipping][collection_only]';
$_field['label'] = 'Collection Only';
$_field['readonly'] = !app_setting('warehouse_collection_enabled', 'shop');
$_field['info'] = !app_setting('warehouse_collection_enabled', 'shop') ? '<strong>Warehouse Collection is disabled</strong>' : '';
$_field['info'] .= !app_setting('warehouse_collection_enabled', 'shop') && user_has_permission('admin[settings]') ? '<br />If you wish to allow customers to collect from your warehouse you must enable it in ' . anchor('admin/settings/shop', 'settings', 'class="confirm" data-title="Stop Editing?" data-body="Any unsaved changes will be lost."') . '.' : '';
$_field['class'] = 'collection-only';
$_field['default'] = isset($variation->shipping->collection_only) ? (bool) $variation->shipping->collection_only : FALSE;
$_tip = 'Items marked as collection only will be handled differently in checkout and reporting. They also dont contribute to the overall dimensions and weight of the order when calculating shipping costs.';
echo form_field_boolean($_field, $_tip);
// --------------------------------------------------------------------------
if ($is_first) {
    $_display = empty($num_variants) || $num_variants == 1 ? 'none' : 'block';
    echo '<p id="variation-sync-shipping" style="margin-top:1em;display:' . $_display . '">';
Beispiel #11
0
function form_select($name, $object, $label, $options)
{
    return form_field($name, $object, $label, html_select($name, $options, $object->{$name}));
}
Beispiel #12
0
$_field['placeholder'] = 'Maximum number of times this particular product can be added to the basket. Specify 0 for unlimited.';
echo form_field($_field, 'Limit the number of times an individual product can be added to an order. This only applies to a single product, i.e. an item with a limit of 1 can only be added once, but multiple (different) products of the same type can be added, but only once each. Specify 0 for unlimited.');
// --------------------------------------------------------------------------
$_field = array();
$_field['key'] = 'max_variations';
$_field['label'] = 'Max Variations';
$_field['placeholder'] = 'The maximum number of variations this type of product can have. Specify 0 for unlimited.';
$_field['default'] = isset($product_type->max_variations) ? $product_type->max_variations : '';
echo form_field($_field, 'Define the number of variations this product can have. Specify 0 for unlimited variations.');
// --------------------------------------------------------------------------
$_field = array();
$_field['key'] = 'ipn_method';
$_field['label'] = 'IPN Method';
$_field['placeholder'] = 'The IPN method to call upon notification of successfull payment.';
$_field['default'] = isset($product_type->ipn_method) ? $product_type->ipn_method : '';
echo form_field($_field, 'This method should be callable within the scope of `shop_order_model`. Do not include the `_process` method name prefix here.');
?>
			</fieldset>
			<p style="margin-top:1em;">
				<?php 
echo form_submit('submit', 'Save', 'class="awesome"');
?>
				<?php 
echo anchor('admin/shop/manage/product_type' . $is_fancybox, 'Cancel', 'class="awesome red confirm" data-title="Are you sure?" data-body="All unsaved changes will be lost."');
?>
			</p>
		</div>
	</section>
	<?php 
echo form_close();
?>
Beispiel #13
0
    echo form_field($_field);
    if ($template->additional_fields) {
        foreach ($template->additional_fields as $field) {
            //	Set the default key
            $field['default'] = !empty($cmspage->draft->template_data->data->additional_fields->{$template->slug}->{$field['key']}) ? $cmspage->draft->template_data->data->additional_fields->{$template->slug}->{$field['key']} : '';
            //	Override the field key
            $field['key'] = 'additional_field[' . $template->slug . '][' . $field['key'] . ']';
            //	Tip?
            $_tip = !empty($field['tip']) ? $field['tip'] : '';
            switch ($field['type']) {
                case 'dropdown':
                    $_options = !empty($field['options']) ? $field['options'] : array();
                    echo form_field_dropdown($field, $_options, $_tip);
                    break;
                default:
                    echo form_field($field, $_tip);
                    break;
            }
        }
    }
    echo '</div>';
}
?>
	</fieldset>

	<fieldset>
		<legend>Page Content</legend>
		<p>
			Choose which area of the page you'd like to edit.
		</p>
		<p>
							<form id="form-add-course" class="form-horizontal" enctype="multipart/form-data" action="" method="post" role="form">
								<div class="message-container"></div>
								<div class="form-group">
									<label class="col-sm-2 control-label" for="name">Name</label>
									<div class="col-sm-4">
										<input type="text" name="name" id="name" class="form-control" value="<?php 
echo form_field('name', $data);
?>
">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label" for="description">Description</label>
									<div class="col-sm-4">
										<textarea name="description" id="description" class="form-control" rows="3"><?php 
echo form_field('description', $data);
?>
</textarea>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label" for="">Image</label>
									<div class="col-sm-4">
										<input type="file" name="course_img_upload" id="course-img-upload" />
										<input type="hidden" name="file_change" class="file_change" value="" />
										<input type="hidden" name="image" id="image" value="" />
										<div class="img-preview clearfix">
											
										</div>
									</div>
								</div>
Beispiel #15
0
$_field = array();
$_field['key'] = 'default_homepage';
$_field['label'] = lang('accounts_groups_edit_basic_field_label_homepage');
$_field['default'] = $group->default_homepage;
$_field['required'] = TRUE;
$_field['placeholder'] = lang('accounts_groups_edit_basic_field_placeholder_homepage');
echo form_field($_field);
// --------------------------------------------------------------------------
//	Registration Redirect
$_field = array();
$_field['key'] = 'registration_redirect';
$_field['label'] = lang('accounts_groups_edit_basic_field_label_registration');
$_field['default'] = $group->registration_redirect;
$_field['required'] = FALSE;
$_field['placeholder'] = lang('accounts_groups_edit_basic_field_placeholder_registration');
echo form_field($_field, lang('accounts_groups_edit_basic_field_tip_registration'));
?>

		</fieldset>

		<!--	PERMISSIONS	-->
		<fieldset id="permissions">

			<legend><?php 
echo lang('accounts_groups_edit_permission_legend');
?>
</legend>

			<p class="system-alert message">
				<?php 
echo lang('accounts_groups_edit_permission_warn');
Beispiel #16
0
function form_input_hidden($name, $value = false, $custom_html = false)
{
    return form_field($name, $value, 0, 0, "hidden", $custom_html);
}
Beispiel #17
0
    function form_edit($obj)
    {
        $dd = array($obj->id);
        $saved = 0;
        /* recupera post */
        $CI =& get_instance();
        $post = $CI->input->post();
        $cp = $obj->cp;
        /* Recupera dados do banco */
        $recupera = 0;
        /* recupera ACAO do post */
        $acao = '';
        if (!isset($post['acao'])) {
            $recupera = 1;
        }
        /* Save in table */
        if ($recupera == 0) {
            /* Valida */
            $saved = valida_post($cp);
            if ($saved > 0) {
                form_save($obj);
            }
        }
        $tela = '';
        $tela .= '
			<table class="form_tabela" width="100%" border=0 >
			<tr>
				<td>' . form_open() . '</td>
			</tr>
			';
        if ($recupera == 1) {
            /* recupera dados do banco */
            if (strlen($obj->tabela) > 0) {
                $data = le_dados($obj);
            } else {
                $recupera = 0;
            }
        } else {
            $data = array();
        }
        //$tela .= 'Recupera = ' . $recupera;
        for ($r = 0; $r < count($cp); $r++) {
            /* Recupera dados */
            $vlr = '';
            if ($recupera == 1) {
                /* banco de dados */
                $fld = $cp[$r][1];
                if (isset($data->{$fld})) {
                    $vlr = $data->{$fld};
                }
            } else {
                if (isset($post['dd' . $r])) {
                    $vlr = $post['dd' . $r];
                }
            }
            $tela .= form_field($cp[$r], $vlr);
        }
        $tela .= '</table>';
        $tela .= "\n\t\t<script>\n\t\t\t\$(document).ready(function(){\n  \t\t\t\t\$('.date').mask('00/00/0000');\n  \t\t\t\t\$('.money').mask('000.000.000.000.000,00', {reverse: true});\n\t\t\t});\n\t\t</script>\n\t\t";
        $tela .= form_close();
        $data = array('tela' => $tela, 'saved' => $saved);
        return $data;
    }
Beispiel #18
0
$_field['id'] = 'blog-settings-social-layout';
$_field['default'] = app_setting($_field['key'], 'blog') ? app_setting($_field['key'], 'blog') : 'HORIZONTAL';
$_options = array();
$_options['HORIZONTAL'] = 'Horizontal';
$_options['VERTICAL'] = 'Vertical';
$_options['SINGLE'] = 'Single Button';
echo form_field_dropdown($_field, $_options);
// --------------------------------------------------------------------------
$_display = app_setting($_field['key'], 'blog') && app_setting($_field['key'], 'blog') == 'SINGLE' ? 'block' : 'none';
echo '<div id="blog-settings-social-layout-single-text" style="display:' . $_display . '">';
$_field = array();
$_field['key'] = 'social_layout_single_text';
$_field['label'] = 'Button Text';
$_field['default'] = app_setting($_field['key'], 'blog') ? app_setting($_field['key'], 'blog') : 'Share';
$_field['placeholder'] = 'Specify what text should be rendered on the button';
echo form_field($_field);
echo '</div>';
// --------------------------------------------------------------------------
$_field = array();
$_field['key'] = 'social_counters';
$_field['label'] = 'Show Counters';
$_field['id'] = 'social-counters';
$_field['default'] = app_setting($_field['key'], 'blog') ? TRUE : FALSE;
echo form_field_boolean($_field);
?>
				</fieldset>
				<p style="margin-top:1em;margin-bottom:0;">
					<?php 
echo form_submit('submit', lang('action_save_changes'), 'style="margin-bottom:0;"');
?>
				</p>
Beispiel #19
0
//	Description
$_field = array();
$_field['key'] = 'seo_description';
$_field['type'] = 'textarea';
$_field['label'] = 'Description';
$_field['default'] = isset($post->seo_description) ? $post->seo_description : '';
$_field['placeholder'] = 'The post\'s SEO description';
echo form_field($_field, 'This should be kept short (< 160 characters) and concise. It\'ll be shown in search result listings and search engines will use it to help determine the post\'s content.');
// --------------------------------------------------------------------------
//	Keywords
$_field = array();
$_field['key'] = 'seo_keywords';
$_field['label'] = 'Keywords';
$_field['default'] = isset($post->seo_keywords) ? $post->seo_keywords : '';
$_field['placeholder'] = 'Comma separated keywords relating to the content of the post.';
echo form_field($_field, 'SEO good practice recommend keeping the number of keyword phrases below 10 and less than 160 characters in total.');
?>
			</div>

		</section>

		<p>
			<?php 
echo form_submit('submit', lang('action_save_changes'));
?>
		</p>

	<?php 
echo form_close();
?>
</div>