<commit_before>{% extends "base.html" %}
{% load i18n %}
{% load ocl_tags %}
{% load bootstrap3 %}


{% block title %}{{ mapping.owner }} / {{ mapping.source }} / {{ mapping.id }} / {% trans "Edit" %} - Open Concept Lab{% endblock title %}


{% block content %}
{% if source.owner_type == 'Organization' %}
	{% url 'mapping-home' org=mapping.owner source=mapping.source mapping=mapping.id as mapping_url %}
{% else %}
	{% url 'mapping-home' user=mapping.owner source=mapping.source mapping=mapping.id as mapping_url %}
{% endif %}

<h3>
	{% resource_owner_label mapping label_size='large' %} / {% generic_resource_label resource_type='source' resource_id=mapping.source resource_url=source_url label_size='large' %} / {% generic_resource_label resource_type='mapping' resource_id=mapping.id resource_name=mapping.map_type resource_url=mapping_home_url label_size='large' %}&nbsp;/&nbsp;{% trans 'Update Mapping' %}
	{% if not mapping.retired %}
		&nbsp;&nbsp;&nbsp;<a href="{% url 'mapping-retire' org=source.owner source=source.id mapping=mapping.id %}" title="Retire Mapping" class="small text-muted"><span class="glyphicon glyphicon-trash"></span></a>
	{% endif %}
</h3>

<div class="container">
	<div class="row" style="padding-top:15px;">

		<!-- Edit Mapping Form -->
		<div class="col-md-8">
			<form class="form" name="mapping_form" autocomplete="off" method="post">
				{% csrf_token %}

				<div class="form-group">
					<label class="control-label">Mapping Belongs To:</label>
					<div style="margin-bottom:14px;">{% generic_resource_label resource_type='source' resource_id=source.id resource_name=source.name owner_type=source.owner_type owner_id=source.owner label_size='small' display_breadcrumb=True %}</div>
				</div>

				{% bootstrap_field form.from_concept_url %}
				{% bootstrap_field form.map_type %}
				{% bootstrap_field form.external_id %}

				<div class="form-group required">
					{{ form.is_internal_or_external.errors }}
					<label class="control-label" for="id_is_internal_or_external_0">{{ form.is_internal_or_external.label }}</label>&nbsp;
					<a href="#" data-toggle="tooltip" data-placement="right" title="Internal means the to-concept is stored in OCL. External means that the to-concept is not stored in OCL."><span class="glyphicon glyphicon-question-sign"></span></a>
					<div id="id_is_internal_or_external">
						<label for="id_is_internal_or_external_0" class="radio-inline" title="To Concept is stored in OCL"><input class="radio-inline" id="id_is_internal_or_external_0" name="is_internal_or_external" required="required" type="radio" checked="checked" value="Internal">&nbsp;Internal</label>
						<label for="id_is_internal_or_external_1" class="radio-inline" title="To Concept is not stored in OCL"><input id="id_is_internal_or_external_1" name="is_internal_or_external" required="required" type="radio" value="External" class="radio-inline">&nbsp;External</label>
					</div>
				</div>

				<div id="internal-mapping-form">

					{% bootstrap_field form.internal_to_concept_url %}

					{% comment %}
					<div class="form-group">
						{{ form.internal_to_concept_url.errors }}
						<label class="control-label" for="id_internal_to_concept_url">{{ form.internal_to_concept_url.label }}</label>
						<input class="form-control" id="id_internal_to_concept_url" name="internal_to_concept_url" placeholder="e.g. /orgs/CIEL/sources/CIEL/concepts/32/" title="{{ form.internal_to_concept_url.help_text }}" type="text">
						<span class="help-block small">{{ form.internal_to_concept_url.help_text }}</span>
					</div>
					{% endcomment %}

				</div>

				<div id="external-mapping-form">

					{% bootstrap_field form.external_to_source_url %}
					{% bootstrap_field form.external_to_concept_code %}
					{% bootstrap_field form.external_to_concept_name %}

					{% comment %}
					<div class="form-group">
						{{ form.external_to_source_url.errors }}
						<label class="control-label" for="id_external_to_source_url">{{ form.external_to_source_url.label }}</label>
						<input class="form-control" id="id_external_to_source_url" name="external_to_source_url" placeholder="e.g. /orgs/IHTSDO/sources/SNOMED-CT/" title="{{ form.external_to_source_url.help_text }}" type="text">
						<span class="help-block small">{{ form.external_to_source_url.help_text }}</span>
					</div>

					<div class="form-group">
						{{ form.external_to_concept_code.errors }}
						<label class="control-label" for="id_external_to_concept_code">{{ form.external_to_concept_code.label }}</label>
						<input class="form-control" id="id_external_to_concept_code" name="external_to_concept_code" placeholder="e.g. A15.1" title="{{ form.external_to_concept_code.help_text }}" type="text">
						<span class="help-block small">{{ form.external_to_concept_code.help_text }}</span>
					</div>

					<div class="form-group">
						{{ form.external_to_concept_name.errors }}
						<label class="control-label" for="id_external_to_concept_name">{{ form.external_to_concept_name.label }}</label>
						<input class="form-control" id="id_external_to_concept_name" name="external_to_concept_name" placeholder="e.g. Tuberculosis of lung, confirmed by culture only" title="{{ form.external_to_concept_name.help_text }}" type="text">
						<span class="help-block small">{{ form.external_to_concept_name.help_text }}</span>
					</div>
					{% endcomment %}

				</div>

				{% buttons %}
					<button type="submit" class="btn btn-primary">{% trans "Update Mapping" %}</button>
					<a href="{{ mapping_url }}" class="btn btn-default">{% trans "Cancel" %}</a>
				{% endbuttons %}
			</form>
		</div>

		<!-- Tip Panel -->
		<div class="col-md-4">
			<div class="panel panel-default">
				<div class="panel-heading"><h3 class="panel-title">Tip</h3></div>
				<div class="panel-body">
					<p class="small">Choose a <strong>Concept ID</strong> that is consistent across the source. Concept IDs cannot be changed after a concept is created.</p>
					<p class="small">Assign the first name and description now. Additional names and descriptions in any locale can be added later.</p>
				</div>
			</div>
		</div>

	</div>
</div>
<commit_msg>Now working on the Mapping Target radio buttons<commit_after>{% extends "base.html" %}
{% load i18n %}
{% load ocl_tags %}
{% load bootstrap3 %}


{% block title %}{{ mapping.owner }} / {{ mapping.source }} / {{ mapping.id }} / {% trans "Edit" %} - Open Concept Lab{% endblock title %}


{% block content %}
{% if source.owner_type == 'Organization' %}
	{% url 'mapping-home' org=mapping.owner source=mapping.source mapping=mapping.id as mapping_url %}
{% else %}
	{% url 'mapping-home' user=mapping.owner source=mapping.source mapping=mapping.id as mapping_url %}
{% endif %}

<h3>
	{% resource_owner_label mapping label_size='large' %} / {% generic_resource_label resource_type='source' resource_id=mapping.source resource_url=source_url label_size='large' %} / {% generic_resource_label resource_type='mapping' resource_id=mapping.id resource_name=mapping.map_type resource_url=mapping_home_url label_size='large' %}&nbsp;/&nbsp;{% trans 'Update Mapping' %}
	{% if not mapping.retired %}
		&nbsp;&nbsp;&nbsp;<a href="{% url 'mapping-retire' org=source.owner source=source.id mapping=mapping.id %}" title="Retire Mapping" class="small text-muted"><span class="glyphicon glyphicon-trash"></span></a>
	{% endif %}
</h3>

<div class="container">
	<div class="row" style="padding-top:15px;">

		<!-- Edit Mapping Form -->
		<div class="col-md-8">
			<form class="form" name="mapping_form" autocomplete="off" method="post">
				{% csrf_token %}

				<div class="form-group">
					<label class="control-label">Mapping Belongs To:</label>
					<div style="margin-bottom:14px;">{% generic_resource_label resource_type='source' resource_id=source.id resource_name=source.name owner_type=source.owner_type owner_id=source.owner label_size='small' display_breadcrumb=True %}</div>
				</div>

				{% bootstrap_field form.from_concept_url %}
				{% bootstrap_field form.map_type %}
				{% bootstrap_field form.external_id %}

				{% bootstrap_field form.is_internal_or_external %}

				{% comment %}
				<div class="form-group required">
					{{ form.is_internal_or_external.errors }}
					<label class="control-label" for="id_is_internal_or_external_0">{{ form.is_internal_or_external.label }}</label>&nbsp;
					<a href="#" data-toggle="tooltip" data-placement="right" title="Internal means the to-concept is stored in OCL. External means that the to-concept is not stored in OCL."><span class="glyphicon glyphicon-question-sign"></span></a>
					<div id="id_is_internal_or_external">
						<label for="id_is_internal_or_external_0" class="radio-inline" title="To Concept is stored in OCL"><input class="radio-inline" id="id_is_internal_or_external_0" name="is_internal_or_external" required="required" type="radio" checked="checked" value="Internal">&nbsp;Internal</label>
						<label for="id_is_internal_or_external_1" class="radio-inline" title="To Concept is not stored in OCL"><input id="id_is_internal_or_external_1" name="is_internal_or_external" required="required" type="radio" value="External" class="radio-inline">&nbsp;External</label>
					</div>
				</div>
				{% endcomment %}

				<div id="internal-mapping-form">
					{% bootstrap_field form.internal_to_concept_url %}
				</div>
				<div id="external-mapping-form">
					{% bootstrap_field form.external_to_source_url %}
					{% bootstrap_field form.external_to_concept_code %}
					{% bootstrap_field form.external_to_concept_name %}
				</div>

				{% buttons %}
					<button type="submit" class="btn btn-primary">{% trans "Update Mapping" %}</button>
					<a href="{{ mapping_url }}" class="btn btn-default">{% trans "Cancel" %}</a>
				{% endbuttons %}
			</form>
		</div>

		<!-- Tip Panel -->
		<div class="col-md-4">
			<div class="panel panel-default">
				<div class="panel-heading"><h3 class="panel-title">Tip</h3></div>
				<div class="panel-body">
					<p class="small">Choose a <strong>Concept ID</strong> that is consistent across the source. Concept IDs cannot be changed after a concept is created.</p>
					<p class="small">Assign the first name and description now. Additional names and descriptions in any locale can be added later.</p>
				</div>
			</div>
		</div>

	</div>
</div>

{'fraction_non_alphanumeric': 0.16050338818973864, 'fraction_numerical': 0.003969022265246854, 'mean_word_length': 4.91356611333715, 'pattern_counts': {'":': 0, '<': 155, '<?xml version=': 0, '>': 155, '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': '1359736', 'n_tokens_mistral': 3881, 'n_tokens_neox': 3216, 'n_words': 673}