extends /layout

block pageSpecificScipts
  script(nonce=cspNonce src="/javascripts/reset-password.js")

block body
  section#fixed-top-section
    include /common/main-navigation
    +main-navigation(false)
  include /utilities/generic-main-panel-header
  - let c
  if (isTokenValid)
    - c = { h1: t('Ponastavi geslo'), description: t('Vnesite novo geslo. Ko ga potrdite, se boste v vaš uporabniški račun lahko spet prijavili z novim geslom.') }
  else
    - c = { h1: t('Obvestilo'), description: '' }

  +mainHeader(c)
  .content-hold-prerequisites.ps-3.pe-3
    #offset-main.container-fluid.mt-4.errc.px-0
      .p-squeeze-lg
        .rpm-corr
          if (isTokenValid)
            // h1.navigation-text-color.mt-3 Ponastavi Geslo
            form#reset-and-redirect.max-512px(
              action="/reset-password"
              method="POST"
            )
              input#token(type="hidden" value=token)
              input#reset-password.mb-3.form-control(
                type="password"
                placeholder=t('Geslo')
              )
              input#reset-password-repeat.mb-3.form-control(
                type="password"
                placeholder=t('Ponovi Geslo')
              )
              p#reset-password-error.error-text.mb-1
              .d-flex.justify-content-between
                a.btn.btn-secondary.h-40px(href="/") #{ t('Prekliči') }
                button#reset-password-btn.btn.btn-primary.h-40px(type="submit") #{ t('Potrdi') }
          else
            //h1.navigation-text-color.mt-3 Obvestilo
            p #{ t('Povezava ni (več) veljavna. Prosimo, da ponovno zahtevate ponastavitev gesla.') }

    include /utilities/modal-reset-password-success
  include /common/footer
