<commit_before><div id="required_fields_message"><?php echo $this->lang->line('common_fields_required_message'); ?></div>

<ul id="error_message_box" class="error_message_box"></ul>
	
<?php echo form_open("messages/send_form/".$person_info->person_id, array('id'=>'send_sms_form', 'class'=>'form-horizontal')); ?>
	<fieldset>
		<div class="form-group form-group-sm">
			<?php echo form_label($this->lang->line('messages_first_name'), 'first_name_label', array('for'=>'first_name', 'class'=>'control-label col-xs-2')); ?>
			<div class="col-xs-10">
				<?php echo form_input(array('class'=>'form-control input-sm', 'type'=>'text', 'name'=>'first_name', 'value'=>$person_info->first_name));?>
			</div>
		</div>
		<div class="form-group form-group-sm">
			<?php echo form_label($this->lang->line('messages_last_name'), 'last_name_label', array('for'=>'last_name', 'class'=>'control-label col-xs-2')); ?>
			<div class="col-xs-10">
				<?php echo form_input(array('class'=>'form-control input-sm', 'type'=>'text', 'name'=>'last_name', 'value'=>$person_info->last_name));?>
			</div>
		</div> 
		<div class="form-group form-group-sm">
			<?php echo form_label($this->lang->line('messages_phone'), 'phone_label', array('for'=>'phone', 'class'=>'control-label col-xs-2')); ?>
			<div class="col-xs-10">
				<?php echo form_input(array('class'=>'form-control input-sm', 'type'=>'text', 'name'=>'phone', 'value'=>$person_info->phone_number));?>
			</div>
		</div>
		<div class="form-group form-group-sm">
			<?php echo form_label($this->lang->line('messages_message'), 'message_label', array('for'=>'message', 'class'=>'control-label col-xs-2')); ?>
			<div class="col-xs-10">
				<?php echo form_textarea(array('class'=>'form-control input-sm', 'name'=>'message', 'id'=>'message', 'value'=>$this->config->item('msg_msg')));?>
			</div>
		</div>
	</fieldset>
<?php echo form_close(); ?>

<script type="text/javascript" language="javascript">
$(document).ready(function()
{
	$('#send_sms_form').validate($.extend({
		submitHandler:function(form) 
		{
			$(form).ajaxSubmit({
				success:function(response)
				{
					dialog_support.hide();
					post_person_form_submit(response);
				},
				dataType:'json'
			});
		},
		rules:
		{
			phone:
			{
				required:true,
				number:true
			},
			msg:
			{
				required:true,
				number:false
			}
   		},
		messages:
		{
			phone:
			{
				required:"<?php echo $this->lang->line('messages_phone_number_required'); ?>",
				number:"<?php echo $this->lang->line('messages_phone'); ?>"
			},
			msg:
			{
				required:"<?php echo $this->lang->line('messages_message_required'); ?>"
			}
		}
	}, dialog_support.error));
});
</script><commit_msg>fixed required fields in sms_form (#472)<commit_after><div id="required_fields_message"><?php echo $this->lang->line('common_fields_required_message'); ?></div>

<ul id="error_message_box" class="error_message_box"></ul>
	
<?php echo form_open("messages/send_form/".$person_info->person_id, array('id'=>'send_sms_form', 'class'=>'form-horizontal')); ?>
	<fieldset>
		<div class="form-group form-group-sm">
			<?php echo form_label($this->lang->line('messages_first_name'), 'first_name_label', array('for'=>'first_name', 'class'=>'control-label col-xs-2')); ?>
			<div class="col-xs-10">
				<?php echo form_input(array('class'=>'form-control input-sm', 'type'=>'text', 'name'=>'first_name', 'value'=>$person_info->first_name));?>
			</div>
		</div>
		<div class="form-group form-group-sm">
			<?php echo form_label($this->lang->line('messages_last_name'), 'last_name_label', array('for'=>'last_name', 'class'=>'control-label col-xs-2')); ?>
			<div class="col-xs-10">
				<?php echo form_input(array('class'=>'form-control input-sm', 'type'=>'text', 'name'=>'last_name', 'value'=>$person_info->last_name));?>
			</div>
		</div> 
		<div class="form-group form-group-sm">
			<?php echo form_label($this->lang->line('messages_phone'), 'phone_label', array('for'=>'phone', 'class'=>'control-label col-xs-2 required')); ?>
			<div class="col-xs-10">
				<?php echo form_input(array('class'=>'form-control input-sm required', 'type'=>'text', 'name'=>'phone', 'value'=>$person_info->phone_number));?>
			</div>
		</div>
		<div class="form-group form-group-sm">
			<?php echo form_label($this->lang->line('messages_message'), 'message_label', array('for'=>'message', 'class'=>'control-label col-xs-2 required')); ?>
			<div class="col-xs-10">
				<?php echo form_textarea(array('class'=>'form-control input-sm required', 'name'=>'message', 'id'=>'message', 'value'=>$this->config->item('msg_msg')));?>
			</div>
		</div>
	</fieldset>
<?php echo form_close(); ?>

<script type="text/javascript" language="javascript">
$(document).ready(function()
{
	$('#send_sms_form').validate($.extend({
		submitHandler:function(form) 
		{
			$(form).ajaxSubmit({
				success:function(response)
				{
					dialog_support.hide();
					post_person_form_submit(response);
				},
				dataType:'json'
			});
		},
		rules:
		{
			phone:
			{
				required:true,
				number:true
			},
			message:
			{
				required:true,
				number:false
			}
   		},
		messages:
		{
			phone:
			{
				required:"<?php echo $this->lang->line('messages_phone_number_required'); ?>",
				number:"<?php echo $this->lang->line('messages_phone'); ?>"
			},
			message:
			{
				required:"<?php echo $this->lang->line('messages_message_required'); ?>"
			}
		}
	}, dialog_support.error));
});
</script>
{'fraction_non_alphanumeric': 0.23244239631336405, 'fraction_numerical': 0.004976958525345622, 'mean_word_length': 5.069351230425056, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 175, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5756734', 'n_tokens_mistral': 2087, 'n_tokens_neox': 1874, 'n_words': 276}