Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional Controls in Inline Question #276

Open
meister-d opened this issue Mar 10, 2016 · 0 comments
Open

Additional Controls in Inline Question #276

meister-d opened this issue Mar 10, 2016 · 0 comments

Comments

@meister-d
Copy link

Hi BForms Team
I would like to add some additional functionality to the standard inline Question used in many Examples of your Docs.

Is it possible to have additional Controls shown up in this Dialog?

My Use-Case is following:
On a Row I press the delete button (WasteBasket on the Row) and the Inline Question pops up. As the Delete operations can be targeted in a later point in time (eg user is active for the next two months and should be deleted later on) I would like to have an additional BForms Control shown up in the inline action, which can set the the DateTime (BsDateTime Picker)

[BsControl(BsControlType.DateTimePicker)]
public BsDateTime ExecutionDate { get; set; }

By clicking Ok, the selected DateTime is sent also to the Backend...

I saw, that in the Options theres also a property called "content" and that it's possible to set templates, but i couldnt figure out on how to put the DatePicker in it so that it is properly initialised and send the Date to the backend too..

bsInlineQuestion.prototype.options = {
        template: '<p>{{question}}</p>' +
                    '<hr />' +
                    '{{#buttons}}' +
                        '<button type="button" class="btn bs-popoverBtn {{cssClass}}"> {{text}} </button> ' +
                    '{{/buttons}}',
        contentTemplate: '{{{content}}}' +
                          '<hr />' +
                         '{{#buttons}}' +
                             '<button type="button" class="btn bs-popoverBtn {{cssClass}}"> {{text}} </button> ' +
                         '{{/buttons}}',
        jqueryContentTemplate: '<div>' +
                                '<span class="js-replaceme"></span>' +
                                  '<hr />' +
                                 '{{#buttons}}' +
                                     '<button type="button" class="btn bs-popoverBtn {{cssClass}}"> {{text}} </button> ' +
                                 '{{/buttons}}' +
                             '</div>',
        placement: 'left',
        placementArray: 'left,right,bottom,top',
        content: undefined,
        stretch: false,
        closeOnOuterClick: true
    };

Thanks in advance for your Answers

Regards Dumitru

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant