Your IP : 10.10.0.253


Current Path : /var/www/components/com_contactpush/views/message/tmpl/
Upload File :
Current File : /var/www/components/com_contactpush/views/message/tmpl/newmessage_form.php

<script language="javascript" type="text/javascript">
    function limitText(limitField, limitCount, limitNum) {
        if (limitField.value.length > limitNum) {
            limitField.value = limitField.value.substring(0, limitNum);
        } else {
            limitCount.value = limitNum - limitField.value.length;
        }
    }
</script>

<?php
/**                               ______________________________________________
*                          o O   |                                              |
*                 (((((  o      <    Generated with Cook Self Service  V3.1     |
*                ( o o )         |______________________________________________|
* --------oOOO-----(_)-----OOOo---------------------------------- www.j-cook.pro --- +
* @version		1.0.0
* @package		Contact Push
* @subpackage	Messages
* @copyright	Netamity 2017
* @author		Andy Hickey - www.netamity.com - andy@netamity.com
* @license		GPL V2+
*
*             .oooO  Oooo.
*             (   )  (   )
* -------------\ (----) /----------------------------------------------------------- +
*               \_)  (_/
*/

// no direct access
defined('_JEXEC') or die('Restricted access');


$params = JComponentHelper::getParams('com_contactpush');
$footer = $params->get('footer');
$footlen = strlen($footer);
$startpoint = 1024 - $footlen;


if (!$this->form)
	return;

$fieldSets = $this->form->getFieldsets();

//Andy edits
$myaccess = JAccess::getAuthorisedViewLevels(JFactory::getUser()->id);

jimport('joomla.application.component.helper');
$a = JComponentHelper::getParams('com_contactpush')->get('prior_usergroups');
$retry = JComponentHelper::getParams('com_contactpush')->get('retry');
$expire = JComponentHelper::getParams('com_contactpush')->get('expire');

$p_pass = array_intersect($a,$myaccess);
?>

<?php $fieldSet = $this->form->getFieldset('newmessage.form');?>

<fieldset class="fieldsform form-horizontal">

	<?php
	// Title
	$field = $fieldSet['jform_title'];
	?>
	<div class="control-group <?php echo 'field-' . $field->id . $field->responsive; ?>">
		<div class="control-label">
			<?php echo $field->label; ?>
		</div>
	
	    <div class="controls">
            <input type="text" id="jform_title" name="jform[title]" value="" maxlength="250" size="32">
		</div>
	</div>



	<?php
	// Message
	$field = $fieldSet['jform_message'];
	?>
	<div class="control-group <?php echo 'field-' . $field->id . $field->responsive; ?>">
		<div class="control-label">
			<?php echo $field->label; ?>
		</div>
	
	    <div class="controls">
            <table>
                <tr>
                    <td><textarea id="jform_message" name="jform[message]" cols="32" rows="4" onKeyDown="limitText(document.getElementById('jform_message'),this.form.countdown,<?php echo $startpoint; ?>);"
                                  onKeyUp="limitText(document.getElementById('jform_message'),this.form.countdown,<?php echo $startpoint; ?>);"></textarea></td>
                    <td><font size="1">(Maximum characters: <?php echo $startpoint; ?>)<br>
                    </td>
                </tr>
            </table>

               You have <input readonly type="text" name="countdown" style="width:30px" size="4" value="<?php echo $startpoint; ?>"> characters left.</font>
		</div>
	</div>



	<?php
	// Priority
	$field = $fieldSet['jform_priority'];
	?>
	<div class="control-group <?php echo 'field-' . $field->id . $field->responsive; ?>">
		<div class="control-label">
			<?php echo $field->label; ?>
		</div>
	
	    <div class="controls">
			<select name="jform[priority]">
				<option value="-1">Low</option>
				<option value="0" selected="selected">Normal</option>
				<?php if($p_pass)
				{ ?>
					<option value="1">High</option>
					<option value="2">Emergency</option>
					<?php
				}
				?>
			</select>
		</div>
	</div>



<!--	--><?php
//	// Creation date
//	$field = $fieldSet['jform_creation_date'];
//	?>
<!--	<div class="control-group --><?php //echo 'field-' . $field->id . $field->responsive; ?><!--">-->
<!--		<div class="control-label">-->
<!--			--><?php //echo $field->label; ?>
<!--		</div>-->
<!--	-->
<!--	    <div class="controls">-->
<!--			--><?php //echo $field->input; ?>
<!--		</div>-->
<!--	</div>-->
	<input type="hidden" id="jform_creation_date" name="jform[creation_date]" value="<?php echo date('Y-m-d H:i:s'); ?>">
	<input type="hidden" id="jform_status" name="jform[status]" value="1">
	<input type="hidden" id="jform_created_by" name="jform[created_by]" value="<?php echo JFactory::getUser()->id; ?>">
    <input type="hidden" name="jform[published]" value="1" />



<!--	--><?php
//	// Status
//	$field = $fieldSet['jform_status'];
//	?>
<!--	<div class="control-group --><?php //echo 'field-' . $field->id . $field->responsive; ?><!--">-->
<!--		<div class="control-label">-->
<!--			--><?php //echo $field->label; ?>
<!--		</div>-->
<!--	-->
<!--	    <div class="controls">-->
<!--			--><?php //echo $field->input; ?>
<!--		</div>-->
<!--	</div>-->



<!--	--><?php
//	// Sender
//	$field = $fieldSet['jform_created_by'];
//	$field->jdomOptions = array(
//		'list' => $this->lists['fk']['created_by']
//			);
//	?>
<!--		--><?php //if (!method_exists($field, 'canView') || $field->canView()): ?>
<!--		<div class="control-group --><?php //echo 'field-' . $field->id . $field->responsive; ?><!--">-->
<!--			<div class="control-label">-->
<!--				--><?php //echo $field->label; ?>
<!--			</div>-->
<!--	-->
<!--		    <div class="controls">-->
<!--				--><?php //echo $field->input; ?>
<!--			</div>-->
<!--		</div>-->
<!--		--><?php //endif; ?>



	<?php
	// Recipients
	$field = $fieldSet['jform_pushuids'];
	?>
	<div class="control-group <?php echo 'field-' . $field->id . $field->responsive; ?>">
		<div class="control-label">
			<?php echo $field->label; ?>
		</div>
	
	    <div class="controls">
			<?php
			//echo $field->input;
			echo $this->getRecipientList();
			?>
		</div>
	</div>

</fieldset>


            <table class="table-striped table-inverse table-bordered" width="500px">
                <tr>
                    <th width="30%">
                        Priority
                    </th>
                    <th>
                        Explanation
                    </th>
                </tr>
                <tr>
                    <td>
                        Low priority
                    </td>
                    <td>
                        Sent without notification outside recipients' quiet hours
                    </td>
                </tr>
                <tr>
                    <td>
                        Normal priority
                    </td>
                    <td>
                        Sent with notification outside recipients' quiet hours
                    </td>
                </tr>

                <tr>
                    <td>
                        High priority*
                    </td>
                    <td>
                        Sent with notification ignoring recipients' quiet hours
                    </td>
                </tr>
                <tr>
                    <td>
                        Emergency priority*
                    </td>
                    <td>
                        Repeated notification until message acknowledged by recipient.  Alert will sound every <?php echo $retry; ?> seconds up to <?php echo $expire; ?> seconds, or until message is acknowledged
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <span class="small">* Authorised users only- please contact your site administrator if you think you need access</span>
                    </td>

                </tr>
            </table>