18 require_once SQ_INCLUDE_PATH.
'/asset_attribute.inc';
50 $this->_edit_params[
'width'] = 0;
51 $this->_edit_params[
'height'] = 1;
66 echo
'<b>Text Attribute " '.ucwords(str_replace(
'_',
' ', $this->name)).
' " ('.$this->name.
')</b><br />';
68 <table
class=
"sq-backend-table">
70 <td
class=
"sq-backend-section-heading" style=
"width: 100px;"><?php echo translate(
'width'); ?></td>
71 <td
class=
"sq-backend-table-cell">
74 text_box($prefix.
'_'.$this->name.
'_width', $this->_edit_params[
'width']);
76 echo $this->_edit_params[
'width'];
82 <td
class=
"sq-backend-section-heading" style=
"width: 100px;"><?php echo translate(
'height'); ?></td>
83 <td
class=
"sq-backend-table-cell">
86 text_box($prefix.
'_'.$this->name.
'_height', $this->_edit_params[
'height']);
88 echo $this->_edit_params[
'height'];
110 if (!empty($_POST[$prefix.
'_'.$this->name.
'_width'])) {
111 $this->_edit_params[
'width'] = $_POST[$prefix.
'_'.$this->name.
'_width'];
114 if (!empty($_POST[$prefix.
'_'.$this->name.
'_height'])) {
115 $this->_edit_params[
'height'] = $_POST[$prefix.
'_'.$this->name.
'_height'];
119 $values[
'width'] = $this->_edit_params[
'width'];
120 $values[
'height'] = $this->_edit_params[
'height'];
138 if (!parent::setEditParams($node))
return false;
140 if (isset($node->attributes()->width)) {
141 $this->_edit_params[
'width'] = (int) $node->attributes()->width;
143 if (isset($node->attributes()->height)) {
144 $this->_edit_params[
'height'] = (int) $node->attributes()->height;
161 function paint($prefix, $read_only=
false)
164 echo nl2br(htmlspecialchars($this->value));
168 require_once SQ_LIB_PATH.
'/html_form/html_form.inc';
170 if ($this->_edit_params[
'height'] > 1) {
171 text_area($prefix, $this->value, $this->_edit_params[
'width'], $this->_edit_params[
'height'], $this->_params[
'max_length']);
173 text_box($prefix, $this->value, $this->_edit_params[
'width'], $this->_params[
'max_length']);
189 if (!isset($_REQUEST[$prefix]))
return false;
190 $value = (string) $_REQUEST[$prefix];
191 if ($this->value !== $value && $this->
setValue($value)) {
192 $this->processed =
true;
194 $this->processed =
false;
210 $new_value = (string) $value;
211 if ($new_value != $value)
return false;