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

Edit Post Submittal Dialog #513

Open
gismcieri opened this issue Jul 20, 2016 · 6 comments
Open

Edit Post Submittal Dialog #513

gismcieri opened this issue Jul 20, 2016 · 6 comments

Comments

@gismcieri
Copy link

Hi,

I am working on slightly modifying the post submittal form and i made some changes by including some HTML tags in between some of the text variable quotes but i need to do a little more and was wondering if anyone could point me in the right direction on how to modify the form and where the javascript is to do this. I have tried using firebug and other tools but everything i change seems to have no affect.

image

Thanks,
Matt

@driskull
Copy link
Member

Its in the _openShareModal function which uses the shareDialog.js. the share dialog loads the HTML in views/modal.html

@gismcieri
Copy link
Author

I did find a file called shareModal.js and the modal.html and was able to make some tweaks to the header and footer but I still have been unable to truly edit the body.

capture

I was able to edit the header and footer in the modal.html file.

I was able to edit the area in the green by adding some html in the entrySubmitted: tag in resource.js.

What I really want to do is remove the mailing and the link and everything I have tried has had no affect. I even tried deleting the div for the body which causes the app to not submit.

Any thoughts?
Thanks,
Matt

@driskull
Copy link
Member

@gismcieri main.js has a function _createShareDlgContent which creates the mail link. Should be line 2543 or so.

@gismcieri
Copy link
Author

I found the section below and i found the enableSharing sharing variable to in default.js. The value is set to false. So I don't see why its still showing up.

   _openShareModal: function () {
      // destroy modal if it exists
      if (this._ShareModal) {
        this._ShareModal.destroy();
      }
      // create modal content
      this._createShareDlgContent();
      // create modal
      this._ShareModal = new ShareModal({
        bitlyLogin: this.config.bitlyLogin,
        bitlyKey: this.config.bitlyKey,
        image: this.config.sharinghost + '/sharing/rest/content/items/' + this.config.itemInfo.item.id + '/info/' + this.config.itemInfo.item.thumbnail,
        title: this.config.details.Title || nls.user.geoformTitleText || '',
        summary: this.config.itemInfo.item.snippet || '',
        hashtags: 'esriGeoForm',
        shareOption: this.config.enableSharing
      });
      this._ShareModal.startup();
      // show modal
      $("#myModal").modal('show');
      domAttr.set(dom.byId("viewSubmissionsOption"), "href", this._viewSubmissions());
    }

I also tried commenting out certain parts and then the form fails to submit.

Thanks again for your time.
Matt

@driskull
Copy link
Member

The enableSharing just removes the social buttons but not the email and link. If you want those removed, you'll have to edit the ShareModal.js file which creates those nodes.

Its in the function here: https://github.com/Esri/geoform-template-js/blob/master/js/main.js#L2502

@driskull
Copy link
Member

driskull commented Sep 9, 2016

We'll add this option when we make the 4x JSAPI version of this app.

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

No branches or pull requests

2 participants