I am working on Web AppBuilder Custom Widgets that when a user clicks on an edit template the toolbar will minimize. I need this because I am trying to edit on a mobile device and the toolbar take up too much of the screen.

Thanks!
Solved! Go to Solution.
Rickey,
Add this to the Edit widgets _worksAfterCreate function.
Tested in foldable theme.
        on(this.editor.templatePicker, 'selection-change', lang.hitch(this, function() {
          var selected = this.editor.templatePicker.getSelected();
          if(selected){
            var panel = this.getPanel();
            panel.foldableNode.click();
          }
        }));Rickey,
Add this to the Edit widgets _worksAfterCreate function.
Tested in foldable theme.
        on(this.editor.templatePicker, 'selection-change', lang.hitch(this, function() {
          var selected = this.editor.templatePicker.getSelected();
          if(selected){
            var panel = this.getPanel();
            panel.foldableNode.click();
          }
        }));That is what I needed! Thank you!
Robert Scheitlin, GISP Is there a way to open the edit tool back up after the user closes the edit popup?
take out the if selected condition.
The template gets deselected when I click on the map not when Close is clicked.
Rickey,
This should cover that then: (lines 12-15)
      _addButtonToInspector: function() {
        var closeButton = new Button({
          "label": this.nls.close,
          "class": " atiButton close-button"
        }, html.create("div"));
        html.place(closeButton.domNode,
                   this.editor.attributeInspector.deleteBtn.domNode,
                   "before");
        this.own(on(closeButton, 'click', lang.hitch(this, function() {
          this.editPopup.hide();
          setTimeout(lang.hitch(this, function(){
            var panel = this.getPanel();
            panel.foldableNode.click();
          }),1200);
        })));
...Robert Scheitlin, GISP As always thank you! This did the trick.
Is there a way that a password required to use the edit widget can be added?
I guess it could be done. But restricting access to editing is better handled by adding the edit widget to a certain app that is only shared with certain AGOL logins.
