Skip to content

Commit

Permalink
Finish changing translation keys for admin.
Browse files Browse the repository at this point in the history
  • Loading branch information
realityking committed Mar 25, 2011
1 parent f5af4f9 commit dd8f152
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 20 deletions.
Binary file modified admin/.DS_Store
Binary file not shown.
42 changes: 22 additions & 20 deletions admin/controllers/entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ function save()

$data = JRequest::get('post');

$decline = $data['jform']['hstatus'];
$name = $data['jform']['hname'];
$comment = $data['jform']['hcomment'];
$usermail = $data['jform']['hmail'];
$decline_mail = $data['jform']['declinemail'];
$decline = $data['jform']['hstatus'];
$name = $data['jform']['hname'];
$comment = $data['jform']['hcomment'];
$usermail = $data['jform']['hmail'];
$decline_mail = $data['jform']['declinemail'];

//ACL stuff
$canDo = HelpdeskHelper::getActions();
Expand All @@ -75,18 +75,18 @@ function save()
$type = 'message';

if (($decline == -1) && ($decline_mail==1)) {
$body = JTEXT::_( 'Yours helpdeskentry was declined'). $comment;
$body = JText::_('COM_HELPDESK_ENTRY_DECLINED_MAIL_BODY'). $comment;
$mail->IsHTML(true);
$mail->setSubject( JTEXT::_( 'Helpdesk entry was declined' ) );
$mail->setSubject(JText::_('COM_HELPDESK_ENTRY_DECLINED_MAIL_SUBJECT'));
$mail->setBody( $body );
$mail->addRecipient( $usermail );
$mail->addBCC( $admins );
$mail->Send();
$msg .= ". ".JText::_( 'Decline mail was sent' );
$msg .= ". ".JText::_('COM_HELPDESK_DECLINE_MAIL_SENT');
$type = 'message';
}
} else {
$msg = JText::_( 'Error Saving Entry' );
$msg = JText::_('COM_HELPDESK_ERROR_SAVING_ENTRY');
$type = 'error';
}

Expand All @@ -103,38 +103,40 @@ function remove()
//Load model and delete entry - redirect afterwards
$model = $this->getModel( 'entry' );
if (!$model->delete()) {
$msg = JText::_( 'Error: Entry could not be deleted' );
$msg = JText::_('COM_HELPDESK_ERROR_ENTRY_NOT_DELETED');
$type = 'error';
} else {
$msg = JText::_( 'Entry Deleted' );
$msg = JText::_('COM_HELPDESK_ENTRY_DELETED');
$type = 'message';
}
$this->setRedirect( JRoute::_( 'index.php?option=com_helpdesk', false ), $msg, $type );
}

function publish() {
function publish()
{
JRequest::checkToken() or jexit( 'Invalid Token' );
$model = $this->getModel( 'entry' );
if ($model->publish(1)) {
$msg = JText::_( 'Entry published' );
$msg = JText::_('COM_HELPDESK_ENTRY_PUBLISHED');
$type = 'message';
} else {
$msg = JText::_( 'Error: Could not change publish status' )." - " .$model->getError();
$msg = JText::_('COM_HELPDESK_ERROR_ENTRY_NOT_PUBLISHED')." - " .$model->getError();
$type = 'error';
}
$this->setRedirect( JRoute::_( 'index.php?option=com_helpdesk', false ), $msg, $type );
$this->setRedirect( JRoute::_('index.php?option=com_helpdesk', false), $msg, $type );
}

function unpublish() {
function unpublish()
{
JRequest::checkToken() or jexit( 'Invalid Token' );
$model = $this->getModel( 'entry' );
$model = $this->getModel('entry');
if($model->publish(0)) {
$msg = JText::_( 'Entry unpublished' );
$msg = JText::_('COM_HELPDESK_ENTRY_UNPUBLISHED');
$type = 'message';
} else {
$msg = JText::_( 'Error: Could not change publish status' )." - " .$model->getError();
$msg = JText::_('COM_HELPDESK_ERROR_ENTRY_CHANGE_PUBLISH_STATUS')." - " .$model->getError();
$type = 'error';
}
$this->setRedirect( JRoute::_( 'index.php?option=com_helpdesk', false ), $msg, $type );
$this->setRedirect( JRoute::_('index.php?option=com_helpdesk', false), $msg, $type );
}
}
11 changes: 11 additions & 0 deletions admin/language/en-GB.com_helpdesk.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ COM_HELPDESK_DETAILS="Details"
COM_HELPDESK_MANAGER_HELPDESK="Helpdesk"
COM_HELPDESK_MANAGER_ENTRY="Entry"

COM_HELPDESK_DECLINE_MAIL_SENT="Decline mail was sent"
COM_HELPDESK_ERROR_SAVING_ENTRY="Error saving entry"
COM_HELPDESK_ENTRY_DELETED="Entry Deleted"
COM_HELPDESK_ENTRY_PUBLISHED="Entry published"
COM_HELPDESK_ENTRY_UNPUBLISHED="Entry unpublished"
COM_HELPDESK_ERROR_ENTRY_NOT_DELETED="Error: Entry could not be deleted"
COM_HELPDESK_ERROR_ENTRY_CHANGE_PUBLISH_STATUS="Error: Could not change publish status"

COM_HELPDESK_ENTRY_DECLINED_MAIL_SUBJECT="Helpdesk entry was declined"
COM_HELPDESK_ENTRY_DECLINED_MAIL_BODY="Yours helpdeskentry was declined"

COM_HELPDESK_CONFIGURATION="Helpdesk Configuration"
COM_HELPDESK_CONFIG_GENERAL_SETTINGS_LABEL="General"
COM_HELPDESK_CONFIG_NOTIFICATIONS_LABEL="Send Notification E-Mail"
Expand Down
Binary file modified admin/views/.DS_Store
Binary file not shown.
Binary file modified admin/views/entry/.DS_Store
Binary file not shown.
Binary file modified site/.DS_Store
Binary file not shown.
Binary file modified site/views/.DS_Store
Binary file not shown.
Binary file modified site/views/entry/.DS_Store
Binary file not shown.

0 comments on commit dd8f152

Please sign in to comment.