diff --git a/templates/components/phone_input.html b/templates/components/phone_input.html new file mode 100644 index 00000000..e0e35f00 --- /dev/null +++ b/templates/components/phone_input.html @@ -0,0 +1,12 @@ +{% from "components/text_input.html" import TextInput %} + +{% macro PhoneInput(phone_number, phone_ext, placeholder_phone="") %} +
+
+ {{ TextInput(phone_number, placeholder=placeholder_phone, validation='usPhone') }} +
+
+ {{ TextInput(phone_ext)}} +
+
+{%- endmacro %} diff --git a/templates/fragments/edit_user_form.html b/templates/fragments/edit_user_form.html index 1cf03c7e..5c77dd02 100644 --- a/templates/fragments/edit_user_form.html +++ b/templates/fragments/edit_user_form.html @@ -1,6 +1,7 @@ {% from "components/text_input.html" import TextInput %} {% from "components/options_input.html" import OptionsInput %} {% from "components/date_input.html" import DateInput %} +{% from "components/phone_input.html" import PhoneInput %}
{{ form.csrf_token }} @@ -17,15 +18,7 @@ {{ TextInput(form.email, validation='email') }} - -
-
- {{ TextInput(form.phone_number, validation='usPhone') }} -
-
- {{ TextInput(form.phone_ext)}} -
-
+ {{ PhoneInput(form.phone_number, form.phone_ext) }} {{ OptionsInput(form.service_branch) }} {{ OptionsInput(form.citizenship) }} diff --git a/templates/requests/approval.html b/templates/requests/approval.html index b6558081..ecd5556c 100644 --- a/templates/requests/approval.html +++ b/templates/requests/approval.html @@ -3,6 +3,7 @@ {% from "components/icon.html" import Icon %} {% from "components/alert.html" import Alert %} {% from "components/text_input.html" import TextInput %} +{% from "components/phone_input.html" import PhoneInput %} {% block content %} @@ -202,19 +203,8 @@ -
-
- {{ TextInput(review_form.email_mao, placeholder="name@mail.mil", validation='email') }} -
- -
- {{ TextInput(review_form.phone_mao, placeholder="(123) 456-7890", validation='usPhone') }} -
- -
- {{ TextInput(review_form.phone_ext_mao)}} -
-
+ {{ TextInput(review_form.email_mao, placeholder="name@mail.mil", validation='email') }} + {{ PhoneInput(review_form.phone_mao, review_form.phone_ext_mao) }}
diff --git a/templates/requests/screen-2.html b/templates/requests/screen-2.html index c83f9523..253816f9 100644 --- a/templates/requests/screen-2.html +++ b/templates/requests/screen-2.html @@ -4,6 +4,7 @@ {% from "components/text_input.html" import TextInput %} {% from "components/options_input.html" import OptionsInput %} {% from "components/date_input.html" import DateInput %} +{% from "components/phone_input.html" import PhoneInput %} {% block heading %} Information About You @@ -25,15 +26,8 @@
{{ TextInput(f.lname_request) }}
-
-
{{ TextInput(f.email_request, placeholder='e.g. jane@mail.mil', validation='email') }}
-
- {{ TextInput(f.phone_number, placeholder='e.g. (123) 456-7890', validation='usPhone') }} -
-
- {{ TextInput(f.phone_ext)}} -
-
+{{ TextInput(f.email_request, placeholder='e.g. jane@mail.mil', validation='email') }} +{{ PhoneInput(f.phone_number, f.phone_ext, placeholder_phone='e.g. (123) 456-7890') }}

We want to collect the following information from you for security auditing and determining priviledged user access.