<commit_before>{% extends 'templates/app.twig' %}

{% block title %}Edit Profile{% endblock %}

{% block extrajs %}
	<script>
	// shamelessly stolen from stackoverflow
	$(function() {
		$("textarea").bind('input propertychange', function() {
			var maxLength  = 500;
			var usedLength = $(this).val().length;
			if (usedLength > maxLength) {
				$(this).val($(this).val().substring(0, maxLength));
				usedLength = $(this).val().length;
			}
			$('#remaining').html(maxLength - usedLength + ' characters remaining');
		});
	});
	</script>
{% endblock %}

{% block content %}
	<div class="row">
		<div class="col-md-6 col-md-offset-3">
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title">Edit Profile</h3>
				</div>

				<div class="panel-body">
					<h4>
						Need to change your password? Click <a href="{{ path_for('auth.password.change') }}">here</a>!
					</h4>

					<form action="{{ path_for('user.profile.edit') }}" method="post" autocomplete="off">
						<div class="form-group{{ errors.website ? ' has-error' : '' }}">
							<label for="website">Website</label>
							<input type="url" name="website" id="website" placeholder="http://domain.ext" class="form-control" value="{{ old.website | default(auth.user.website) }}">
							{% if errors.website %}
								<span class="help-block">{{ errors.website | first }}</span>
							{% endif %}
						</div>

						<div class="form-group{{ errors.bio ? ' has-error' : '' }}">
							<label for="bio">Bio (supports Github-Flavored Markdown)</label>
							<textarea name="bio" id="" cols="30" rows="10" class="form-control" placeholder="Your life story.">{{ old.bio | default(auth.user.bio) }}</textarea>
							<span class="help-block" id="remaining"></span>
							{% if errors.bio %}
								<span class="help-block">{{ errors.bio | first }}</span>
							{% endif %}
						</div>

						<button type="submit" class="btn btn-default">Submit</button>

						{{ csrf.field | raw }}<commit_msg>Bugfix: Disable horizontal resize on bio box<commit_after>{% extends 'templates/app.twig' %}

{% block title %}Edit Profile{% endblock %}

{% block extrajs %}
	<script>
	// shamelessly stolen from stackoverflow
	$(function() {
		$("textarea").bind('input propertychange', function() {
			var maxLength  = 500;
			var usedLength = $(this).val().length;
			if (usedLength > maxLength) {
				$(this).val($(this).val().substring(0, maxLength));
				usedLength = $(this).val().length;
			}
			$('#remaining').html(maxLength - usedLength + ' characters remaining');
		});
	});
	</script>
{% endblock %}

{% block extracss %}
	<style>
	#bio {
		resize: vertical;
	}
	</style>
{% endblock %}

{% block content %}
	<div class="row">
		<div class="col-md-6 col-md-offset-3">
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title">Edit Profile</h3>
				</div>

				<div class="panel-body">
					<h4>
						Need to change your password? Click <a href="{{ path_for('auth.password.change') }}">here</a>!
					</h4>

					<form action="{{ path_for('user.profile.edit') }}" method="post" autocomplete="off">
						<div class="form-group{{ errors.website ? ' has-error' : '' }}">
							<label for="website">Website</label>
							<input type="url" name="website" id="website" placeholder="http://domain.ext" class="form-control" value="{{ old.website | default(auth.user.website) }}">
							{% if errors.website %}
								<span class="help-block">{{ errors.website | first }}</span>
							{% endif %}
						</div>

						<div class="form-group{{ errors.bio ? ' has-error' : '' }}">
							<label for="bio">Bio (supports Github-Flavored Markdown)</label>
							<textarea name="bio" id="bio" cols="30" rows="10" class="form-control" placeholder="Your life story.">{{ old.bio | default(auth.user.bio) }}</textarea>
							<span class="help-block" id="remaining"></span>
							{% if errors.bio %}
								<span class="help-block">{{ errors.bio | first }}</span>
							{% endif %}
						</div>

						<button type="submit" class="btn btn-default">Submit</button>

						{{ csrf.field | raw }}
{'fraction_non_alphanumeric': 0.20757465404224326, 'fraction_numerical': 0.006797766448167031, 'mean_word_length': 3.3970117395944506, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 75, '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': '500408', 'n_tokens_mistral': 1704, 'n_tokens_neox': 1311, 'n_words': 286}