mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-23 20:01:01 -05:00
EMAIL_REGEX complied and css updates
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
(function() {
|
||||
(function(window) {
|
||||
'use strict';
|
||||
|
||||
function scrollToElement(element, delay) {
|
||||
@@ -65,4 +65,4 @@
|
||||
window.OrganizationDashboard = {
|
||||
highlightAndScrollToService: highlightAndScrollToService
|
||||
};
|
||||
})();
|
||||
})(window);
|
||||
|
||||
@@ -365,6 +365,14 @@ td.table-empty-message {
|
||||
}
|
||||
}
|
||||
|
||||
.usa-fieldset {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.usa-radio {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.spark-bar-bar {
|
||||
font-size: units(2);
|
||||
background-color: transparent;
|
||||
|
||||
@@ -45,7 +45,7 @@ from app.utils.csv import Spreadsheet
|
||||
from app.utils.user import user_has_permissions, user_is_platform_admin
|
||||
from notifications_python_client.errors import HTTPError
|
||||
|
||||
EMAIL_REGEX = r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"
|
||||
EMAIL_REGEX = re.compile(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$")
|
||||
|
||||
|
||||
@main.route("/organizations", methods=["GET"])
|
||||
@@ -151,7 +151,7 @@ def _handle_edit_service(org_id, service_id):
|
||||
|
||||
if not service_name:
|
||||
flash("Service name is required", "error")
|
||||
elif primary_contact and not re.match(EMAIL_REGEX, primary_contact):
|
||||
elif primary_contact and not EMAIL_REGEX.match(primary_contact):
|
||||
flash("Please enter a valid email address", "error")
|
||||
else:
|
||||
if service_name != service.name:
|
||||
@@ -339,8 +339,6 @@ def download_organization_usage_report(org_id):
|
||||
]
|
||||
|
||||
# Sanitize organization name for filename to prevent header injection
|
||||
import re
|
||||
|
||||
safe_org_name = re.sub(r"[^\w\s-]", "", current_organization.name).strip()
|
||||
safe_org_name = re.sub(r"[-\s]+", "-", safe_org_name)
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
value="{{ edit_service_data.primary_contact|default('') }}" placeholder="email@example.com">
|
||||
</div>
|
||||
|
||||
<fieldset class="usa-fieldset">
|
||||
<fieldset class="usa-fieldset margin-top-2">
|
||||
<legend class="usa-legend">Service Status</legend>
|
||||
<div class="usa-radio">
|
||||
<input class="usa-radio__input" id="statusTrial" type="radio" name="status" value="trial"
|
||||
|
||||
Reference in New Issue
Block a user