Skip to content

Commit

Permalink
Bug130261 fix : Live > Applicant account > application form > work ex…
Browse files Browse the repository at this point in the history
…perience > delete a section :: Needs confirmation message before deleting.
  • Loading branch information
ChavanAnkitaMahesh committed Jan 8, 2020
1 parent bdb06fe commit ceb309e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
22 changes: 3 additions & 19 deletions src/components/com_tjucm/site/views/item/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
// No direct access
defined('_JEXEC') or die;

/*To load language constant of js file*/
JText::script('COM_TJUCM_DELETE_MESSAGE');

$user = JFactory::getUser();

if ($this->form_extra)
Expand Down Expand Up @@ -64,22 +67,3 @@
?>
</div>
</div>
<?php
if ($deleteOwn)
{
?>
<script type="text/javascript">
jQuery(document).ready(function () {
jQuery('.delete-button').click(deleteItem);
});

function deleteItem()
{
if (!confirm("<?php echo JText::_('COM_TJUCM_DELETE_MESSAGE'); ?>"))
{
return false;
}
}
</script>
<?php
}
3 changes: 0 additions & 3 deletions src/components/com_tjucm/site/views/itemform/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
HTMLHelper::_('formbehavior.chosen', 'select');
HTMLHelper::_('jquery.token');

/*To load language constant of js file*/
JText::script('COM_TJUCM_DELETE_MESSAGE');

/*
* Script to show alert box if form changes are made and user is closing/refreshing/navigating the tab
* without saving the content
Expand Down

0 comments on commit ceb309e

Please sign in to comment.