| Commit message (Collapse) | Author | Age | Lines |
... | |
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
The inspect form, if shown, is in a sibling div to the report div,
so make sure that it is shown/hidden as appropriate.
We consolidate the inspect JavaScript setup into one function, so
that it can be called on load, and when pulled in.
|
|/
|
|
|
| |
- A user can be assigned to any number of its body's categories
- The category ids are stored as a list in the user's extra field
|
| |
|
|\ |
|
| |
| |
| |
| |
| | |
This makes it easier to use the map, as the land outside the area is
shaded, rather than the area itself.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
If you were on a body page, selected a report, then another report, the
"Back to all reports" link then had an incorrect URL. Also, going "Back
to all reports" after one report would fetch an incorrect Ajax query of
reports to show (as the URL had not yet been updated).
Both of these are fixed by storing the URL on page load, and using that
for the "Back to all reports" link and the URL used by the Ajax call.
There is still an issue with the URL shown if you filter, then select a
report, then click "Back to all reports", but the contents are okay.
|
|
|
|
|
|
| |
It turns out that whilst IE9+ defines MouseEvent, it's not in the
form that can be used as a constructor until Edge. To fix this we
check that MouseEvent is a function before using it as one.
|
|\ |
|
| | |
|
|\ \
| |/
|/| |
|
| | |
|
| |
| |
| |
| |
| | |
This matches the behaviour on /around, and prevents a refresh when
changing the state or category filters.
|
| | |
|
| |
| |
| |
| |
| | |
- Also adds add select all/none UI
- Adds admin hint for empty category list behaviour
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* The same template is now used for creating new contacts as well as editing
existing ones.
* Zurich template for editing contacts has been left unchanged for now
* Reputation threshold is included on form
* Fields are in a more intuitive order
* Required fields are marked as such in DOM for client-side validation
* Rename ‘notes’ field to make its meaning clearer
|
|/
|
|
|
|
|
|
|
|
| |
Clicking the thumbnail on a report admin page was causing the 'rotating photo
will discard changes' alert to appear unnecessarily. This was due to the
data-confirm attribute on the parent <dd>, the meaning of which was changed by
f5b171f.
Fixed by using a different attribute name. Spotted another bug that I think
caused the dialog to never actually be shown with the correct message because
'this' was the form and not the clicked button element.
|
|\ |
|
| |
| |
| |
| |
| |
| | |
This lets people filter by multiple categories or states. It uses our
jQuery multi-select plugin to turn the <select multiple>s into little
overlay lists of checkboxes. HTML5 history is also supported.
|
|/ |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We want to make sure the extra metadata stored on a problem is kept in sync with
the requirements of the category the report is in. Thus, if a report is moved to
a category that collects extra metadata then the appropriate input fields should
be shown so the inspector can enter the data.
This commit shows the category extra HTML elements for every selectable category
on the inspector page hiding those that don't apply to the selected category. JS
is used to show/hide the extra fields when the category dropdown is changed.
A consequence of the implementation is that any extra metadata from the original
category is lost when the category is changed. Some thought was given to storing
the old values elsewhere in the problem's extra field but I decided against this
for the time being.
For mysociety/fixmystreetforcouncils#45
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When this commit is finished, modern browsers will have a far less
buggy layout on .with-notes pages. The main improvements are:
1. Simplified padding on .with-notes columns, allowing us to link to
an individual column (eg: /inspect#side-report-secondary) without
the browser scrolling down to jump over the #map_sidebar padding on
desktop browsers. Making hash fragment scrolling work means we can
automatically scroll Inspectors down to the Inspect form, when they
click the Inspect button on mobile devices, without worrying about
it breaking the desktop experience.
2. Flexible .with-notes column widths, meaning the layout no longer
breaks when long sidebar content triggers a scrollbar and decreases
the usable width of the sidebar. A predefined width for #side-report
means we can make sure .shadow-wrap is the correct width, despite
its fixed position taking it out of the document flow.
We make a trade-off on mid-size screens (768-960px), of hiding the map
to keep the two-column sidebar usable. Will revisit if it turns out
this causes problems later on.
|
| |
| |
| |
| |
| |
| | |
Inspectors can now tick the optional “Save with a public update”
checkbox, to reveal the “Public update” textarea. This means there is
no longer a need for two separate submit buttons.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Even though FMS has had a `.btn` class for a while, styling buttons has
still been difficult, mainly because of the very opinionated base styles
applied to overpowered selectors like `input[type="submit"]`.
This commit brings the FMS styles more in line with modern frameworks
like Bootstrap – inputs and buttons are left completely unstyled by
default, with an opt-in `.btn` class to add the styles back in.
Since `.btn` is just a single class, it’s easy to override, and avoids
selector bloat like `.green-btn, button.green-btn, input.green-btn`.
|
| |
| |
| |
| |
| |
| |
| |
| | |
IDs and locations at the top, then location-related actions (including
a new “navigate to this problem” button), then status and category
inputs (since these can have an effect on how we display the rest of
the form), then any status/category-related inputs, and finally inputs
for internal details like priority and traffic management.
|
| |
| |
| |
| | |
Cope better if things aren't defined.
|
| | |
|
|/ |
|
| |
|
|\ |
|
| |
| |
| |
| |
| | |
The report form is now split into "Public" and "Private" sections,
with a third, matching heading, for the category_extras, if shown.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Form input styling is mostly left up to the browser default now.
A custom border, drop-shadow, and border-radius can be applied by
adding the `.form-control` class, which standardizes the appearance
of inputs, selects, and textareas.
The core reporting form, authentication forms, local alert forms,
contact form, and questionnaire form have all been updated to use
the new `.form-control` class.
|
| |
| |
| |
| |
| |
| | |
The ticks and crosses already imply that these are things you should
and shouldn’t do. Removing the headings reduces visual clutter, and
better associates the tips with the form input directly above.
|
| |
| |
| |
| |
| | |
Switching between categories with / without extra questions no longer
results in nested `#category_meta` elements.
|
|/
|
|
|
|
|
|
| |
As part of this, rename "planned reports" to "shortlist".
The `.segmented-control` component now supports basic usage (as in the
admin report actions menu bar) and usage with hidden radio inputs and
labels (as on the report questionnaire page).
|
| |
|
|\ |
|
| |
| |
| |
| |
| | |
A very subtle nudge that you can/should upload multiple photos. With a
fallback to singular if Dropzone fails to load for some reason.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Firefox would, on a page that pulled in a report via ajax, only
return the reporting form's name field with #form_name. Switch
to using a class on the relevant fields.
|
| | |
|
| |
| |
| |
| | |
Firefox still only scrolls precisely to the focus.
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
| |
This builds on the response templates in the Zürich cobrand:
- Allow response templates to be assigned to categories
- Also adds a auto_response flag, which will be used to automatically create
updates when reports are made.
- Include response templates select box on update form
For mysociety/fixmystreetforcouncils#31
|