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