Serenity: How to change Save button location

Created on 3 Jul 2017  路  8Comments  路  Source: serenity-is/Serenity

Hi,
I am a newbie to Serenity, Please tell me how to change the Save Button from top of the griddialog to bottom of the griddialog.

thankx

Most helpful comment

change the following file
Views\Templates\EntityDialog.Template.html
with the following content.

<div class="s-DialogContent">

    <div class="s-Form">
        <form id="~_Form" action="">
            <div class="fieldset ui-widget ui-widget-content ui-corner-all">
                <div id="~_PropertyGrid"></div>
                <div class="clear"></div>
            </div>
        </form> 
    </div>

    <div id="~_Toolbar" class="s-DialogToolbar">
    </div>
</div>

All 8 comments

You can use css or jQuery to move items in the dialog. Search for .s-DialogToolbar class to get toolbar

Iam able to find out the .s-DialogToolbar class, not able to change the save button from top of the form to bottom of the form as every time i have to go to top to save the form as it is having around 25 fields in the form. Please help with a little bit of procedure to get it done.
Thank you

In your xyzDialog.ts constructor, some like this

    constructor() {
        super();

        var tb = this.element.find('.s-DialogToolbar');
        this.element.append(tb);
    }

change the following file
Views\Templates\EntityDialog.Template.html
with the following content.

<div class="s-DialogContent">

    <div class="s-Form">
        <form id="~_Form" action="">
            <div class="fieldset ui-widget ui-widget-content ui-corner-all">
                <div id="~_PropertyGrid"></div>
                <div class="clear"></div>
            </div>
        </form> 
    </div>

    <div id="~_Toolbar" class="s-DialogToolbar">
    </div>
</div>

Hi Estrusco,

constructor() {
super();

    var tb = this.element.find('.s-DialogToolbar');
    this.element.append(tb);
}

This Worked form me. But I want this for all the forms. Where should i implement this to get it on all the forms and the same to align right.
Thank you

The solution proposed by @dfaruque is useful to you.

Thank you @Estrusco and @dfaruque I Got the solution.

Thank you @Estrusco and @dfaruque I Got the solution.

Can you please tell how to keep both in top and bottom of the dialog

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GitHubOrim picture GitHubOrim  路  3Comments

ahsansolution picture ahsansolution  路  3Comments

john20xdoe picture john20xdoe  路  3Comments

newyearsoft picture newyearsoft  路  3Comments

Shraddha996 picture Shraddha996  路  3Comments