43
C0D4
5y

Some days I just want to shoot myself.

I get why... someone might do this, but sweet mother of god!

Comments
  • 2
    I'm so sorry
  • 2
    "Metaprogramming"
  • 1
    This is pure gold
  • 2
    You should shoot the guy who wrote this instead.

    But find out what his thought process was before doing it.
  • 2
    @trickory the disabled fields I get, except there's no backend checks on the form... 🤷‍♂️well there wasn't anyway.

    But the iteration over fields from php side instead of just dropping (at worse) into an array in JS. Beats me.

    Plus I have a strong hate for alt php syntax, and this project is riddled with it for some reason.

    I would go visit this dev, but it could have been 1 of 4 devs who had this project before me and no longer work for the company.
  • 1
    When you can’t ajax
  • 0
    I couldn't read the code because of the color scheme.
    My eyes are burning rn.
  • 1
    @orhun what color scheme you prefer?
  • 0
    @C0D4 VSdark, darcula
    Default dark color schemes most of the time.
  • 2
  • 1
    @C0D4 Thanks. Now I can see but...
    Wtf is that?!
  • 1
    @orhun it adds the disabled attribute to form elements derived from an array in PHP and prevents a user from using them if they aren't an admin user -> unless you remove the disabled attribute in console, but who does that?

    Although, unless you find that php array, you'll have no idea which fields are being disabled by it as it's as dynamic as you could probably make it.
  • 1
  • 0
    Full stack right there
  • 0
    Full stack right there
  • 1
    I need "Unsee" button
  • 1
    Just... why? Really, why?
Add Comment