2009-03-25 03:37:49 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
2009-04-17 02:26:40 +00:00
|
|
|
* Editable Literal Field. A literal field is just a blank slate where
|
|
|
|
* you can add your own HTML / Images / Flash
|
2009-03-25 03:37:49 +00:00
|
|
|
*
|
2009-04-17 02:26:40 +00:00
|
|
|
* @package userforms
|
2009-03-25 03:37:49 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
class EditableLiteralField extends EditableFormField {
|
|
|
|
|
2009-03-25 05:25:50 +00:00
|
|
|
static $singular_name = 'HTML Block';
|
2009-03-25 03:37:49 +00:00
|
|
|
|
2009-04-17 02:26:40 +00:00
|
|
|
static $plural_name = 'HTML Blocks';
|
2009-03-25 03:37:49 +00:00
|
|
|
|
2009-05-14 22:54:42 +00:00
|
|
|
function getFieldConfiguration() {
|
2009-05-06 03:34:40 +00:00
|
|
|
return new FieldSet(
|
|
|
|
new TextareaField("Fields[$this->ID]" . "[CustomSettings][Content]", "HTML", 4, 20, $this->getSetting('Content'))
|
|
|
|
);
|
2009-03-25 03:37:49 +00:00
|
|
|
}
|
2009-04-27 04:01:06 +00:00
|
|
|
|
|
|
|
function getFormField() {
|
2009-03-25 03:37:49 +00:00
|
|
|
return new LiteralField("LiteralField[$this->ID]",
|
2009-04-27 04:01:06 +00:00
|
|
|
"<div class='field text'><label class='left'>$this->Title</label><div class='middleColumn literalFieldArea'>". $this->getSetting('Content') ."</div></div>");
|
2009-03-25 03:37:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|