Commit 4d965a64 authored by Jerome Boucher's avatar Jerome Boucher
Browse files

Merge branch 'Support/2.7.X' into 'master'

Support/2.7.x

See merge request !612
parents 0169cff7 3b0ca6ed
Pipeline #10367 failed with stages
in 49 seconds
......@@ -257,8 +257,7 @@
skipCache: true
}
).on('typeahead:selected', function($event, suggestion, source) {
if(suggestion.ownerOrgId) {
if(suggestion.orgId) {
$("#originatorOrgRegNumber").val(suggestion.registrationNumber);
$("#originatorOrgInfo").show();
$("#originatorOwnerOrgName").val(suggestion.ownerOrgName);
......@@ -278,5 +277,18 @@
}
});
$("#orgTypeahead").keydown(function(event) {
// reinit typeahead and hidden input when suppr or backspace keys are pressed
if (event.which == 46 || event.which == 8) {
$("#originatorOrgRegNumber").val('');
$("#originatorOwnerOrgId").val('');
}
});
$("#orgTypeahead").click(function() {
$("#originatorOrgRegNumber").val('');
$("#originatorOwnerOrgId").val('');
});
</script>
......@@ -39,20 +39,23 @@
<div class="form-group">
<label class="col-sm-4 control-label">Producer</label>
<div class="col-sm-8">
<input type="text" class="form-control orgHide" placeholder="Producer" name="orgTypeahead"
<input type="text" class="form-control orgHide" placeholder="Producer" name="originatorOwnerOrgRegNumber"
id="orgTypeahead" />
<select class="form-control hide" name="originatorOwnerOrgId" id="originatorOwnerOrgId">
<option value="">All</option>
<?merge organizationsOriginator ?>
<option value="[?merge .orgId ?]">
<?merge .displayName ?>
</option>
<div>
<?merge .originators ?>
<option value="[?merge .orgId ?]">
<?merge .displayName ?>
</option>
</div>
</select>
<select class="form-control hide" name="originatorOrgRegNumber" id="originatorOrgRegNumber">
<option value="">All</option>
<?merge organizationsOriginator ?>
<div>
<?merge .originator.isset() then(.originator, .originators) ?>
<?merge .originators ?>
<option value="[?merge .registrationNumber ?]" orgId="[?merge .ownerOrgId ?]">
<?merge .displayName ?>
</option>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment