<commit_before>-# Building out the message strings, if any
:php
	$alert_type = '';
	$message = ' ';

	// Determine the alert type and build any related copy 

	// ERROR
	if($errors->any()) {
		$alert_type = 'danger';

		if($errors->has('slug')) 
			$message = 'A unique slug could not be formed from the name or title.  You must use a different value.';
		else if($errors->has('error message')) 
			$message = $errors->first('error message');
		else 
			$message = 'The field in conflict is highlighted below.';

	// SUCCESS
	} else if(Session::has('success')) {
		$alert_type = 'success';
		$message = Session::get('success');

	// NEUTRAL
	} else $alert_type = 'normal';

-# Display notifications after CRUD requests, AJAX errors, etc
-# If there's no message, data-display attribute will be false. Used in the JS to open up the pane.
.notification-area.alert(data-js-view="notification" data-alert-type=$alert_type data-display=($message!=' ')?'true':'false')
	.notification-wrap
		.close
			%span.glyphicon.glyphicon-remove-circle
		%p
			%span.glyphicon
			%span.message!=$message<commit_msg>Better validation error message<commit_after>-# Building out the message strings, if any
:php
	$alert_type = '';
	$message = ' ';

	// Determine the alert type and build any related copy 

	// ERROR
	if($errors->any()) {
		$alert_type = 'danger';

		if($errors->has('slug')) 
			$message = 'A unique slug could not be formed from the name or title.  You must use a different value.';
		else if($errors->has('error message')) 
			$message = $errors->first('error message');
		else 
			$message = '<b>Validation error</b>, the field in conflict is highlighted below. Your submission was <b>not</b> saved.';

	// SUCCESS
	} else if(Session::has('success')) {
		$alert_type = 'success';
		$message = Session::get('success');

	// NEUTRAL
	} else $alert_type = 'normal';

-# Display notifications after CRUD requests, AJAX errors, etc
-# If there's no message, data-display attribute will be false. Used in the JS to open up the pane.
.notification-area.alert(data-js-view="notification" data-alert-type=$alert_type data-display=($message!=' ')?'true':'false')
	.notification-wrap
		.close
			%span.glyphicon.glyphicon-remove-circle
		%p
			%span.glyphicon
			%span.message!=$message
{'fraction_non_alphanumeric': 0.15032967032967032, 'fraction_numerical': 0.0, 'mean_word_length': 4.013215859030837, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, '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': '2222608', 'n_tokens_mistral': 778, 'n_tokens_neox': 700, 'n_words': 221}