textarea() public static method

public static textarea ( $name, $value = '', $attributes = [] )
Example #1
0
function meta_acpt_slide_options()
{
    $form = new form('slide', null);
    $form->image('image', array('label' => 'Image URL', 'help' => 'Upload an Image that is 940px by 350px for best results', 'button' => 'Add Your Slide'));
    $form->text('headline', array('label' => 'Headline'));
    $form->textarea('description', array('label' => 'Description'));
    $form->select('showText', array('Yes', 'No'), array('label' => 'Show Headline and Description'));
}
Example #2
0
 public function render(&$upload, $errors = array())
 {
     // Load base template and attributes
     $result = parent::render($render_variables, $errors);
     $result['template']->element = form::textarea($result['attributes'], $this->value);
     // Return the resulting output
     return (string) $result['template']->render();
 }
Example #3
0
function meta_custom()
{
    $form = new form('details', null);
    $form->text('name', array('label' => 'Text Field'));
    $form->image('image', array('label' => 'Image Field', 'button' => 'Add Your Image'));
    $form->file('file', array('label' => 'File Field', 'button' => 'Select a File'));
    $form->textarea('address', array('label' => 'Textarea', 'validate' => 'html'));
    $form->select('rooms', array('one', 'two', 'three'), array('label' => 'Select List'));
    $form->radio('baths', array('blue', 'green', 'red'), array('label' => 'Radio Buttons'));
    $form->editor('baths', 'WYSIWYG Editor');
}
Example #4
0
 public function edit($url)
 {
     $display_name = ucwords(str_replace('_', ' ', $url));
     $this->__set_heading("Editing Theme file - " . $display_name);
     $view = new View('zest/content');
     $content = form::open('admin/snippets/save/' . $url);
     $html = zest::template_to_html(THEME_PATH . $url);
     $content .= form::label('content', 'Code');
     $content .= '<p><small>This is only for advanced users. To edit <a onclick="$(\'#content\').toggle();return false;" href="#">click here</a></small></p>';
     $content .= form::textarea('content', $html, 'id="content" class="fullWidth no-editor hside"');
     $content .= form::submit('submit', 'Save', 'class="submit"');
     $content .= form::close();
     $view->content = $content;
     $this->__set_content($view);
 }
 public function gui($url)
 {
     $bls = $this->getServers();
     if (isset($_POST['bls'])) {
         try {
             $this->core->blog->settings->setNameSpace('antispam');
             $this->core->blog->settings->put('antispam_dnsbls', $_POST['bls'], 'string', 'Antispam DNSBL servers', true, false);
             http::redirect($url . '&upd=1');
         } catch (Exception $e) {
             $core->error->add($e->getMessage());
         }
     }
     /* DISPLAY
     		---------------------------------------------- */
     $res = '';
     $res .= '<form action="' . html::escapeURL($url) . '" method="post">' . '<fieldset><legend>' . __('IP Lookup servers') . '</legend>' . '<p>' . __('Add here a coma separated list of servers.') . '</p>' . '<p>' . form::textarea('bls', 40, 3, html::escapeHTML($bls), 'maximal') . '</p>' . '<p><input type="submit" value="' . __('Save') . '" />' . $this->core->formNonce() . '</p>' . '</fieldset>' . '</form>';
     return $res;
 }
 public function getHtmlField($aPostedData)
 {
     $return = '';
     switch ($this->type) {
         # Champ texte
         default:
         case 1:
             $return = '<p class="field" id="' . $this->html_id . '-wrapper">' . '<label for="' . $this->html_id . '"' . ($this->status == 2 ? ' class="required" title="' . __('c_c_required_field') . '"' : '') . '>' . html::escapeHTML($this->title) . '</label>' . form::text($this->html_id, 60, 255, $aPostedData[$this->id]) . '</p>';
             break;
             # Zone de texte
         # Zone de texte
         case 2:
             $return = '<p class="field" id="' . $this->html_id . '-wrapper">' . '<label for="' . $this->html_id . '"' . ($this->status == 2 ? ' class="required" title="' . __('c_c_required_field') . '"' : '') . '>' . html::escapeHTML($this->title) . '</label>' . form::textarea($this->html_id, 58, 10, $aPostedData[$this->id]) . '</p>';
             break;
             # Menu déroulant
         # Menu déroulant
         case 3:
             $values = array_filter((array) unserialize($this->value));
             $return = '<p class="field" id="' . $this->html_id . '-wrapper">' . '<label for="' . $this->html_id . '"' . ($this->status == 2 ? ' class="required" title="' . __('c_c_required_field') . '"' : '') . '>' . html::escapeHTML($this->title) . '</label>' . form::select($this->html_id, array_flip($values), $aPostedData[$this->id]) . '</p>';
             break;
             # Boutons radio
         # Boutons radio
         case 4:
             $values = array_filter((array) unserialize($this->value));
             $str = '';
             foreach ($values as $k => $v) {
                 $str .= '<li><label>' . form::radio(array($this->html_id, $this->html_id . '_' . $k), $k, $k == $aPostedData[$this->id]) . html::escapeHTML($v) . '</label></li>';
             }
             $return = '<p class="field" id="' . $this->html_id . '-wrapper">' . '<span class="fake-label">' . html::escapeHTML($this->title) . '</span></p>' . '<ul class="checklist">' . $str . '</ul>';
             break;
             # Cases à cocher
         # Cases à cocher
         case 5:
             $values = array_filter((array) unserialize($this->value));
             $str = '';
             foreach ($values as $k => $v) {
                 $str .= '<li><label>' . form::checkbox(array($this->html_id . '[' . $k . ']', $this->html_id . '_' . $k), $k, in_array($k, $aPostedData[$this->id])) . html::escapeHTML($v) . '</label></li>';
             }
             $return = '<p class="field" id="' . $this->html_id . '-wrapper">' . '<span class="fake-label">' . html::escapeHTML($this->title) . '</span></p>' . '<ul class="checklist">' . $str . '</ul>';
             break;
     }
     return $return;
 }
 public function gui($url)
 {
     $bls = $this->getServers();
     if (isset($_POST['bls'])) {
         try {
             $this->core->blog->settings->addNamespace('antispam');
             $this->core->blog->settings->antispam->put('antispam_dnsbls', $_POST['bls'], 'string', 'Antispam DNSBL servers', true, false);
             dcPage::addSuccessNotice(__('The list of DNSBL servers has been succesfully updated.'));
             http::redirect($url);
         } catch (Exception $e) {
             $core->error->add($e->getMessage());
         }
     }
     /* DISPLAY
     		---------------------------------------------- */
     $res = dcPage::notices();
     $res .= '<form action="' . html::escapeURL($url) . '" method="post" class="fieldset">' . '<h3>' . __('IP Lookup servers') . '</h3>' . '<p><label for="bls">' . __('Add here a coma separated list of servers.') . '</label>' . form::textarea('bls', 40, 3, html::escapeHTML($bls), 'maximal') . '</p>' . '<p><input type="submit" value="' . __('Save') . '" />' . $this->core->formNonce() . '</p>' . '</form>';
     return $res;
 }
Example #8
0
echo "<fieldset>";
foreach (array('gname', 'sname', 'badge', 'dob', 'email', 'phone', 'cell', 'city', 'prov', 'econtact', 'ephone') as $field) {
    if (!@$fields[$field]) {
        continue;
    }
    echo new View('global/_form_field', array('field' => $field, 'fieldData' => $fields[$field], 'value' => $form[$field], 'hasError' => isset($errors[$field]) && $errors[$field]));
}
echo '</fieldset>';
echo '<h1>' . HTML::chars(__('convention.registration_select_pass_header')) . '</h1>';
echo '<p>' . HTML::chars(__('convention.registration_select_pass_desc')) . '</p>';
echo '<fieldset>';
$field = 'pass_id';
echo new View('global/_form_field', array('field' => $field, 'fieldData' => $fields[$field], 'value' => $form[$field], 'hasError' => isset($errors[$field]) && $errors[$field]));
echo '</fieldset>';
echo '<h1>' . HTML::chars(__('convention.registration_tac_header')) . '</h1>';
echo '<p>' . HTML::chars(__('convention.registration_tac_desc')) . '</p>';
echo '<fieldset>';
echo form::textarea('agree_toc', __('convention.registration_tac'), array('rows' => 15, 'style' => 'width:95%; margin-left: 2%;'));
$field = 'agree_toc';
$fields[$field]['type'] = 'boolean';
$fields[$field]['required'] = true;
if (!isset($form[$field])) {
    $form[$field] = 0;
}
echo new View('global/_form_field', array('field' => $field, 'fieldData' => $fields[$field], 'value' => $form[$field], 'hasError' => isset($errors[$field]) && $errors[$field]));
echo '</fieldset>';
echo "<fieldset class='left'>";
echo form::submit(null, __('convention.registration_submit'));
echo '</fieldset>';
echo form::close();
echo '</div>';
 private function _editor($blog)
 {
     if ($blog->validate($_POST)) {
         $blog->user_id = $this->a2->get_user()->id;
         $blog->save();
         return $this->index();
     }
     //show form
     echo form::open();
     echo 'text:' . form::textarea('text', $blog->text) . '<br>';
     echo form::submit(array('value' => 'post'));
     echo form::close();
 }
Example #10
0
	Advogado:<br>
	<?php 
echo form::dropdown('advogado_id', $advogados, $procedimento->advogado_id);
?>
</div>
<div class="grid_6 omega">
	Tipo de procedimento:<br>
	<?php 
echo form::dropdown('tipo_procedimento_id', $tipo_procedimentos, $procedimento->tipo_procedimento_id);
?>
</div>
<div class="clear"></div>
<div class="grid_12 omega alpha">
	Observações:<br>
	<?php 
echo form::textarea(array('id' => 'observacoes', 'name' => 'observacoes', 'rows' => '5'), $procedimento->observacoes);
?>
</div>
<div class="clear"></div>

<div class="grid_10 alpha">
	&nbsp;
</div>
<div class="grid_2 omega">
	<br>
	<?php 
echo form::submit('btn_save', 'Gravar');
?>
</div>
<?php 
echo form::close();
Example #11
0
:</a></h4>
								<?php 
echo form::input('action_email_subject', '');
?>
							</div>

							<div class="tab_form_item" id="action_form_email_body" style="margin-right:75px;">
								<h4><a href="#" class="tooltip" title="<?php 
echo htmlspecialchars(Kohana::lang("tooltips.actions.email_body"));
?>
"><?php 
echo Kohana::lang('ui_admin.body');
?>
:</a></h4>
								<?php 
echo form::textarea('action_email_body', '');
?>
							</div>

							<div class="tab_form_item" id="action_form_add_category" style="margin-right:75px;">
								<h4><a href="#" class="tooltip" title="<?php 
echo htmlspecialchars(Kohana::lang("tooltips.actions.add_to_category"));
?>
"><?php 
echo Kohana::lang('ui_admin.add_to_category');
?>
:</a></h4>
								<?php 
// categories, selected_categories, form field name, number of columns
echo category::tree($categories, FALSE, array(), 'action_add_category', 2);
?>
Example #12
0
    echo form::text(array('p_name_seo[' . $aLanguage['code'] . ']', 'p_name_seo_' . $aLanguage['code']), 60, 255, isset($okt->partners->config->name_seo[$aLanguage['code']]) ? html::escapeHTML($okt->partners->config->name_seo[$aLanguage['code']]) : '');
    ?>
</p>

				<p class="field" lang="<?php 
    echo $aLanguage['code'];
    ?>
"><label for="p_meta_keywords_<?php 
    echo $aLanguage['code'];
    ?>
"><?php 
    $okt->languages->unique ? _e('c_c_seo_meta_keywords') : printf(__('c_c_seo_meta_keywords_in_%s'), html::escapeHTML($aLanguage['title']));
    ?>
<span class="lang-switcher-buttons"></span></label>
				<?php 
    echo form::textarea(array('p_meta_keywords[' . $aLanguage['code'] . ']', 'p_meta_keywords_' . $aLanguage['code']), 57, 5, isset($okt->partners->config->meta_keywords[$aLanguage['code']]) ? html::escapeHTML($okt->partners->config->meta_keywords[$aLanguage['code']]) : '');
    ?>
</p>

				<?php 
}
?>

			</fieldset>

			<fieldset>
				<legend><?php 
_e('c_c_seo_schema_url');
?>
</legend>
Example #13
0
            $core->blog->delComment($comment_id);
            http::redirect($core->getPostAdminURL($rs->post_type, $rs->post_id) . '&co=1#c' . $comment_id, false);
        } catch (Exception $e) {
            $core->error->add($e->getMessage());
        }
    }
    if (!$can_edit) {
        $core->error->add(__("You can't edit this comment."));
    }
}
/* DISPLAY
-------------------------------------------------------- */
dcPage::open(__('Edit comment'), dcPage::jsConfirmClose('comment-form') . dcPage::jsToolBar() . dcPage::jsLoad('js/_comment.js'));
if ($comment_id) {
    if (!empty($_GET['upd'])) {
        echo '<p class="message">' . __('Comment has been successfully updated.') . '</p>';
    }
    $comment_mailto = '';
    if ($comment_email) {
        $comment_mailto = '<a href="mailto:' . html::escapeHTML($comment_email) . '?subject=' . rawurlencode(sprintf(__('Your comment on my blog %s'), $core->blog->name)) . '&body=' . rawurlencode(sprintf(__("Hi!\n\nYou wrote a comment on:\n%s\n\n\n"), $rs->getPostURL())) . '">' . __('Send an e-mail') . '</a>';
    }
    echo '<h2>' . html::escapeHTML($core->blog->name) . ' &rsaquo; ' . __('Edit comment') . '</h2>';
    echo '<p><a class="back" href="' . $core->getPostAdminURL($post_type, $post_id) . '&amp;co=1#c' . $comment_id . '"> ' . sprintf(__('Back to "%s"'), $post_title) . '</a></p>';
    echo '<form action="comment.php" method="post" id="comment-form">' . '<p><label>' . __('IP address:') . '</label> ' . '<a href="comments.php?ip=' . $comment_ip . '">' . $comment_ip . '</a></p>' . '<p><label>' . __('Date:') . '</label> ' . dt::dt2str(__('%Y-%m-%d %H:%M'), $comment_dt) . '</p>' . '<p><label class="required" title="' . __('Required field') . '">' . __('Author:') . form::field('comment_author', 30, 255, html::escapeHTML($comment_author)) . '</label></p>' . '<p><label>' . __('Email:') . form::field('comment_email', 30, 255, html::escapeHTML($comment_email)) . $comment_mailto . '</label></p>' . '<p><label>' . __('Web site:') . form::field('comment_site', 30, 255, html::escapeHTML($comment_site)) . '</label></p>' . '<p><label>' . __('Status:') . form::combo('comment_status', $status_combo, $comment_status, '', '', !$can_publish) . '</label></p>' . $core->callBehavior('adminAfterCommentDesc', $rs) . '<p class="area"><label for="comment_content">' . __('Comment:') . '</label> ' . form::textarea('comment_content', 50, 10, html::escapeHTML($comment_content)) . '</p>' . '<p>' . form::hidden('id', $comment_id) . $core->formNonce() . '<input type="submit" accesskey="s" name="update" value="' . __('save') . '" /> ';
    if ($can_delete) {
        echo '<input type="submit" name="delete" value="' . __('delete') . '" />';
    }
    echo '</p>' . '</form>';
}
dcPage::helpBlock('core_comments');
dcPage::close();
Example #14
0
											<div class="org_contact_row">
					                        	<h4>Email:</h4>
												<?php 
    print form::input('email', $form['email'], ' class="text long"');
    ?>
					                        </div>
											<div class="org_contact_row">
					                        	<h4>Phone:</h4>
												<?php 
    print form::input('phone', $form['phone'], ' class="text long"');
    ?>
					                        </div>
											<div class="org_contact_row">
					                        	<h4>Message:</h4>
												<?php 
    print form::textarea('message', $form['message'], ' rows="4" cols"20" class="textarea long" ');
    ?>
					                        </div>
											<div class="org_contact_row">
												<h4>Security Code:</h4>
												<?php 
    print $captcha->render();
    ?>
<br />
												<?php 
    print form::input('captcha', $form['captcha'], ' class="text"');
    ?>
					                        </div>
											<div class="org_contact_row">
					                        	<input class="btn_blue" type="submit" value="Send Message" />
					                        </div>
Example #15
0
?>
					<h4><?php 
echo Kohana::lang('ui_main.reports_title');
?>
 <span class="required">*</span> </h4>
					<?php 
print form::input('incident_title', $form['incident_title'], ' class="text long"');
?>
				</div>
				<div class="report_row">
					<h4><?php 
echo Kohana::lang('ui_main.reports_description');
?>
 <span class="required">*</span> </h4>
					<?php 
print form::textarea('incident_description', $form['incident_description'], ' rows="10" class="textarea long" ');
?>
				</div>
				<div class="report_row" id="datetime_default">
					<h4>
						<a href="#" id="date_toggle" class="show-more"><?php 
echo Kohana::lang('ui_main.modify_date');
?>
</a>
						<?php 
echo Kohana::lang('ui_main.date_time');
?>
: 
						<?php 
echo Kohana::lang('ui_main.today_at') . " " . "<span id='current_time'>" . $form['incident_hour'] . ":" . $form['incident_minute'] . " " . $form['incident_ampm'] . "</span>";
?>
Example #16
0
								<div class="report_row">
									<strong>Your Phone Number:</strong><br />
									<?php 
print form::input('contact_phone', $form['contact_phone'], ' class="text"');
?>
								</div>
								<div class="report_row">
									<strong>Message Subject:</strong><br />
									<?php 
print form::input('contact_subject', $form['contact_subject'], ' class="text"');
?>
								</div>								
								<div class="report_row">
									<strong>Message:</strong><br />
									<?php 
print form::textarea('contact_message', $form['contact_message'], ' rows="4" cols="40" class="textarea long" ');
?>
								</div>		
								<!-- <div class="report_row"> 
									<strong>Security Code:</strong><br />
									<?php 
// print $captcha->render();
?>
<br />
									<?php 
// print form::input('captcha', $form['captcha'], ' class="text"');
?>
								</div> -->
								<div class="report_row">
									<input name="submit" type="submit" value="Send Message" class="btn_submit" />
								</div>
Example #17
0
}
#Phần hiển thị
$rainTpl = new RainTPL();
$rainTpl->assign('load_header', $load_header);
$rainTpl->assign('module_name', $module_name);
$rainTpl->assign('error_msg', print_error_msg($bg_errorMsg));
$html_page = '';
$form = new form();
$html_page .= $form->form_open();
$html_page .= $form->textnote('Các trường có dấu (<span class="form-asterick">*</span>) là bắt buộc nhập');
/**
 * something here
 */
$html_page .= $form->text(array('label' => 'Tên thuốc', 'name' => 'pha_name', 'id' => 'pha_name', 'value' => $pha_name, 'require' => 1, 'errorMsg' => 'Bạn chưa nhập tên thuốc', 'placeholder' => 'tên thuốc', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->text(array('label' => 'Tiêu đề thuốc', 'name' => 'pha_title', 'id' => 'pha_title', 'value' => $pha_title, 'require' => 1, 'errorMsg' => 'Bạn chưa nhập tiêu đề thuốc', 'placeholder' => 'tiêu đề thuốc', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->textarea(array('label' => 'Mô tả', 'name' => 'pha_description', 'id' => 'pha_description', 'value' => $pha_description, 'require' => 0, 'placeholder' => 'Mô tả thuốc', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->textarea(array('label' => 'Nội dung', 'name' => 'pha_content', 'id' => 'pha_content', 'value' => $pha_content, 'require' => 0, 'placeholder' => 'Nội dung thuốc', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->text(array('label' => 'Mã đăng ký', 'name' => 'pha_so_dang_ky', 'id' => 'pha_so_dang_ky', 'value' => $pha_so_dang_ky, 'require' => 1, 'placeholder' => 'Mã đăng ký', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->text(array('label' => 'Dạng bào chế', 'name' => 'pha_dang_bao_che', 'id' => 'pha_dang_bao_che', 'value' => $pha_dang_bao_che, 'require' => 1, 'placeholder' => 'Dạng bào chế', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->text(array('label' => 'Đóng gói', 'name' => 'pha_dong_goi', 'id' => 'pha_dong_goi', 'value' => $pha_dong_goi, 'require' => 0, 'placeholder' => 'Pha đóng gói', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->text(array('label' => 'Giá bán buôn', 'name' => 'pha_gia_buon', 'id' => 'pha_gia_buon', 'value' => $pha_gia_buon, 'require' => 0, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->text(array('label' => 'Giá bán lẻ', 'name' => 'pha_gia_le', 'id' => 'pha_gia_le', 'value' => $pha_gia_le, 'require' => 0, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->text(array('label' => 'Nhà sản xuất', 'name' => 'pha_nha_sx_name', 'id' => 'pha_nha_sx_name', 'value' => $pha_nha_sx_name, 'require' => 0, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->text(array('label' => 'Nhà đăng ký', 'name' => 'pha_nha_dk_name', 'id' => 'pha_nha_dk_name', 'value' => $pha_nha_dk_name, 'require' => 0, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->text(array('label' => 'Nhóm dược lý', 'name' => 'pha_nhom_duoc_ly', 'id' => 'pha_nhom_duoc_ly', 'value' => $check_name_ndl, 'require' => 1, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->textarea(array('label' => 'Thành phần', 'name' => 'pha_thanh_phan', 'id' => 'pha_thanh_phan', 'value' => $pha_thanh_phan, 'require' => 1, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->text(array('label' => 'Hàm lượng', 'name' => 'pha_ham_luong', 'id' => 'pha_ham_luong', 'value' => $pha_ham_luong, 'require' => 0, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->textarea(array('label' => 'Chỉ định', 'name' => 'pha_chi_dinh', 'id' => 'pha_chi_dinh', 'value' => $pha_chi_dinh, 'require' => 1, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->textarea(array('label' => 'Chống chỉ định', 'name' => 'pha_chong_chi_dinh', 'id' => 'pha_chong_chi_dinh', 'value' => $pha_chong_chi_dinh, 'require' => 0, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->textarea(array('label' => 'Tương tác thuốc', 'name' => 'pha_tuong_tac_thuoc', 'id' => 'pha_tuong_tac_thuoc', 'value' => $pha_tuong_tac_thuoc, 'require' => 0, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->textarea(array('label' => 'Tác dụng phụ', 'name' => 'pha_tac_dung_phu', 'id' => 'pha_tac_dung_phu', 'value' => $pha_tac_dung_phu, 'require' => 0, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
Example #18
0
                <td><?php 
echo form::label('ngay_sinh', 'Ngày sinh:');
?>
</td>
                <td><?php 
echo form::input('ngay_sinh', empty($_POST['ngay_sinh']) ? date("d-m-Y", strtotime($people['ngay_sinh'])) : $_POST['ngay_sinh'], $attributes = array('id' => 'ngay_sinh'));
?>
                </td>
            </tr>
            <tr>
                <td><?php 
echo form::label('mieu_ta', 'Miêu tả:');
?>
</td>
                <td><?php 
echo form::textarea('mieu_ta', empty($_POST['mieu_ta']) ? $people['mieu_ta'] : $_POST['mieu_ta'], array('id' => 'mieu_ta', 'class' => 'editor'));
?>
                </td>
            </tr>

            <?php 
if (isset($errors)) {
    print_r($errors);
    ?>
                        <tr>
                            <td colspan="3">
                                <ul class="error">
                        <?php 
    foreach ($errors as $name => $message) {
        echo "<li>{$message}</li>";
    }
             echo "</div>";
         }
         if ($field_options['field_datatype'] == 'javascript') {
             if (isset($editor)) {
                 echo "<div class=\"report_row\" id=\"custom_field_row_" . $field_id . "\">";
                 echo "<h4>" . $field_property['field_name'] . $isrequired . " " . $isprivate . "</h4>";
                 echo form::textarea('custom_field[' . $field_id . ']', $field_value, $extra_fields, false);
                 echo "</div>";
             } else {
                 echo '<script type="text/javascript">' . $field_property['field_default'] . '</script>';
             }
         }
     } else {
         echo "<div class=\"report_row\" id=\"custom_field_row_" . $field_id . "\">";
         echo "<h4>" . $field_property['field_name'] . $isrequired . " " . $isprivate . "</h4>";
         echo form::textarea('custom_field[' . $field_id . ']', $field_value, $id_name . ' class="textarea custom_text" rows="3"');
         echo "</div>";
     }
 } elseif ($field_property['field_type'] == 3) {
     // Date Field
     echo "<div class=\"report_row\" id=\"custom_field_row_" . $field_id . "\">";
     echo "<h4>" . $field_property['field_name'] . $isrequired . " " . $isprivate . "</h4>";
     echo form::input('custom_field[' . $field_id . ']', $field_value, ' id="custom_field_' . $field_id . '" class="text"');
     echo "<script type=\"text/javascript\">\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\$(\"#custom_field_" . $field_id . "\").datepicker({\n\t\t\t\tshowOn: \"both\",\n\t\t\t\tbuttonImage: \"" . url::file_loc('img') . "media/img/icon-calendar.gif\",\n\t\t\t\tbuttonImageOnly: true\n\t\t\t\t});\n\t\t\t\t});\n\t\t\t</script>";
     echo "</div>";
 } elseif ($field_property['field_type'] >= 5 and $field_property['field_type'] <= 7) {
     // Multiple-selector Fields
     echo "<div class=\"report_row\" id=\"custom_field_row_" . $field_id . "\">";
     echo "<h4>" . $field_property['field_name'] . $isrequired . " " . $isprivate . "</h4>";
     $defaults = explode('::', $field_property['field_default']);
     $default = isset($defaults[1]) ? $defaults[1] : 0;
Example #20
0
?>
        </div>
        <div id="plural-many" class="translationField hidden">
          <label for="l10n-edit-plural-translation-many">[many]</label>
          <?php 
echo form::textarea("l10n-edit-plural-translation-many", "", ' rows="2"');
?>
        </div>
        <div id="plural-other" class="translationField hidden">
          <label for="l10n-edit-plural-translation-other">[other]</label>
          (<a href="http://www.unicode.org/cldr/data/charts/supplemental/language_plural_rules.html"><?php 
echo t("learn more about plural forms");
?>
</a>)
          <?php 
echo form::textarea("l10n-edit-plural-translation-other", "", ' rows="2"');
?>
        </div>
        <input type="submit" name="l10n-edit-save" value="<?php 
echo t("Save translation")->for_html_attr();
?>
"/>
        <a href="javascript: Gallery.l10nClient.copySourceText()"
           class="g-button ui-state-default ui-corner-all"><?php 
echo t("Copy source text");
?>
</a>
      </form>
    </div>
  </div>
  <script type="text/javascript">
Example #21
0
						<div class="tab_form_item2">
							<strong><?php 
echo Kohana::lang('ui_main.page_tab_name');
?>
:</strong><br />
							<?php 
print form::input('page_tab', $form['page_tab'], ' class="text long"');
?>
						</div>
						<div class="tab_form_item2">
							<strong><?php 
echo Kohana::lang('ui_main.page_description');
?>
:</strong><br />
							<?php 
print form::textarea('page_description', $form['page_description'], ' rows="12" cols="60" ');
?>
						</div>
						<div class="tab_form_item">
							&nbsp;<br />
							<input type="image" src="<?php 
echo url::base();
?>
media/img/admin/btn-save.gif" class="save-rep-btn" />
						</div>
						<?php 
print form::close();
?>
					</div>
				</div>
				
Example #22
0
 /**
  * Ajax call to update Incident Reporting Form
  */
 public function switch_form()
 {
     $this->template = "";
     $this->auto_render = FALSE;
     isset($_POST['form_id']) ? $form_id = $_POST['form_id'] : ($form_id = "1");
     isset($_POST['incident_id']) ? $incident_id = $_POST['incident_id'] : ($incident_id = "");
     $html = "";
     $fields_array = array();
     $custom_form = ORM::factory('form', $form_id)->orderby('field_position', 'asc');
     foreach ($custom_form->form_field as $custom_formfield) {
         $fields_array[$custom_formfield->id] = array('field_id' => $custom_formfield->id, 'field_name' => $custom_formfield->field_name, 'field_type' => $custom_formfield->field_type, 'field_required' => $custom_formfield->field_required, 'field_maxlength' => $custom_formfield->field_maxlength, 'field_height' => $custom_formfield->field_height, 'field_width' => $custom_formfield->field_width, 'field_isdate' => $custom_formfield->field_isdate, 'field_response' => '');
         // Load Data, if Any
         foreach ($custom_formfield->form_response as $form_response) {
             if ($form_response->incident_id = $incident_id) {
                 $fields_array[$custom_formfield->id]['field_response'] = $form_response->form_response;
             }
         }
     }
     foreach ($fields_array as $field_property) {
         $html .= "<div class=\"row\">";
         $html .= "<h4>" . $field_property['field_name'] . "</h4>";
         if ($field_property['field_type'] == 1) {
             // Text Field
             // Is this a date field?
             if ($field_property['field_isdate'] == 1) {
                 $html .= form::input('custom_field[' . $field_property['field_id'] . ']', $field_property['field_response'], ' id="custom_field_' . $field_property['field_id'] . '" class="text"');
                 $html .= "<script type=\"text/javascript\">\n\t\t\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\t\$(\"#custom_field_" . $field_property['field_id'] . "\").datepicker({ \n\t\t\t\t\t\t\tshowOn: \"both\", \n\t\t\t\t\t\t\tbuttonImage: \"" . url::base() . "media/img/icon-calendar.gif\", \n\t\t\t\t\t\t\tbuttonImageOnly: true \n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t</script>";
             } else {
                 $html .= form::input('custom_field[' . $field_property['field_id'] . ']', $field_property['field_response'], ' id="custom_field_' . $field_property['field_id'] . '" class="text custom_text"');
             }
         } elseif ($field_property['field_type'] == 2) {
             // TextArea Field
             $html .= form::textarea('custom_field[' . $field_property['field_id'] . ']', $field_property['field_response'], ' class="custom_text" rows="3"');
         }
         $html .= "</div>";
     }
     echo json_encode(array("status" => "success", "response" => $html));
 }
									<h4>Translated Title</h4>
									<?php 
print form::input('incident_title', $form['incident_title'], ' class="text title nofloat"');
?>
									<div style="clear:both;"></div>
								</div>
							</div>
							<div class="row">
								<h4>Original Description <span>Please include as much detail as possible.</span></h4>
								<?php 
print form::textarea('orig_description', $orig_description, ' readonly="readonly" rows="12" cols="40" ');
?>
								<div class="translation">
									<h4>Translated Description</h4>
									<?php 
print form::textarea('incident_description', $form['incident_description'], ' rows="12" cols="40" class="nofloat"');
?>
									<div style="clear:both;"></div>
								</div>
							</div>
						</div>
						
						<input id="save_only" type="image" src="<?php 
print url::base();
?>
media/img/admin/btn-save-report.gif" class="save-rep-btn" />
						<input id="save_close" type="image" src="<?php 
print url::base();
?>
media/img/admin/btn-save-and-close.gif" class="save-close-btn" />
						<input id="cancel" type="image" src="<?php 
Example #24
0
        echo form::text(array('p_title_seo[' . $aLanguage['code'] . ']', 'p_title_seo_' . $aLanguage['code']), 60, 255, html::escapeHTML($aCategoryLocalesData[$aLanguage['code']]['title_seo']));
        ?>
</p>

			<p class="field" lang="<?php 
        echo $aLanguage['code'];
        ?>
"><label for="p_meta_keywords_<?php 
        echo $aLanguage['code'];
        ?>
"><?php 
        $okt->languages->unique ? _e('c_c_seo_meta_keywords') : printf(__('c_c_seo_meta_keywords_in_%s'), $aLanguage['title']);
        ?>
 <span class="lang-switcher-buttons"></span></label>
			<?php 
        echo form::textarea(array('p_meta_keywords[' . $aLanguage['code'] . ']', 'p_meta_keywords_' . $aLanguage['code']), 58, 5, html::escapeHTML($aCategoryLocalesData[$aLanguage['code']]['meta_keywords']));
        ?>
</p>

			<div class="lockable" lang="<?php 
        echo $aLanguage['code'];
        ?>
">
				<p class="field"><label for="p_slug_<?php 
        echo $aLanguage['code'];
        ?>
"><?php 
        $okt->languages->unique ? _e('c_c_seo_url') : printf(__('c_c_seo_url_in_%s'), $aLanguage['title']);
        ?>
 <span class="lang-switcher-buttons"></span></label>
				<?php 
Example #25
0
						<div class="tab_form_item2">
							<strong>Organization Name:</strong><br />
							<?php 
print form::input('organization_name', $form['organization_name'], ' class="text long"');
?>
						</div>
						<div class="tab_form_item2">
							<strong>Organization Website:</strong><br />
							<?php 
print form::input('organization_website', $form['organization_website'], ' class="text long"');
?>
						</div>
						<div class="tab_form_item2">
							<strong>Organization Description:</strong><br />
							<?php 
print form::textarea('organization_description', $form['organization_description'], ' rows="12" cols="60" ');
?>
						</div>
						<div class="tab_form_item2">
							<strong>Organization Email:</strong><br />
							<?php 
print form::input('organization_email', $form['organization_email'], ' class="text long"');
?>
						</div>
						<div class="tab_form_item2">
							<strong>Organization Phone 1:</strong><br />
							<?php 
print form::input('organization_phone1', $form['organization_phone1'], ' class="text long"');
?>
						</div>
						<div class="tab_form_item2">
Example #26
0
        $field_id = $field->id;
        $field_name = $field->field_name;
        $field_default = $field->field_default;
        $field_required = $field->field_required;
        $field_width = $field->field_width;
        $field_height = $field->field_height;
        $field_maxlength = $field->field_maxlength;
        $field_position = $field->field_position;
        $field_type = $field->field_type;
        $field_isdate = $field->field_isdate;
        $form_fields .= "<div class=\"forms_fields_item\">";
        $form_fields .= "\t<strong>" . $field_name . ":</strong><br />";
        if ($field_type == 1) {
            $form_fields .= form::input("custom_" . $field_id, '', '');
        } elseif ($field_type == 2) {
            $form_fields .= form::textarea("custom_" . $field_id, '');
        }
        if ($field_isdate == 1) {
            $form_fields .= "&nbsp;<a href=\"#\"><img src = \"" . url::base() . "media/img/icon-calendar.gif\"  align=\"middle\" border=\"0\"></a>";
        }
        $form_fields .= "\t<div class=\"forms_fields_edit\">\n\t\t\t\t\t\t\t\t\t<a href=\"javascript:fieldAction('e','EDIT'," . $field_id . "," . $form_id . "," . $field_type . ");\">EDIT</a>&nbsp;|&nbsp;\n\t\t\t\t\t\t\t\t\t<a href=\"javascript:fieldAction('d','DELETE'," . $field_id . "," . $form_id . "," . $field_type . ");\">DELETE</a>&nbsp;|&nbsp;\n\t\t\t\t\t\t\t\t\t<a href=\"javascript:fieldAction('mu','MOVE'," . $field_id . "," . $form_id . "," . $field_type . ");\">MOVE UP</a>&nbsp;|&nbsp;\n\t\t\t\t\t\t\t\t\t<a href=\"javascript:fieldAction('md','MOVE'," . $field_id . "," . $form_id . "," . $field_type . ");\">MOVE DOWN</a></div>";
        $form_fields .= "</div>";
    }
    $form_fields .= "</form>";
    ?>
								<?php 
    print form::open(NULL, array('id' => 'form_action_' . $form_id, 'name' => 'form_action_' . $form_id));
    ?>
									<input type="hidden" name="action" id="action_<?php 
    echo $form_id;
    ?>
Example #27
0
            echo form::input('custom_field[' . $field_id . ']', $form['custom_field'][$field_id], ' id="custom_field_' . $field_id . '" class="text"');
            echo '<script type="text/javascript">
													$(document).ready(function() {
													$("#custom_field_' . $field_id . '").datepicker({ 
													showOn: "both", 
													buttonImage: "' . url::base() . 'media/img/icon-calendar.gif", 
													buttonImageOnly: true 
													});
													});
												</script>';
        } else {
            echo form::input('custom_field[' . $field_id . ']', $form['custom_field'][$field_id], ' id="custom_field_' . $field_id . '" class="text custom_text"');
        }
    } elseif ($field_property['field_type'] == 2) {
        // TextArea Field
        echo form::textarea('custom_field[' . $field_id . ']', $form['custom_field'][$field_id], ' class="custom_text" rows="3"');
    }
    echo "</div>";
}
?>
							</div>			
						</div>
						<!-- f-col-1 -->
						<div class="f-col-1">
							<div class="incident-location">
								<h4><?php 
echo Kohana::lang('ui_main.incident_location');
?>
</h4>
								<div class="location-info">
									<span><?php 
Example #28
0
		<dt>
			<?php 
echo form::label('title', 'Title:');
?>
<br />
			<span><?php 
echo __('Length must be between 3 and 20 characters.');
?>
</span>
		</dt>
		<dd><?php 
echo form::input('title', $message->title, array('maxlength' => 20));
?>
</dd>
	</dl>
	<dl>
		<dt><?php 
echo form::label('content', 'Content:');
?>
</dt>
		<dd><?php 
echo form::textarea('content', $message->content);
?>
</dd>
	</dl>
	<?php 
echo form::submit('post', 'Edit');
?>
</fieldset>
<?php 
echo form::close();
		<div class="report_row">
		<strong><?php 
echo Kohana::lang('ui_main.email');
?>
:</strong><br />
		<?php 
print form::input('comment_email', $form['comment_email'], ' class="text"');
?>
	</div>
	<div class="report_row">
		<strong><?php 
echo Kohana::lang('ui_main.comments');
?>
:</strong><br />
		<?php 
print form::textarea('comment_description', $form['comment_description'], ' rows="4" cols="40" class="textarea long" ');
?>
	</div>
	<div class="report_row">
		<strong><?php 
echo Kohana::lang('ui_main.security_code');
?>
:</strong><br />
		<?php 
print $captcha->render();
?>
<br />
		<?php 
print form::input('captcha', $form['captcha'], ' class="text"');
?>
	</div>
Example #30
0
?>
</a></h4>
							<?php 
print form::textarea('site_copyright_statement', $form['site_copyright_statement'], ' style="height:40px;"');
?>
						</div>
						<div class="row">
							<h4><a href="#" class="tooltip" title="<?php 
echo Kohana::lang("tooltips.settings_site_submit_report_message");
?>
"><?php 
echo Kohana::lang('settings.site.submit_report_message');
?>
</a></h4>
							<?php 
print form::textarea('site_submit_report_message', $form['site_submit_report_message'], ' style="height:40px;"');
?>
						</div>
						<div class="row">
							<h4><a href="#" class="tooltip" title="<?php 
echo Kohana::lang("tooltips.settings_locale");
?>
"><?php 
echo Kohana::lang('settings.site.language');
?>
</a> (Locale)</h4>
							<span class="sel-holder">
								<?php 
print form::dropdown('site_language', $locales_array, $form['site_language']);
?>
							</span>