I was missing the Save and New button in the frontend so I added it.
3 Files needed to be modified:
administrator/components/com_k2/models/items.php around line 612
case 'saveAndNew':
$msg = JText::_('Item saved');
if ($front) {
$link = 'index.php?option=com_k2&view=item&task=add';
} else {
$link = 'index.php?option=com_k2&view=item';
}
break;
components/com_k2/controllers/item.php around line 59:
Add in this new method:
function saveAndNew() {
$mainframe = &JFactory::getApplication();
JRequest::checkToken() or jexit('Invalid Token');
require_once(JPATH_COMPONENT_ADMINISTRATOR.DS.'models'.DS.'item.php');
$model= new K2ModelItem;
$model->save(true);
}
components/com_k2/views/item/tmpl/form.php around line 263 (my line numbers are a little different because I've added some lines to this file):
<td id="toolbar-save-and-new" class="button">
<a class="toolbar" href="#" onclick="javascript: submitbutton('saveAndNew'); return false;">
<span title="<?php echo JText::_('Save & New');?>" class="icon-32-save"></span>
<?php echo JText::_('Save & New');?>
</a>
</td>
(you'll want to add the above in between the Save and Cancel buttons).
I hope this helps someone!
3 Files needed to be modified:
administrator/components/com_k2/models/items.php around line 612
case 'saveAndNew':
$msg = JText::_('Item saved');
if ($front) {
$link = 'index.php?option=com_k2&view=item&task=add';
} else {
$link = 'index.php?option=com_k2&view=item';
}
break;
components/com_k2/controllers/item.php around line 59:
Add in this new method:
function saveAndNew() {
$mainframe = &JFactory::getApplication();
JRequest::checkToken() or jexit('Invalid Token');
require_once(JPATH_COMPONENT_ADMINISTRATOR.DS.'models'.DS.'item.php');
$model= new K2ModelItem;
$model->save(true);
}
components/com_k2/views/item/tmpl/form.php around line 263 (my line numbers are a little different because I've added some lines to this file):
<td id="toolbar-save-and-new" class="button">
<a class="toolbar" href="#" onclick="javascript: submitbutton('saveAndNew'); return false;">
<span title="<?php echo JText::_('Save & New');?>" class="icon-32-save"></span>
<?php echo JText::_('Save & New');?>
</a>
</td>
(you'll want to add the above in between the Save and Cancel buttons).
I hope this helps someone!