Ignore:
Timestamp:
9 Jul 2021, 07:48:39 (3 years ago)
Author:
Henrik Bettermann
Message:

Prefill login form after applicant registration.

Location:
main/waeup.kofa/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/CHANGES.txt

    r16529 r16538  
    441.7.2.dev0 (unreleased)
    55=======================
     6
     7* Prefill login form after applicant registration.
    68
    79* Show local roles on faculty, department, course and certificate pages
  • main/waeup.kofa/trunk/layout/theme.html

    r16459 r16538  
    228228              </p>
    229229              <p>
    230                 Donec id elit non mi porta gravida at eget metus. Fusce
     230                Donec Id I1234567 non mi porta gravida at eget metus. Fusce
    231231                dapibus, tellus ac cursus commodo, tortor mauris
    232232                condimentum nibh, ut fermentum massa justo sit amet
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py

    r16500 r16538  
    15611561        IUserAccount(applicant).setPassword(password)
    15621562        # Send email with credentials
    1563         login_url = self.url(grok.getSite(), 'login')
     1563        args = {'login':applicant.applicant_id, 'password':password}
     1564        login_url = self.url(grok.getSite(), 'login?%s' % urlencode(args))
    15641565        url_info = u'Login: %s' % login_url
    15651566        msg = _('You have successfully been registered for the')
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py

    r16532 r16538  
    354354        return getattr(student, 'suspended_comment', None)
    355355
    356     def update(self, SUBMIT=None, camefrom=None):
     356    def update(self, SUBMIT=None, camefrom=None, login=None, password=None):
    357357        blocker = grok.getSite()['configuration'].maintmode_enabled_by
    358358        if blocker:
     
    361361                       type='warning')
    362362        self.camefrom = camefrom
     363        # Prefill form with URL params
     364        self.login_default = login
     365        self.password_default = password
    363366        if SUBMIT is not None:
    364367            if self.request.principal.id != 'zope.anybody':
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/loginpage.pt

    r16293 r16538  
    44    <label i18n:translate="" class="col-sm-2 control-label">User Name or Id</label>
    55    <div class="col-sm-10">
    6       <input name="form.login" type="text" class="form-control" id="login">
     6      <input name="form.login" tal:attributes="value view/login_default" type="text" class="form-control" id="login">
    77    </div>
    88  </div>
     
    1010    <label i18n:translate="" class="col-sm-2 control-label">Password</label>
    1111    <div class="col-sm-10">
    12       <input name="form.password" type="password" class="form-control" id="password">
     12      <input name="form.password" type="password" tal:attributes="value view/password_default" class="form-control" id="password">
    1313      <font  i18n:translate="" color="red"> Notice: User names, Ids and passwords are case sensitive.</font>
    1414    </div>
Note: See TracChangeset for help on using the changeset viewer.