Skip to content

Commit

Permalink
Add user note edit view for Hathor
Browse files Browse the repository at this point in the history
  • Loading branch information
Niels van der Veer (n9iels) committed Oct 11, 2015
1 parent 08769ac commit 749ed32
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
1 change: 1 addition & 0 deletions administrator/language/en-GB/en-GB.com_users.ini
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ COM_USERS_N_USERS_UNBLOCKED="%s Users enabled."
COM_USERS_N_USERS_UNBLOCKED_0="No User enabled."
COM_USERS_N_USERS_UNBLOCKED_1="User enabled."
COM_USERS_NEW_NOTE="New Note"
COM_USERS_EDIT_NOTE="Edit Note"
COM_USERS_NO_ACTION="No Action"
COM_USERS_NO_NOTES="No notes available for this user."
COM_USERS_NO_LEVELS_SELECTED="No Viewing Access Levels selected."
Expand Down
67 changes: 67 additions & 0 deletions administrator/templates/hathor/html/com_users/note/edit.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_users
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;

JHtml::_('behavior.formvalidator');

JFactory::getDocument()->addScriptDeclaration('
jQuery(document).ready(function() {
Joomla.submitbutton = function(task)
{
if (task == "note.cancel" || document.formvalidator.isValid(document.getElementById("note-form")))
{
' . $this->form->getField('body')->save() . '
Joomla.submitform(task, document.getElementById("note-form"));
}
}
});');
?>
<form action="<?php echo JRoute::_('index.php?option=com_users&view=note&id=' . (int) $this->item->id);?>" method="post" name="adminForm" id="note-form" class="form-validate">
<div class="col main-section">
<fieldset class="adminform">
<legend><?php echo empty($this->item->id) ? JText::_('COM_USERS_NEW_NOTE') : JText::sprintf('COM_USERS_EDIT_NOTE', $this->item->id); ?></legend>
<ul class="adminformlist">
<li>
<?php echo $this->form->getLabel('subject'); ?>
<?php echo $this->form->getInput('subject'); ?>
</li>
<li>
<div class="clr"></div>
<?php echo $this->form->getLabel('user_id'); ?>
<?php echo $this->form->getInput('user_id'); ?>
</li>
<li>
<?php echo $this->form->getLabel('catid'); ?>
<?php echo $this->form->getInput('catid'); ?>
</li>
<li>
<?php echo $this->form->getLabel('state'); ?>
<?php echo $this->form->getInput('state'); ?>
</li>
<li>
<?php echo $this->form->getLabel('review_time'); ?>
<?php echo $this->form->getInput('review_time'); ?>
</li>
<li>
<?php echo $this->form->getLabel('version_note'); ?>
<?php echo $this->form->getInput('version_note'); ?>
</li>
</ul>
<div class="clr"></div>
<?php echo $this->form->getLabel('body'); ?>
<div class="clr"></div>
<div class="editor">
<?php echo $this->form->getInput('body'); ?>
</div>

<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</fieldset>
</form>

0 comments on commit 749ed32

Please sign in to comment.