@@ 977-981 (lines=5) @@ | ||
974 | $div->setAttribute('class', 'actions'); |
|
975 | $div->appendChild(Widget::Input('action[save]', ($isEditing ? __('Save Changes') : __('Create Data Source')), 'submit', array('accesskey' => 's'))); |
|
976 | ||
977 | if ($isEditing) { |
|
978 | $button = new XMLElement('button', __('Delete')); |
|
979 | $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?'))); |
|
980 | $div->appendChild($button); |
|
981 | } |
|
982 | ||
983 | $this->Form->appendChild($div); |
|
984 | } |
@@ 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); |
@@ 508-512 (lines=5) @@ | ||
505 | 'submit', array('accesskey' => 's') |
|
506 | )); |
|
507 | ||
508 | if ($this->_context[0] == 'edit') { |
|
509 | $button = new XMLElement('button', __('Delete')); |
|
510 | $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?'))); |
|
511 | $div->appendChild($button); |
|
512 | } |
|
513 | ||
514 | $this->Form->appendChild($div); |
|
515 |