mirror of
				https://github.com/Mibew/java.git
				synced 2025-10-31 10:31:07 +03:00 
			
		
		
		
	Make operator's email field required
This commit is contained in:
		
							parent
							
								
									1a0b315365
								
							
						
					
					
						commit
						b41405ea09
					
				| @ -52,8 +52,9 @@ if ((isset($_POST['login']) || !is_capable(CAN_ADMINISTRATE, $operator)) && isse | |||||||
| 		$errors[] = getlocal("page_agent.error.wrong_login"); | 		$errors[] = getlocal("page_agent.error.wrong_login"); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if ($email != '' && !is_valid_email($email)) | 	if ($email == '' || !is_valid_email($email)) { | ||||||
| 		$errors[] = wrong_field("form.field.mail"); | 		$errors[] = wrong_field("form.field.mail"); | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| 	if ($code != '' && (! preg_match("/^[A-z0-9_]+$/", $code))) { | 	if ($code != '' && (! preg_match("/^[A-z0-9_]+$/", $code))) { | ||||||
| 		$errors[] = getlocal("page_agent.error.wrong_agent_code"); | 		$errors[] = getlocal("page_agent.error.wrong_agent_code"); | ||||||
|  | |||||||
| @ -63,7 +63,7 @@ require_once('inc_errors.php'); | |||||||
| 		</div> | 		</div> | ||||||
| 
 | 
 | ||||||
| 		<div class="field"> | 		<div class="field"> | ||||||
| 			<div class="flabel"><?php echo getlocal('form.field.mail') ?></div>
 | 			<div class="flabel"><?php echo getlocal('form.field.mail') ?><span class="required">*</span></div>
 | ||||||
| 			<div class="fvalue"> | 			<div class="fvalue"> | ||||||
| 				<input type="text" name="email" size="40" value="<?php echo form_value('email') ?>" class="formauth"<?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
 | 				<input type="text" name="email" size="40" value="<?php echo form_value('email') ?>" class="formauth"<?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
 | ||||||
| 			</div> | 			</div> | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user