public function simple_wysiwyg_tag($name, $value = "", $options = array(), $with_label = true) { if ($options["class"]) { $options["class"] .= " widgEditor"; } else { $options["class"] = "widgEditor"; } return text_area_tag($name, $value, $options, $with_label, "Put your content here"); }
if ($format->getParserClass()) { $input_format_options[$format->getLabel()] = $format->getName(); } } ?> <html> <head><title>EasyRdf Converter</title></head> <body> <h1>EasyRdf Converter</h1> <div style="margin: 10px"> <?php echo form_tag(); ?> <?php echo label_tag('data', 'Input Data: ') . '<br />' . text_area_tag('data', '', array('cols' => 80, 'rows' => 10)); ?> <br /> <?php echo label_tag('uri', 'or Uri: ') . text_field_tag('uri', 'http://www.dajobe.org/foaf.rdf', array('size' => 80)); ?> <br /> <?php echo label_tag('input_format', 'Input Format: ') . select_tag('input_format', $input_format_options, 'guess'); ?> <br /> <?php echo label_tag('output_format', 'Output Format: ') . select_tag('output_format', $output_format_options, 'turtle'); ?> <br /> <?php
</style> </head> <body> <h1>EasyRdf SPARQL Query Form</h1> <div style="margin: 0.5em"> <?php print form_tag(); print label_tag('endpoint'); print text_field_tag('endpoint', "http://dbpedia.org/sparql", array('size' => 80)) . '<br />'; print "<code>"; foreach (EasyRdf_Namespace::namespaces() as $prefix => $uri) { print "PREFIX {$prefix}: <" . htmlspecialchars($uri) . "><br />\n"; } print "</code>"; print text_area_tag('query', "SELECT * WHERE {\n ?s ?p ?o\n}\nLIMIT 10", array('rows' => 10, 'cols' => 80)) . '<br />'; print check_box_tag('text') . label_tag('text', 'Plain text results') . '<br />'; print reset_tag() . submit_tag(); print form_end_tag(); ?> </div> <?php if (isset($_REQUEST['endpoint']) and isset($_REQUEST['query'])) { $sparql = new EasyRdf_Sparql_Client($_REQUEST['endpoint']); try { $results = $sparql->query($_REQUEST['query']); if (isset($_REQUEST['text'])) { print "<pre>" . htmlspecialchars($results->dump(false)) . "</pre>"; } else { print $results->dump(true);
<title>SPARQL Query Form</title> </head> <body> <h1>SPARQL Query Form</h1> <div style="margin: 10px"> <?php print form_tag(); print label_tag('endpoint'); print text_field_tag('endpoint', "http://localhost:8080/sparql", array('size' => 70)) . '<br />'; print "<pre>"; foreach (EasyRdf_Namespace::namespaces() as $prefix => $uri) { print "PREFIX {$prefix}: <" . htmlspecialchars($uri) . ">\n"; } print "</pre>"; print text_area_tag('query', "SELECT * WHERE {\n ?s ?p ?o\n}\nLIMIT 10") . '<br />'; print check_box_tag('text') . label_tag('text', 'Plain text results') . '<br />'; print reset_tag() . submit_tag(); print form_end_tag(); ?> </div> <?php if (isset($_REQUEST['endpoint']) and isset($_REQUEST['query'])) { $sparql = new EasyRdf_Sparql_Client($_REQUEST['endpoint']); $results = $sparql->query($_REQUEST['query']); if (isset($_REQUEST['text'])) { print "<pre>" . htmlspecialchars($results->dump(false)) . "</pre>"; } else { print $results->dump(true); }
/** * Returns a textarea opening and closing tag set. * * Example : * <code>text_area('post', 'body', $this->post, array('cols' => 40, 'rows' => 10)); * <textarea id="post_body" name="post[body]" cols="40" rows="10"> * ..... * </textarea></code> */ function text_area($objectName, $method, $object, $options = array()) { $options = array_merge(array('cols' => 40, 'rows' => 20), $options); list($name, $value, $options) = default_options($objectName, $method, $object, $options); return text_area_tag($name, html_escape($value), $options); }
public function testTextAreaTagWithSize() { $this->assertDomEqual(text_area_tag('body', 'hello world', array('size' => '20x40')), '<textarea cols="20" id="body" name="body" rows="40">hello world</textarea>'); }