| @@ 337-341 (lines=5) @@ | ||
| 334 | $div->setAttribute('class', 'actions'); |
|
| 335 | $div->appendChild(Widget::Input('action[save]', ($isEditing ? __('Save Changes') : __('Create Event')), 'submit', array('accesskey' => 's'))); |
|
| 336 | ||
| 337 | if ($isEditing) { |
|
| 338 | $button = new XMLElement('button', __('Delete')); |
|
| 339 | $button->setAttributeArray(array('name' => 'action[delete]', 'class' => 'button confirm delete', 'title' => __('Delete this event'), 'type' => 'submit', 'accesskey' => 'd', 'data-message' => __('Are you sure you want to delete this event?'))); |
|
| 340 | $div->appendChild($button); |
|
| 341 | } |
|
| 342 | ||
| 343 | if (!$readonly) { |
|
| 344 | $this->Form->appendChild($div); |
|
| @@ 972-976 (lines=5) @@ | ||
| 969 | $div->setAttribute('class', 'actions'); |
|
| 970 | $div->appendChild(Widget::Input('action[save]', ($isEditing ? __('Save Changes') : __('Create Data Source')), 'submit', array('accesskey' => 's'))); |
|
| 971 | ||
| 972 | if ($isEditing) { |
|
| 973 | $button = new XMLElement('button', __('Delete')); |
|
| 974 | $button->setAttributeArray(array('name' => 'action[delete]', 'class' => 'button confirm delete', 'title' => __('Delete this data source'), 'type' => 'submit', 'accesskey' => 'd', 'data-message' => __('Are you sure you want to delete this data source?'))); |
|
| 975 | $div->appendChild($button); |
|
| 976 | } |
|
| 977 | ||
| 978 | $this->Form->appendChild($div); |
|
| 979 | } |
|
| @@ 530-534 (lines=5) @@ | ||
| 527 | 'submit', array('accesskey' => 's') |
|
| 528 | )); |
|
| 529 | ||
| 530 | if ($this->_context['action'] === 'edit') { |
|
| 531 | $button = new XMLElement('button', __('Delete')); |
|
| 532 | $button->setAttributeArray(array('name' => 'action[delete]', 'class' => 'button confirm delete', 'title' => __('Delete this page'), 'accesskey' => 'd', 'data-message' => __('Are you sure you want to delete this page?'))); |
|
| 533 | $div->appendChild($button); |
|
| 534 | } |
|
| 535 | ||
| 536 | $this->Form->appendChild($div); |
|
| 537 | ||