Skip to content
Snippets Groups Projects
  1. Aug 11, 2023
    • Saurabh Kumar's avatar
      Add pre-commit with black,prettier and djhtml (#3502) · 4ce14204
      Saurabh Kumar authored
      - Add black, djhtml, prettier
      - Add precommit
      
      
      This PR add configurations for black, djhtml and prettier.
      
      - black is used for formatting python files
      - djhtml for formatting html files. Use `{# fmt: off #}` and `{# fmt: on
      #}` where needed.
      - prettier for formatting of sass,css,yml and js files
      
      Note: prettier picks up some of it's config from `.editorconfig`, so
      it's updated appropriately
      
      Formating of mardown files, minified or vendored js files are ignored.
      
      Formatting used off-the-self rules for better consistency with the
      community as large.
      
      The formatting is not applied to all the files as it will introduce a
      lot of merge conflict with
      current PRs, instead `pre-commit` config is provide which can be
      installed by `precommit install`
      locally. It will format only the modified files in the PR/commits. 
      
      Once majority of the current active PRs are either rebased & formatted
      using precommit or merged, we can
      run the `make fmt` on the full repo and activate additional prettier and
      black checks in our lint rules.
      
      The modified sass files fixes the eslint error that would came up if we
      were to apply the prettier formatter on them.
      
      Fixes #3500
      Unverified
      4ce14204
  2. Aug 04, 2023
  3. Aug 03, 2023
  4. Aug 01, 2023
  5. Jul 31, 2023
  6. Jul 28, 2023
  7. Jul 27, 2023
  8. Jul 25, 2023
    • Sandeep Chauhan's avatar
      Fixes noticed during user testing(part-1) (#3450) · e9b8ff66
      Sandeep Chauhan authored
      Refs: #3448 
      
      - [ ] PAF waiting for approval table shouldn't show if no project in any
      tab.
      - [ ] Show requested by as well in PAF Approvals(sidebar). Right now
      only Pending and Approved are showing.
      - [ ] Show activities on the Invoice page.
      - [ ] Remove converted status from Invoices.
      - [ ] Format price to US format(configurable via settings)
      - [ ] "Add Invoice' as next step even after invoice creation(remove next
      step after one invoice).
      - [ ] Add section id to comments and use those for scrolling(request
      change comments)
      Unverified
      e9b8ff66
    • Frank Duncan's avatar
      Add RateLimit to registrations (#3493) · 267be261
      Frank Duncan authored
      
      A vulnerability was introduced with #3064 where registrations could be
      created en masse using arbitrary email addresses. An attacker could use
      this to make hypha auto generate mass emails to those recipients. Adding
      a ratelimit to the registration should prevent that from being too
      aggressive.
      
      Co-authored-by: default avatarFrank Duncan <frank@kank.net>
      Unverified
      267be261
  9. Jul 20, 2023
  10. Jul 17, 2023
    • Saurabh Kumar's avatar
      Remove hx-boot from the primary nav (#3484) · d9e14001
      Saurabh Kumar authored
      This fixes the issue where the select2 widget doesn't initialized
      properly during the page load.
      
      The select2 internals are dependent on the window.onload and the is not
      easy way to switch to activate on htmx.onload event.
      
      Consequently, the hx-boost is removed from the primary navs so the
      select2 behaves as expected.
      Unverified
      d9e14001
  11. Jul 16, 2023
    • Saurabh Kumar's avatar
      Fix application form submit button remaining disabled (#3483) · 55cdb45e
      Saurabh Kumar authored
      If application form has a textarea and on submitting the form there is
      an Django validation error for that textarea. Then the current
      javascript
      crashes as it's to find an <input> in the form__error DOM element. Due
      to
      the javascript exception the mousemove handler is not registered and
      submit buttom remains disabled.
      
      This PR ensure
      1. The aria-invalid is applied to the invalid text area as well.
      2. The JS doesn't crash if the input in undefined.
      Unverified
      55cdb45e
  12. Jul 15, 2023
  13. Jul 13, 2023
  14. Jul 10, 2023
  15. Jul 04, 2023
  16. Jul 03, 2023
  17. Jun 29, 2023
  18. Jun 27, 2023
  19. Jun 25, 2023
    • James Vasile's avatar
      Read WAGTAILADMIN_BASE_URL from env (#3451) · 27ca6288
      James Vasile authored
      base.py does not read WAGTAILADMIN_BASE_URL from the environment. This
      patch addresses that.
      
      Currently, base.py sets WAGTAILADMIN_BASE_URL only if PRIMARY_HOST is
      set. The code is:
      
      ```
      WAGTAILADMIN_BASE_URL = env.str("WAGTAILADMIN_BASE_URL", None) or f'https://{PRIMARY_HOST}' if PRIMARY_HOST else None
      ```
      
      Python interprets that at as "if PRIMARY_HOST is set, then set to
      WAGTAILADMIN_BASE_URL, but if PRIMARY_HOST is not set, then set to
      None." It essentially implies parenthese as below:
      
      ```
      WAGTAILADMIN_BASE_URL = (env.str("WAGTAILADMIN_BASE_URL", None) or f'https://{PRIMARY_HOST}') if PRIMARY_HOST else None
      ```
      
      But what I think we actually want is "set it to WAGTAILADMIN_BASE_URL if
      that has been set in the env, then fallback to PRIMARY_HOST, then
      fallback to None. We can do that by putting explicit parens around the
      part following 'or':
      
      ```
      WAGTAILADMIN_BASE_URL = env.str("WAGTAILADMIN_BASE_URL", None) or (f'https://{PRIMARY_HOST}' if PRIMARY_HOST else None)
      ```
      
      This patch puts those explicit parens in.
      Unverified
      27ca6288
  20. Jun 23, 2023
  21. Jun 20, 2023
  22. Jun 15, 2023
  23. Jun 13, 2023
  24. Jun 12, 2023
Loading