public static function ckeditor($name, array $options = array()) { self::$_form_id++; $errors = self::get_errors($name); $form_element = FORM::textarea($name, Arr::get(self::$_values, $name), array('id' => 'text')); return View::factory('ckeditor')->set('name', $name)->set('values', self::$_values)->set('errors', $errors)->set('form_element', $form_element)->set('options', $options)->set('form_id', self::$_form_id)->render(); }
/** * @param TEST_SUITE $obj */ public function load_from_object($obj) { parent::load_from_object($obj); $names = $obj->test_names(); if (!empty($names)) { $this->set_value('test_name', $names[0]); } }
/** * @param CONTEXT $context */ public function __construct($context) { parent::__construct($context); $field = new TEXT_FIELD(); $field->id = 'app_title'; $field->caption = 'Title'; $field->sticky = true; $field->required = true; $this->add_field($field); $field = new TEXT_FIELD(); $field->id = 'app_id'; $field->caption = 'Identifier'; $field->sticky = true; $field->required = true; $this->add_field($field); $field = new TEXT_FIELD(); $field->id = 'app_url'; $field->caption = 'URL'; $field->sticky = true; $field->required = true; $this->add_field($field); $field = new TEXT_FIELD(); $field->id = 'app_folder'; $field->caption = 'Folder'; $field->sticky = true; $field->required = true; $this->add_field($field); $field = new TEXT_FIELD(); $field->id = 'app_prefix'; $field->caption = 'Prefix'; $field->sticky = true; $field->required = true; $this->add_field($field); $field = new TEXT_FIELD(); $field->id = 'folder_name'; $field->caption = 'Folder Name'; $field->sticky = true; $field->required = true; $this->add_field($field); $field = new TEXT_FIELD(); $field->id = 'entry_name'; $field->caption = 'Entry Name'; $field->sticky = true; $field->required = true; $this->add_field($field); $field = new TEXT_FIELD(); $field->id = 'author_name'; $field->caption = 'Author Name'; $field->sticky = true; $field->required = true; $this->add_field($field); $field = new EMAIL_FIELD(); $field->id = 'author_email'; $field->caption = 'Author Email'; $field->sticky = true; $field->required = true; $this->add_field($field); }
/** * @param FORM $form The form to which these commands belong. * @param string $field_name The name of the field to select/de-select. */ public function __construct($form, $field_name) { $this->assert(isset($form), "[form] cannot be empty.", '__construct', 'SELECTION_COMMANDS'); parent::__construct($form->context); $ctrl_name = $form->js_name($field_name); $command = $this->app->make_command(); $command->id = 'select_all'; $command->caption = 'Select all'; $command->link = '#'; $command->executable = true; $command->on_click = "select_all ({$ctrl_name})"; $this->append($command); $command = $this->app->make_command(); $command->id = 'select_none'; $command->caption = 'Select none'; $command->link = '#'; $command->executable = true; $command->on_click = "select_none ({$ctrl_name})"; $this->append($command); }
/** * @access private */ protected function _draw_scripts() { parent::_draw_scripts(); ?> function grant_all_permissions (form) { set_all_controls_of_type (form, 'checkbox', 1); } function grant_no_permissions (form) { set_all_controls_of_type (form, 'checkbox', 0); } <?php }
function __construct($context) { parent::__construct($context); $field = new INTEGER_FIELD(); $field->id = 'radio'; $field->caption = 'Radio'; $this->add_field($field); $field = new TEXT_FIELD(); $field->id = 'name'; $field->caption = 'Name'; $field->required = true; $this->add_field($field); $this->set_value('name', 'Filler text'); $field = new MUNGER_TEXT_FIELD(); $field->id = 'description'; $field->caption = 'Description'; $this->add_field($field); $this->set_value('description', 'Filler text that demonstrates which font is being used in longer, wrapping text.'); $field = new DATE_TIME_FIELD(); $field->id = 'date'; $field->caption = 'Date'; $this->add_field($field); $this->set_value('date', new DATE_TIME()); $field = new BOOLEAN_FIELD(); $field->id = 'bool1'; $field->set_value(1); $field->caption = 'Option 1'; $this->add_field($field); $field = new BOOLEAN_FIELD(); $field->id = 'bool2'; $field->caption = 'Option 2'; $this->add_field($field); $field = new ENUMERATED_FIELD(); $field->id = 'select'; $field->caption = 'Select'; $field->add_value(0); $field->add_value(1); $field->add_value(2); $field->add_value(3); $field->required = true; $this->add_field($field); }
} // Suche itself $sql = "SELECT DISTINCT(e.id), title, filename, date, link FROM press_entries AS e " . $join . " " . $where; $res = $SQL->select($sql); } // head echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n" . "<html>" . "\t<head>" . "\t\t<title>Suche Pressesystem</title>\n" . "\t\t<meta name=\"author\" content=\"Christoph Becker\" >" . "\t\t<meta name=\"keywords\" content=\"Pressesystem Suche Uni Rostock Fakultät für Informatik und Elektrotechnik\" >" . "\t\t<meta http-equiv=\"content-type\" content=\"text/html; charset=ISO-8859-1\" >" . "\t\t<meta http-equiv=\"Content-Style-Type\" content=\"text/css\" >" . "\t\t<style>" . "\t\t\t.presstitle{ font-family:Verdana,Geneva,sans;" . "\t\t\t\t\t\t font-size:14pt;" . "\t\t\t\t\t\t color:black; " . "\t\t\t}" . "\t\t\ttd {font-family:Verdana,Geneva,sans;" . "\t\t\t\t\t\tfont-size:10pt;" . "\t\t\t\t\t\tcolor:black;" . "\t\t\t\t\t\tmargin-top:10pt;" . "\t\t\t\t\t\t" . "\t\t\t}" . "\t\t\ttd.presssearchtitle {" . "\t\t\t\t\tfont-weight: bold;" . "\t\t\t}" . "\t\t\ta.presslink:hover {" . "\t\t\t\t\tcolor:red;\t" . "\t\t\t}" . "\t\t</style>" . "\t\t" . "\t</head>" . "\t<body link=\"#090851\" text=\"#000000\" bgcolor=\"#ffffff\">"; // content if ($search_debug == true) { echo "<pre>Sites_selected: "; var_export($sites); echo "\nSQL: {$sql} \n Results:\n"; var_export($res); echo "\n<hr noshade=noshade />"; } echo "<div class='presstitle'>Suche</div>" . "<form name=\"sform\" method=\"POST\" action =\"" . $abs_path . "\">" . "<table>" . "<tr><td colspan='2' class='presssearchtitle'>Volltextsuche</td><td> </td></tr>" . "<tr><td> </td><td colspan='2'>" . FORM::text("fulltext", $fulltext, "", 70) . "</td></tr>" . "<tr><td colspan='2' class='presssearchtitle'>Zeige alle Einträge</td><td> </td></tr>" . "<tr><td align='right'><table><tr><td>" . FORM::radio("range", "before", "", $range) . "vor</td>" . "<td rowspan='2'>" . FORM::text("date", $date, "", 10) . "</td></tr>" . "<tr><td>" . FORM::radio("range", "after", "", $range) . "nach </td></tr>" . "</table></td>" . "<td colspan='2'>" . "<b>oder</b> " . FORM::radio("range", "all", "", $range) . "egal, wann sie erstellt wurden</td>" . "<tr><td valign='top' class='presssearchtitle' colspan='2'>Suche auf bestimmte Institute beschränken</td><td> </td></tr>" . "\t<td> </td><td>" . FORM::select("sites[]", $PS->get_all(1), $sites, 6) . "</td></tr>" . "<tr><td> </td><td colspan='2'>" . FORM::submit("send", "suche!") . "</td></tr> " . "</table>" . "</form>" . "\t\t</div>"; // footer echo "\t</body>" . "</html>"; // close debug require "init.php"; //---- function set_date($d, $dateform = "german") { //$ret = $d; //$dateform = "german"; // what do i suppose, which form i got $buffer = $d; // save for error_msg $preset_year = strftime("%Y"); // with current year $d = trim($d); if (strlen($d) < 3) {
if (isset($_POST['mobile_phone']) and strlen($_POST['mobile_phone']) > 0) { if ($curl = curl_init()) { curl_setopt($curl, CURLOPT_URL, 'http://w.qiwi.ru/setInetBill.do?from=9492&to=' . $mobile_phone . '&summ=' . $total_cost . '&com=' . $course_name . '&lifetime=96'); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $out = curl_exec($curl); //echo $out; echo $total_cost; curl_close($curl); } } } if (isset($fields['mobile_phone'])) { echo $fields['mobile_phone']; } defined('SYSPATH') or die('No direct script access.'); echo FORM::open(); function get_message_to_alert() { $result['str'] = 'Привет Мир!'; echo json_encode($result); return true; } ?> <?php if (isset($_POST['mobile_phone'])) { $mobile_phone = $_POST['mobile_phone']; $total_cost = 1000; echo 'Отправка тестового счета на номер: ' . $mobile_phone; if ($curl = curl_init()) { curl_setopt($curl, CURLOPT_URL, 'http://w.qiwi.ru/setInetBill.do?from=9492&to=' . $mobile_phone . '&summ=' . $total_cost . '&com=тестовый счет&lifetime=96');
echo Form::errors(); ?> <div class="form-group"> <div class="col-md-offset-4 col-md-8"> <img src="<?php echo $user->get_profile_image(); ?> " class="img-rounded ticket_image" alt="<?php echo __('Profile Picture'); ?> " width="120" height="120"> </div> </div> <div class="form-group"> <?php echo FORM::label('profile_img', __('Profile picture'), array('class' => 'col-md-4 control-label', 'for' => 'profile_img')); ?> <div class="col-md-8"> <input class="form-control" type="file" name="profile_image" id="profile_img" /> </div> </div> <div class="form-group"> <div class="col-md-offset-4 col-md-8"> <button type="submit" class="btn btn-primary"><?php echo __('Update'); ?> </button> <?php if ($user->has_image) { ?> <button type="submit"
<?php defined('SYSPATH') or die('No direct script access.'); ?> <form id="fileupload" action="/rest/companyimage" method="POST" enctype="multipart/form-data"> <?php echo FORM::hidden('company_id', $service->id); ?> <div class="fileupload-buttonbar"> <a class="btn btn-success fileinput-button"> <i class="icon-plus icon-white"></i> <span>Добавить изображение</span> <input type="file" name="files[]" multiple> </a> <button type="submit" class="btn btn-primary start"> <i class="icon-upload icon-white"></i> Загрузить </button> <button type="reset" class="btn btn-warning cancel">Отмена</button> </div> <table role="presentation" class="table table-striped"> <thead> <tr> <th>Превью</th> <th></th> <th>Заголовок</th> <th>Операции</th> </tr> </thead>
" name="form_widget_<?php echo $widget->id_name(); ?> " method="post" action="<?php echo Route::url('oc-panel', array('controller' => 'widget', 'action' => 'save')); ?> " > <div class="form-group"> <label class="control-label col-sm-4" for="placeholder_form"><?php echo __('Where do you want the widget displayed?'); ?> </label> <div class="col-sm-5"> <?php echo FORM::select('placeholder', array_combine(widgets::get_placeholders(TRUE), widgets::get_placeholders(TRUE)), $widget->placeholder); ?> </div> </div> <?php foreach ($tags as $tag) { ?> <div class="form-group"> <?php echo $tag; ?> </div> <?php } ?>
</div> </div> <?endif?> <form class="form-horizontal" enctype="multipart/form-data" method="post" action="<?php echo Route::url('oc-panel', array('controller' => 'category', 'action' => 'icon', 'id' => $form->object->id_category)); ?> "> <?php echo Form::errors(); ?> <div class="form-group"> <div class="col-sm-12"> <?php echo FORM::label('category_icon', __('Select from files'), array('for' => 'category_icon')); ?> <input type="file" name="category_icon" class="form-control" id="category_icon" /> </div> </div> <button type="submit" class="btn btn-primary"><?php echo __('Submit'); ?> </button> <?if (( $icon_src = $category->get_icon() )!==FALSE ):?> <button type="submit" class="btn btn-danger index-delete index-delete-inline" onclick="return confirm('<?php echo __('Delete icon?'); ?>
/** * @access private */ protected function _draw_scripts() { parent::_draw_scripts(); ?> function set_main_theme (name) { <?php echo $this->js_form_name(); ?> .main_CSS_file_name.value = name; <?php echo $this->js_form_name(); ?> .submit (); } <?php }
<button name="map_mode[]" value="<?php echo $city->img_metro_map; ?> " class="btn btn-small">Оригинал (С надписями)</button> </div> <div class="alert alert-success" style="display: none;"></div> </div> <div class="list"> <div class="controls"> <?php foreach ($metro_stations as $m) { ?> <div class="item" style="position: relative; height: 30px;"> <label class="checkbox" style="width: 150px; position: absolute;"> <?php echo FORM::checkbox('metro[]', $m->id, FALSE, array('data-metro-name' => $m->name)); ?> <?php echo $m->name; ?> </label> <div class="btn-group" data-toggle="buttons-radio" style="position: absolute; right: 0px;"> <button name="drag_mode[]" data-metro-id="<?php echo $m->id; ?> " class="btn btn-small active" value="outline">F</button> <button name="drag_mode[]" data-metro-id="<?php echo $m->id; ?> " class="btn btn-small" value="inline">I</button> </div>
<?php defined('SYSPATH') or die('No direct script access.'); $form_actions_attr = array(); if (!Arr::get($options, 'horizontal', TRUE)) { $form_actions_attr['style'] = 'padding-left: 0;'; } ?> <div class="form-actions" <?php echo HTML::attributes($form_actions_attr); ?> > <?php foreach ($actions as $type => $params) { ?> <?php echo FORM::button(Arr::get($params, 'name'), __($params['text']), array('type' => $type) + Arr::get($params, 'attributes', array())); ?> <?php } ?> </div>
function check_form() { $this->DBG->enter_method(); #while (list($key, $val)=each($this->fieldlist)) { foreach ($this->fieldlist as $val) { $formval = init($val['name'], "r", false); // wert holen aus "request" $this->DBG->watch_var("!!Found " . $val['type'], $formval); if (array_key_exists('optional', $val) && $val['optional'] == true) { if (!($formval != "" || array_key_exists('minmax', $val))) { $this->DBG->send_message("-optional field ignored"); continue; } $this->DBG->send_message("-optional field processed!"); } switch ($val['type']) { case "file": $this->DBG->watch_var("-File uploaded/" . $formval . " ex?", file_exists("uploaded/" . $formval)); if (strlen($formval) > 1) { if (!file_exists("uploaded/" . $formval)) { $this->DBG->send_message("-file upload error [file1]"); $this->fielderrors[$val['name']] = "Fehler beim Hochladen?"; } else { $this->DBG->send_message("-file already uploaded [file2]"); array_push($this->results, array($val['name'] => $formval)); } continue; } else { $reti = FORM::upload_file($val['name'], "uploaded/"); if (substr($reti, 0, 5) == "ERROR") { // error occured with uploaded file $this->DBG->send_message("-error during file upload [file3]"); $this->fielderrors[$val['name']] = substr($reti, 6); } else { //echo $reti; // is filename $this->DBG->send_message("-file successfully uploaded [file4]"); array_push($this->results, array($val['name'] => $reti)); } } break; case "link": if (eregi("^http\\:", $formval)) { $this->fielderrors[$val['name']] = "Links bitte ohne Protokoll (http://) angeben."; } else { array_push($this->results, array($val['name'] => trim($formval))); } break; case "date": $this->DBG->watch_var("-input", $formval); $r = $this->check_date($formval); $this->DBG->watch_var("-output", $r); if (!eregi("^[0-9]", $r)) { $this->DBG->send_message("-invalid date!"); $this->fielderrors[$val['name']] = $r; } else { array_push($this->results, array($val['name'] => $r)); $_REQUEST[$val['name']] = $r; } break; case "site_select": $formval = init(substr($val['name'], 0, -2), "r"); // wert holen aus "request" $this->DBG->watch_var("-SiteSelect:" . $val['name'], $formval); // trivial if (is_array($formval)) { array_push($this->results, array($val['name'] => $formval)); break; } $this->fielderrors[$val['name']] = "Bitte wählen Sie mindestens einen Bereich aus!"; break; case "source_select": // trivial $this->DBG->watch_var("-F:" . $val['name'], $formval); if ($formval > 0) { array_push($this->results, array($val['name'] => $formval)); break; } $this->fielderrors[$val['name']] = "Bitte wählen Sie eine Quelle aus oder erstellen eine neue!"; break; default: $this->DBG->watch_var("-Default, Type is", $val['type']); case "text": // trivial $this->DBG->watch_var("-Text-Field", $val); $this->DBG->watch_var("-OR-Field", $val['_or']); /* Bedingungsliste */ // wert? (bool) ($wert = strlen(trim($formval)) > 0); $this->DBG->watch_var("wert", $wert); // abhängigkeit (bool) ($or = array_key_exists('_or', $val)); $this->DBG->watch_var("or", $or); // abhängiges feld hat wert (hat keinen fehler) (bool) ($or_wert = $or ? !array_key_exists($val['_or'], $this->fielderrors) : false); $this->DBG->watch_var("or_wert", $or_wert); // besteht eine min/max bedingung? (bool) ($minmax = array_key_exists('minmax', $val) ? true : false); // ist feld optional? (dann darf es leer sein, oder muss die min/max bedingung erfüllen) (bool) ($optional = array_key_exists('optional', $val) && $val['optional'] == true ? true : false); // wert vorhanden, schreiben! $error = false; if ($wert && $minmax) { $error = $this->_check_minmax_length($val, $formval); } // XOR Bedingung if ($wert and $or) { if ($or_wert) { // zuviel $or_field_name = $this->fieldlist[$val['_or']]['label']; //$this->fielderrors[$val['name']] $error = "Dieses Feld wird ignoriert werden, da bereits '" . $or_field_name . "' ausgefüllt ist."; } else { // genau richtig, fehler löschen $error = $this->_check_minmax_length($val, $formval); if (!$error) { $this->fielderrors[$val['_or']] = false; } // fehler löschen } } if (!$wert && $or && !$or_wert) { $or_field_name = $this->get_field_property($val['_or'], 'label'); $error = "Dieses Feld oder '" . $or_field_name . "' muss ausgefüllt werden. "; } // kein Wert, keine Alternative if (!$wert && !$or && !$optional) { $error = "Dieses Feld muss ausgefüllt werden. "; } // kein Wert aber Längendefinition vorhanden if (!$wert && $error && $minmax) { $error .= " (min. " . $val['minmax']['min'] . " und max. " . $val['minmax']['max'] . " Zeichen)"; } // central error or value setter $this->DBG->watch_var("Text-Errors", $error); if ($error) { $this->fielderrors[$val['name']] = $error; } else { array_push($this->results, array($val['name'] => $formval)); } break; // final break; } // switch } // while $this->DBG->send_message("!!END Fields;"); $thereareerrors = !empty($this->fielderrors); $this->DBG->watch_var("!Any errors", $thereareerrors); $realerrors = false; while (list($key, $val) = each($this->fielderrors)) { if ($val != false) { $realerrors == true; } } $this->DBG->watch_var("!Only real!errors", $realerrors); if ($thereareerrors && $realerrors) { // Fehlerfall $this->DBG->watch_var("!Errors (should be some)", $this->fielderrors); $this->DBG->send_message("Errors, showing form..."); $this->show(); // if errors $reti = false; } else { // kein Fehler oder kein echter //!(count($this->fielderrors)==1 && $this->fielderrors['source']==FALSE) ) { $reti = $this->results; $this->DBG->watch_var("!Result", $reti); $this->DBG->watch_var("!Errors (should be null)", $this->fielderrors); } $this->DBG->leave_method($reti); return $reti; }
public static function apply() { Output\OUTPUT::set_static_file(); if (self::has_attribute(self::get("primary_database")[0], "alias", true)) { CONFIG::$primarydatabase = self::get("primary_database")[0]["@attributes"]["alias"]; } foreach (self::get("rewrite_rules") as $value) { REQUEST::translate($value); } foreach (self::get("links") as $value) { self::set_table_links($value); } if (REQUEST::$is_static == true && !empty(Output\OUTPUT::$static_file)) { Output\OUTPUT::static_file(); } if (REQUEST::redirect()) { header("Location: " . REQUEST::root() . "/" . REQUEST::redirect_uri()); } foreach (self::get("accounttypes") as $value) { ACCOUNT::translate($value); } foreach (self::get("database") as $value) { if (self::has_attribute($value, "alias", true)) { $alias = $value["@attributes"]["alias"]; unset($value["@attributes"]["alias"]); $config = $value["@attributes"]; unset($value["@attributes"]); if (!isset($config["tablelinks"]) && isset(self::$table_links[$alias])) { $config["tablelinks"] = self::$table_links[$alias]; } Database\DATABASE::register_database($alias, $config); foreach (self::get("table") as $subvalue) { if (!self::find_previous_config("table:", $subvalue) && !empty($subvalue)) { if (isset($value["@attributes"]["database_alias"]) && $value["@attributes"]["database_alias"] == $alias) { self::configure_database($subvalue); } } } } } foreach (self::get("form") as $value) { if (self::has_attribute($value, "name", true)) { FORM::translate($value["@attributes"]["name"], $value); } } foreach (self::get("project") as $value) { foreach ($value as $subkey => $subvalue) { if (self::startswith(strtolower($subkey), "include:") && self::has_attribute($subvalue, "file", true)) { $file = $subvalue["@attributes"]["file"]; if (file_exists(self::$projectdir . "/" . $file . ".php")) { include self::$projectdir . "/" . $file . ".php"; } } } } ACCOUNT::set_database_config(); REQUEST::init(); ACCOUNT::access(); if (ACCOUNT::redirect()) { header("Location: " . REQUEST::root() . "/" . REQUEST::redirect_uri()); } REQUEST::access(); }
/** * Load initial properties from this branch. * @param TASK $obj */ public function load_from_object($obj) { parent::load_from_object($obj); $this->set_value('verbose', $obj->verbose); $this->set_value('testing', $obj->testing); $this->set_value('stop_on_error', $obj->stop_on_error); $this->set_value('debug', $obj->log_debug); $this->set_value('database', $obj->log_database); $this->set_value('console', $obj->run_as_console); }
echo FORM::input('full_name', Arr::get($values, 'full_name'), array('class' => 'span5')); ?> <span class="help-inline"><?php echo Arr::get($errors, 'full_name'); ?> </span> <p class="help-block">напр. юго западный административный округ</p> </div> </div> <div class="control-group"> <label for="name" class="control-label">Аббревиатура</label> <div class="controls"> <?php echo FORM::input('abbreviation', Arr::get($values, 'abbreviation'), array('class' => 'span5')); ?> <span class="help-inline"><?php echo Arr::get($errors, 'abbreviation'); ?> </span> <p class="help-block">напр. ЮЗАО</p> </div> </div> <div class="form-actions"> <?php echo FORM::submit(NULL, 'Сохранить', array('class' => 'btn btn-large btn-success')); ?> <?php echo FORM::submit('edit_content', 'Сохранить и перейти к редактированию страницы', array('class' => 'btn btn-large btn-primary')); ?> </div> </fieldset>
echo Request::current()->uri(); ?> " method="post" class="form-horizontal" enctype="multipart/form-data"> <div class="panel panel-default"> <div class="panel-body"> <div class="form-horizontal"> <?php foreach ($options as $field => $attributes) { ?> <div class="form-group"> <?php echo FORM::form_tag($field, $attributes, isset($data[$field]) ? $data[$field] : NULL); ?> </div> <?php } ?> <div class="form-group"> <div class="col-sm-offset-5 col-sm-7"> <?php echo FORM::button('submit', __('Update'), array('type' => 'submit', 'class' => 'btn btn-primary')); ?> </div> </div> </div> </div> </div> </form> </div> </div>
echo FORM::close(); ?> </div> </div> </div> <div class="col-md-6"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"><?php echo __('Find latitude & longitude'); ?> </h3> </div> <div class="panel-body"> <?php echo FORM::input('address', Request::current()->post('address'), array('class' => 'form-control', 'id' => 'address', 'placeholder' => __('Type address'))); ?> <div class="popin-map-container"> <div class="map-inner" id="map" data-lat="<?php echo core::config('advertisement.center_lat'); ?> " data-lon="<?php echo core::config('advertisement.center_lon'); ?> " data-zoom="<?php echo core::config('advertisement.map_zoom'); ?> "
<?php } ?> <?php if (core::config('general.auto_locate')) { ?> <div class="modal fade" id="myLocation" tabindex="-1" role="dialog" aria-labelledby="myLocationLabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-body"> <div class="input-group"> <input type="hidden" name="latitude" id="myLatitude" value="" disabled> <input type="hidden" name="longitude" id="myLongitude" value="" disabled> <?php echo FORM::input('myAddress', Request::current()->post('address'), array('class' => 'form-control', 'id' => 'myAddress', 'placeholder' => __('Where do you want to search?'))); ?> <span class="input-group-btn"> <button id="setMyLocation" class="btn btn-default" type="button"><?php echo __('Ok'); ?> </button> </span> </div> <br> <div id="mapCanvas"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close'); ?>
?> <div id="recaptcha1"></div> <?php } else { ?> <div class="row"> <div class="col-md-4"> <?php echo FORM::label('captcha', __('Captcha'), array('for' => 'captcha')); ?> <span id="helpBlock" class="help-block"><?php echo captcha::image_tag('review'); ?> </span> <?php echo FORM::input('captcha', "", array('class' => 'form-control', 'id' => 'captcha', 'required')); ?> </div> </div> <?php } ?> </div> <div class="clearfix"></div> <?php } ?> </div> <div class="modal-footer"> <input type="submit" class="btn btn-success" value="<?php echo __('Post Review');
echo FORM::label($api . '_secret_label', __('secret'), array('class' => 'control-label col-sm-4', 'for' => $api)); ?> <div class="col-sm-8"> <?php echo FORM::input($api . '_secret', $options['keys']['secret']); ?> </div> </div> <?php } ?> <hr> <?php } ?> <div class="form-group"> <div class="col-sm-offset-4 col-sm-8"> <?php echo FORM::button('submit', 'Update', array('type' => 'submit', 'class' => 'btn btn-primary', 'action' => Route::url('oc-panel', array('controller' => 'social', 'action' => 'index')))); ?> </div> </div> </div> </div> </div> <?php FORM::close(); ?> </div> </div>
?> </div> </div> <div class="form-group"> <?php echo FORM::label($forms['smtp_pass']['key'], __('Smtp password'), array('class' => 'control-label col-sm-4', 'for' => $forms['smtp_pass']['key'])); ?> <div class="col-sm-8"> <?php echo FORM::input($forms['smtp_pass']['key'], $forms['smtp_pass']['value'], array('placeholder' => "", 'type' => "password", 'class' => 'tips form-control', 'id' => $forms['smtp_pass']['key'], 'data-content' => '', 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => '')); ?> </div> </div> </div> </div> </div> <div class="panel panel-default"> <div class="panel-body"> <div class="col-sm-8 col-sm-offset-4"> <?php echo FORM::button('submit', __('Save'), array('type' => 'submit', 'class' => 'btn btn-primary', 'action' => Route::url('oc-panel', array('controller' => 'settings', 'action' => 'email')))); ?> </div> </div> </div> </form> </div><!--end col-md-8--> </div>
<?php echo FORM::input($forms['pay_to_go_on_top']['key'], $forms['pay_to_go_on_top']['value'], array('placeholder' => "", 'class' => 'tips form-control col-sm-3', 'id' => $forms['pay_to_go_on_top']['key'], 'data-content' => __("Pricing"), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => __("How much the user needs to pay to top up an Ad"))); ?> <span class="input-group-addon"><?php echo core::config('payment.paypal_currency'); ?> </span> </div> </div> </div> <div class="form-group"> <?php echo FORM::label($forms['paypal_seller']['key'], "<a target='_blank' href='http://open-classifieds.com/2013/09/02/pay-directly-from-ad/'>" . __('User paypal link') . "</a>", array('class' => 'control-label col-sm-3', 'for' => $forms['paypal_seller']['key'])); ?> <div class="col-sm-4"> <?php echo FORM::select($forms['paypal_seller']['key'], array(FALSE => "FALSE", TRUE => "TRUE"), $forms['paypal_seller']['value'], array('placeholder' => "TRUE or FALSE", 'class' => 'tips form-controlti', 'id' => $forms['paypal_seller']['key'], 'data-content' => '', 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => '')); ?> </div> </div> <?php echo FORM::button('submit', 'Update', array('type' => 'submit', 'class' => 'btn btn-primary', 'action' => Route::url('oc-panel', array('controller' => 'settings', 'action' => 'payment')))); ?> </fieldset> </div><!--end col-md-10-->
<?php if (core::config('advertisement.captcha') != FALSE) { ?> <div class="form-group"> <div class="col-xs-10"> <?php echo __('Captcha'); ?> *:<br /> <?php echo captcha::image_tag('contact'); ?> <br /> <?php echo FORM::input('captcha', "", array('class' => 'form-control', 'id' => 'captcha', 'required')); ?> </div> </div> <?php } ?> <div class="modal-footer"> <?php echo FORM::button('submit', __('Send Message'), array('type' => 'submit', 'class' => 'btn btn-success', 'action' => Route::url('default', array('controller' => 'contact', 'action' => 'user_contact', 'id' => $widget->id_ad)))); ?> </div> </fieldset> <?php echo FORM::close();
/** * renders the form view to fill the data and then saves it * @return string html */ public function form() { //for each field reder html_tag $tags = array(); foreach ($this->fields as $name => $options) { $value = isset($this->data[$name]) ? $this->data[$name] : NULL; $tags[] = FORM::form_tag($name, $options, $value); } //render view return View::factory('oc-panel/pages/widgets/form_widget', array('widget' => $this, 'tags' => $tags)); }
?> <div class="category_open"> <?php echo $category_name; ?> </div> <?php } ?> <div class="works_list"> <ul> <?php foreach ($works as $id => $name) { ?> <li><?php echo FORM::checkbox('work[]', $id, FALSE, array('class' => 'search_works', 'id' => 'work_' . $id, 'autocomplete' => 'off')); ?> <label for="work_<?php echo $id; ?> "><?php echo $name; ?> </label></li> <?php } ?> </ul> </div> <?php }
<div class="form-group"> <label class="control-label col-sm-1"><?php echo __('Url'); ?> </label> <div class="col-sm-4"> <input class="form-control" type="url" id="url" name="url" value="<?php echo Core::post('Url'); ?> " placeholder="http://somedomain.com" required> </div> </div> <div class="form-group"> <?php echo FORM::label('target', __('Target'), array('class' => 'control-label col-sm-1', 'for' => 'target')); ?> <div class="col-sm-4"> <select name="target" id="target" class="form-control" REQUIRED> <option>_self</option> <option>_blank</option> <option>_parent</option> <option>_top</option> </select> </div> </div> <div class="form-group"> <label class="control-label col-sm-1"><a target="_blank" href="http://getbootstrap.com/2.3.2/base-css.html#icons"><?php echo __('Icon'); ?>