Project

General

Profile

« Previous | Next » 

Revision 08d4606b

Added by Thomas Noël over 12 years ago

[ezldap] hey, with r555 texts&emails have new keys (aq-something)

View differences:

extra/modules/ezldap_ui.ptl
108 108
        if user.form_data:
109 109
            get_publisher().substitutions.feed(get_request().user)
110 110
            data = get_publisher().substitutions.get_context_variables()
111
            TextsDirectory.get_html_text('profile-presentation', data)
111
            TextsDirectory.get_html_text('aq-profile-presentation', data)
112 112
        else:
113 113
            '<p>%s</p>' % _('Empty profile')
114 114

  
......
129 129
            new_email = form.get_widget('new_email').parse()
130 130
            self.change_email_submit(new_email)
131 131
            template.html_top(_('Change email'))
132
            TextsDirectory.get_html_text('change-email-token-sent') % { 'new_email': new_email }
132
            TextsDirectory.get_html_text('aq-change-email-token-sent') % { 'new_email': new_email }
133 133
        else:
134 134
            template.html_top(_('Change email'))
135
            TextsDirectory.get_html_text('change-email')
135
            TextsDirectory.get_html_text('aq-change-email')
136 136
            form.render()
137 137

  
138 138
    def change_email_submit(self, new_email):
......
150 150
        # add the token in the LDAP
151 151
        add_token(token, get_session().user, "change_email;%s" % new_email)
152 152
        # send mail
153
        emails.custom_ezt_email('change-email-request', data,
153
        emails.custom_ezt_email('aq-change-email-request', data,
154 154
                data['new_email'], fire_and_forget = True)
155 155

  
156 156
    def remove [html] (self):
......
165 165
        if form.is_submitted() and not form.has_errors():
166 166
            self.remove_email_submit()
167 167
            template.html_top(_('Removing Account'))
168
            TextsDirectory.get_html_text('remove-token-sent') % { 'email': user.email }
168
            TextsDirectory.get_html_text('aq-remove-token-sent') % { 'email': user.email }
169 169
        else:
170 170
            template.html_top(_('Removing Account'))
171
            TextsDirectory.get_html_text('remove-account')
171
            TextsDirectory.get_html_text('aq-remove-account')
172 172
            form.render()
173 173

  
174 174
    def remove_email_submit(self):
......
183 183
        # add the token in the LDAP
184 184
        add_token(token, get_session().user, "remove")
185 185
        # send mail
186
        emails.custom_ezt_email('remove-request', data,
186
        emails.custom_ezt_email('aq-remove-request', data,
187 187
                data['email'], fire_and_forget = True)
188 188

  
189 189
class EzTokenDirectory(Directory):
......
232 232
                    (ldap.MOD_DELETE, 'tokenExpiration', None)]
233 233
            ezldap.get_ldap_conn().modify_s(dn, mod_list)
234 234
            template.html_top(_('Email changed'))
235
            return TextsDirectory.get_html_text('new-email-confirmed') % { 'new_email': new_email }
235
            return TextsDirectory.get_html_text('aq-new-email-confirmed') % { 'new_email': new_email }
236 236
        elif action == 'change_password':
237 237
            email = result_data[0][1][ezldap.LDAP_EMAIL][0]
238 238
            new_password = make_password()

Also available in: Unified diff