code issues with edit profile page

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

code issues with edit profile page

KhFanWriter9
hey I'm trying to have it to where the sig can be edited on either the 'edit sig' page, or the 'edit profile' page. I've got it to where it shows up with an current sig of an user, but when trying to edit it on the profile page it doesn't catch / go through for any changes that way. I know I must be missing some line of code in the below.



<override_macro name="edit_profile" requires="servlet">

    <img src="/images/people_sm.png" class="image16"/>

    <a href="http://evening-festivities-roleplay-and-writing.329287.n8.nabble.com/" title="Return to main / home page" style="color:#FFFFFF;font-size:28px;font-family:Arial Black;text-decoration:none;" >Home</a>

        <img src="/images/people_sm.png" class="image16"/>

    <a href="http://evening-festivities-roleplay-and-writing.329287.n8.nabble.com/Forum-Tours-f48.html" title="View tours of the fourm in evening festivities" style="color:#FFFFFF;font-size:28px;font-family:Arial Black;text-decoration:none;" >Fourm Tours</a>

    <img src="/images/people_sm.png" class="image16"/>

<a href="http://evening-festivities-roleplay-and-writing.329287.n8.nabble.com/template/NamlServlet.jtp?macro=user_profile" title="Return to main settings in evening festivities" style="color:#FFFFFF;font-size:28px;font-family:Arial Black;text-decoration:none;" >Main Settings</a>

    <n.user_page.>
        <n.if.not.visitor.is_registered>
            <then>
                <n.login.><t>You must login to view this page.</t></n.login.>
            </then>
        </n.if.not.visitor.is_registered>

          <n.if.both condition1="[n.not.visitor.is_site_admin/]" condition2="[n.not.page_user.equals.visitor/]">
            <then>
                <n.login.><t>You must login to view this page.</t></n.login.>
            </then>
            <else.if.page_user.has_signature>
                <then>
                    <n.html_format_field.set_value value="[n.page_user.signature.is_html_format/]" />
                    <n.signature_field.set_value value="[n.page_user.signature.as_editable/]" />
                </then>
            </else.if.page_user.has_signature>
        </n.if.both>

        <n.if.is_submitted_form>
            <then>
                <n.catch_exception. id="save-profile">
                    <n.edit_page_user.>
                        <n.set_name name="[n.user_name_field.value/]"/>
                        <n.set_password password1="[n.password_field.value/]" password2="[n.password2_field.value/]"/>
                        <n.set_signature signature="[n.signature_field.value/]" is_html="[n.html_format_field.value/]"/>
                        <n.save_user/>
                    </n.edit_page_user.>
                    <n.if.page_user.equals.visitor>
                        <then.profile_update_with_redirection_to.page_user.url/>
                        <else.redirect_to.page_user.url/>
                    </n.if.page_user.equals.visitor>
                </n.catch_exception.>
            </then>
            <else>
                <n.user_name_field.set_value value="[n.page_user.name/]" />
            </else>
        </n.if.is_submitted_form>

        <n.html>
            <head>
                <META NAME="robots" CONTENT="noindex,nofollow"/>
                <n.title.><t>Edit Profile</t></n.title.>
            </head>
            <body>
                <style>
                    div.field-title {margin-top:0}
                </style>
                <h1><t>Edit Profile</t></h1>

                                <h1><t>Edit Signature</t></h1>

                <n.show_edit_signature_error/>

                <div class="field-box light-border-color">
                    <div class="second-font field-title">Email</div>
                    <div class="weak-color">
                        <n.page_user.user_email/>
                        &#187; <a href="[n.page_user.change_email_path/]">Change Email</a>
                    </div>
                </div>

                <n.form.>

                    <n.html_format_field.checkbox />
                    <label for="[n.html_format_field.name/]"><t>Signature is in HTML format</t></label><br/>
                    <n.signature_field.textarea wrap="SOFT" tabindex="2" style="width:35em;height:7em;" />

                    <div class="field-box light-border-color" id="username-field">
                        <div class="second-font field-title">User Name</div>
                        <div class="weak-color">
                            Your user name must be unique in <n.root_node.subject/>
                        </div>
                        <div>
                            <n.user_name_field.input size="25" maxlength="25"/>
                        </div>
                    </div>

                    <div class="field-box light-border-color">
                        <div class="second-font field-title">Change Password</div>
                        <div class="weak-color">Nabble encrypts your password (<a href="[n.help.password/]">?</a>)</div>
                        <table style="margin:.4em 0" class="shaded-bg-color">
                            <tr valign="top">
                                <td class="form-label" style="padding-top:.6em">Password:&nbsp;</td>
                                <td><n.password_field.input type="password" size="25" maxlength="25"/></td>
                            </tr>
                            <tr>
                                <td class="form-label">Confirm Password:&nbsp;</td>
                                <td><n.password2_field.input type="password" size="25" maxlength="25"/></td>
                            </tr>
                      </table>
                </div>

                    <input type="submit" class="toolbar action-button" value="[t]Save Changes[/t]"/>
                    <t>or</t> <a href="[n.page_user.url/]"><t>Cancel</t></a>
                </n.form.>
            </body>
        </n.html>
    </n.user_page.>
</override_macro>

Reply | Threaded
Open this post in threaded view
|

Re: code issues with edit profile page

KhFanWriter9
hello ?

I've done all I can for this code. Looking for help to have it working correctly.
Reply | Threaded
Open this post in threaded view
|

Re: code issues with edit profile page

KhFanWriter9
In reply to this post by KhFanWriter9