Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to use input pattern for SAML fingerprint instead of js script tag #1947

Merged
merged 3 commits into from
Feb 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,21 @@
<t:textfield class="col-12"
name="tenantData_samlIssuerName" value="@tenant.getTenantData().getSamlIssuerName()"
labelKey="TenantData.samlIssuerName" helpKey="TenantData.samlIssuerName.help"/>
<t:textfield class="col-12"
name="tenantData_samlFingerprint"
id="tenantData_samlFingerprint"
value="@tenant.getTenantData().getSamlFingerprint()"
labelKey="TenantData.samlFingerprint"
helpKey="TenantData.samlFingerprint.help"/>
<script>
const _inputElement = document.getElementById('tenantData_samlFingerprint');
_inputElement.addEventListener("input", () => {
const regex = new RegExp("[^A-Za-z0-9,]", "g")
_inputElement.value = _inputElement.value.replace(regex, "")
})
</script>
<div class="form-group col-12">
<label class="form-label">
@i18n("TenantData.samlFingerprint")
</label>
<div>
<input type="text"
name="tenantData_samlFingerprint"
pattern="^[a-zA-Z0-9,]*$"
class="form-control"
value="@tenant.getTenantData().getSamlFingerprint()"/>
</div>
<small class="form-text text-muted">
@i18n("TenantData.samlFingerprint.help")
</small>
</div>
</div>
<t:formBar backButton="false"/>
</t:editForm>
Expand Down
Loading