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

V3.6.0/form plugin fixes #501

Merged
merged 6 commits into from
Jun 23, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
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
11 changes: 11 additions & 0 deletions taccsite_cms/_settings/form_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,14 @@
'django.forms', # support form template override
'captcha', # support recaptcha for djangocms_forms
]

########################
# DJANGO: RECAPTCHA
########################

# To properly avoid client error about using test keys
# RECAPTCHA_PUBLIC_KEY = '__this_must_be_on_server_not_here__'
# RECAPTCHA_SECRET_KEY = '__this_must_be_on_server_not_here__'

# To silence server error about using test keys
# SILENCED_SYSTEM_CHECKS = ['captcha.recaptcha_test_key_error']
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ p.help-text:last-child {
margin-bottom: 0; /* overwrite forms.css label */
}

:root {
/* TUP-271: Add to & Import from @core-styles */
/* https://github.com/TACC/tup-ui/blob/c5454ba/libs/core-styles/src/lib/_imports/settings/color.css */
--global-color-danger--dark: #ab1717;
}
.asterisk {
margin-left: 0.5em;
color: var(--global-color-danger--dark);
}



/* Errors */
Expand Down
28 changes: 26 additions & 2 deletions taccsite_cms/static/site_cms/css/src/_imports/elements/form.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Reference:

Styleguide Elements.Forms
*/
@import url("_imports/tools/media-queries.css");

form {
font-family: var(--global-font-family--sans-alt);
Expand All @@ -35,11 +36,34 @@ fieldset:not(:last-child) {
input,
select,
textarea {
padding: 15px 10px;
border: var(--global-border--normal);
}

input:not(
[type="time"],
[type="date"],
[type="checkbox"],
[type="radio"]
),
select,
textarea {
width: 100%;
}
input[type="time"],
input[type="date"] {
font-family: var(--global-font-family--mono);
}

@media (pointer: coarse) {
input,
select,
textarea {
padding: 15px 10px;
}
}
@media (pointer: fine), (pointer: none) {
input,
select,
textarea {
padding: 5px 10px;
}
}
13 changes: 13 additions & 0 deletions taccsite_cms/static/site_cms/css/src/_imports/settings/color.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@import url("@tacc/core-styles/source/_imports/settings/color.css");

:root {
/* Accent Hues */
--global-color-accent--x-light: #F2DFBD; /* originally #e3d7fd */
--global-color-accent--light: #BDA374; /* originally #a387ed */
--global-color-accent--normal: #877453; /* originally #784fe8 */
--global-color-accent--dark: #64563E; /* originally #6039cc */
--global-color-accent--x-dark: #403014; /* originally #3d189b */

--global-color-accent--alt: #E0D8C9; /* originally #d2cce7 */
--global-color-accent--weak: #9D702140; /* originally #6039cc40 */
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h3 class="title">{{ instance.title }}</h3>
{{ field }}
{% endif %}
<label for="{{ field.id_for_label }}">
{{ field.label }}{% if field|is_required %}<span class="asterisk">*</span>{% endif %}
{{ field.label }}{% if field|is_required %}<span class="asterisk">(required)</span>{% endif %}
</label>
{% if not field|is_checkbox %}
{{ field }}
Expand Down