]> git.mjollnir.org Git - moodle.git/commitdiff
blocks editing: MDL-19889 tidy up HTML form class.
authortjhunt <tjhunt>
Tue, 21 Jul 2009 09:20:44 +0000 (09:20 +0000)
committertjhunt <tjhunt>
Tue, 21 Jul 2009 09:20:44 +0000 (09:20 +0000)
blocks/html/config_instance.html [deleted file]
blocks/html/edit_form.php

diff --git a/blocks/html/config_instance.html b/blocks/html/config_instance.html
deleted file mode 100755 (executable)
index cbbac9c..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-    $usehtmleditor = can_use_html_editor();
-
-    $text = isset($this->config->text) ? $this->config->text : '';
-    if (!$this->content_is_trusted()) {
-        $text = clean_text($text, FORMAT_HTML);
-    }
-?>
-<table cellpadding="9" cellspacing="0">
-<tr valign="top">
-    <td align="right"><?php print_string('configtitle', 'block_html'); ?>:</td>
-    <td><input type="text" name="title" size="30" value="<?php echo isset($this->config->title)?p($this->config->title):''; ?>" /> (<?php print_string('leaveblanktohide', 'block_html'); ?>)</td>
-</tr>
-<tr valign="top">
-    <td align="right"><?php print_string('configcontent', 'block_html'); ?>:</td>
-    <td><?php print_textarea($usehtmleditor, 25, 50, 0, 0, 'text', $text) ?></td>
-</tr>
-<tr>
-    <td colspan="3" align="center">
-    <input type="submit" value="<?php print_string('savechanges') ?>" /></td>
-</tr>
-</table>
index 4cb70e65b4cbad903cc685ebb4126f9347aaf439..2b96b001432b99fc50a195b8d690716eac91b2e5 100644 (file)
  */
 class block_html_edit_form extends block_edit_form {
     protected function specific_definition($mform) {
-        // Then show the fields about where this block appears.
+        // Fields for editing HTML block title and contents.
         $mform->addElement('header', 'configheader', get_string('blocksettings', 'block'));
 
         $mform->addElement('text', 'config_title', get_string('configtitle', 'block_html'));
-        $mform->setType('configtitle', PARAM_MULTILANG);
+        $mform->setType('config_title', PARAM_MULTILANG);
 
         // TODO MDL-19844 should use the new editor field type.
         $mform->addElement('htmleditor', 'config_text', get_string('configcontent', 'block_html'));