Files
Testing/templates/user_messages_new1.tpl
sean 0e8a8b3028
Some checks failed
deploy-testing / deploy (push) Has been cancelled
Initial testing snapshot
2026-11-17 16:15:01 -05:00

206 lines
6.0 KiB
Smarty

{* INCLUDE HEADER CODE *}
{include file="header_modal.tpl"}
{literal}
<style>
.modal-content{background:black;}
.frmSearch {border: 1px solid #a8d4b1;background-color: #c6f7d0;margin: 2px 0px;padding:40px;border-radius:4px;}
#country-list{float:left;list-style:none;margin-top:-3px;padding:0;width:190px;position: absolute;}
#country-list li{padding: 10px; background: #fa3200; border-bottom: #fa3200 1px solid;}
#country-list li:hover{background:#000000;cursor: pointer;}
#search-box{padding: 10px;border: #a8d4b1 1px solid;border-radius:4px;}
</style>
{/literal}
{* $Id: user_messages_new.tpl 235 2009-11-13 04:30:39Z phil $ *}
<div class="modal-header" style="text-align:left;">
<span class="modal-title" id="exampleModalLiveLabel" style="font-size: 17px;">Compose New Message</span>
</div>
<br />
{* JAVASCRIPT FOR CREATING SUGGESTION BOX *}
{if $nomessages==1}<div style="text-align:left;">In order to reduce spam, new members must wait before they are able to message others. Once you are able to message others, this message will no longer be seen.</div>{else}
<div id='success_div' style='display: none;'><br>{lang_print id=804}</div>
<div id='form_div'>
<div style='text-align:left; padding-left: 10px;'>
{lang_sprintf id=789 1=$user->level_info.level_message_recipients}
{* SHOW ERRORS *}
<div id='error_div' style='display: none;'>
<br>
<table cellpadding='0' cellspacing='0'>
<tr><td class='error'>
<img src='./images/error.gif' border='0' class='icon'> <span id='error_message'></span>
</td></tr>
</table>
</div>
</div>
{literal}
<script src="/include/js/jquery.form.js"></script>
<script>
i=0;
function checkmail(){
if(i==0){
//jQuery("#form1").submit();
}
i=1;
closemodal();
}
jQuery(document).ready(function() {
jQuery('form input').keydown(function (e) {
if (e.keyCode == 13) {
selectUser(jQuery("#search-box").val());
e.preventDefault();
return false;
}
});
jQuery('#form1').ajaxForm({
success: function(){
jQuery('#form_div').hide();
jQuery('#success_div').show();
setTimeout(closemodal, 5000);
}
});
jQuery("#search-box").keyup(function(){
jQuery.ajax({
type: "POST",
url: "misc_js.php?task=find_users&input="+jQuery(this).val(),
data:'input='+jQuery(this).val(),
beforeSend: function(){
jQuery("#search-box").css("background","#FFF url(LoaderIcon.gif) no-repeat 165px");
},
success: function(data){
jQuery("#suggesstion-box").show();
jQuery("#suggesstion-box").html(data);
jQuery("#search-box").css("background","#FFF");
}
});
});
});
//To select country name
function selectUser(val) {
who=jQuery("#to").val();
whoarray=who.split(",");
alreadyin=0;
for(var i = 0; i < whoarray.length; i++){
if(val==whoarray[i]){alreadyin=1;}
}
if(alreadyin==0){
if(who==""){
jQuery("#to").val(val);
}else{
jQuery("#to").val(who+","+val);
}
jQuery("#toshow").append(val+"<br>");
}
who=jQuery("#to").val();
whoarray1=who.split(",");
if(whoarray1.length=={/literal}{$user->level_info.level_message_recipients}{literal})
{
jQuery("#search-box").attr("disabled", "disabled");
}
jQuery("#suggesstion-box").hide();
jQuery("#search-box").val("");
}
function fillToIds() {
jQuery("#submit1").prop( "disabled", true );
jQuery("#submit2").prop( "disabled", true );
return checkmail();
}
</script>{/literal}<div class="text-left" style="padding:10px;">
<form action='user_messages_new.php' method='POST' autocomplete="off" id="form1">
<table cellpadding='0' cellspacing='0'>
<tr>
<td><input type='submit' class='button' value='{lang_print id=791}' id="submit2" onClick="
this.value='Sending…';">&nbsp;</td>
<input type='hidden' name='task' value='send'>
<td><input type='button' class='button' value='{lang_print id=39}' onClick='closemodal();'></td>
</tr>
</table>
<div class="text-left">{lang_print id=601}</div>
<div><b><a href='{$url->url_create('profile',$user->user_info.user_username)}' target='_parent'>{$user->user_displayname}</a></b></div><br>
<div>{lang_print id=790}</div>
<div> <div id='tos' style='border: none;font-family: arial, verdana, serif;font-size: 12px;color: #ffffff;vertical-align: middle;padding-left: 2px;'>
<div id="toshow">{$to_user}<br></div>
<input type="text" id="search-box" class="form-control" />
<div id="suggesstion-box"></div>
</div>
<input type='hidden' name='to' id='to' value='{$to_user}'>
<br>
<div>{lang_print id=520}</div><div><input type='text' class="form-control" name='subject' id='subject' value='{$subject}' size='30' maxlength='100'></div><br>
<div>{lang_print id=521}</div>
<div><textarea rows='10' cols='50' name='message' class="form-control" id="new_message" >{$message}</textarea></div>
<table cellpadding='0' cellspacing='0'>
<tr>
<td><input type='submit' class='button' value='{lang_print id=791}' id="submit1" onClick="
this.value='Sending…';">&nbsp;</td>
<input type='hidden' name='task' value='send'>
<td><input type='button' class='button' value='{lang_print id=39}' onClick='closemodal();'></td>
</tr>
</table>
</form>
</div>
</div>
{/if}
{literal}
<link rel="stylesheet" type="text/css" href="/include/emojis/emojionearea.min.css" media="screen">
<script type="text/javascript" src="/include/emojis/emojionearea.js"></script>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#new_message").emojioneArea({
attributes: {
spellcheck : true,
autocomplete : "on",
autocorrect : "on",
autocapitalize : "on",
},
// container: "#emojicontainer",
pickerPosition: "left",
tonesStyle: "bullet",
pickerPosition :"bottom"
// saveEmojisAs: "image"
});
});
</script>
{/literal}
</body>
</html>