How do I link a Wagtail custom form to its output? - wagtail

When a custom form is created in Wagtail, I can see that it stores in the DB. What I'm not clear on is how to make it so that the admin UI contains the results in some manner. (A new link which lets you download a CSV would be fine, but I don't see how to do that)
How do I allow admin users the ability to see the results of the custom forms? Is this library the only way?

Once you create your first form page (i.e. a page of any page type that subclasses AbstractForm), a 'Forms' item will automatically appear in the left menu of the Wagtail admin. This provides a listing of all the form pages that exist on the site, allowing you to access the results of each one and download them as a CSV.

Related

How to change the Read Access to the users on custom Visualforce page in Salesforce

The question is about the custom visualforce page in Salesforce. The page is created for getting contacts, opportunity, loans all are at a single dynamic link on the account named "Manage portal Access" Which comes under "Customer Portal Access" Tab like details and related list under "Account" Tab.The page was created to Manage the customer account, contacts and opportunities relationship. The page contains Email, Role, Last Login and a Toggle button as "Enabled".When this toggle button is enabled, those users have access to this portal relationship. It has respective apex class also.
The task here is, the toggle button can be enabled/disabled by some users, this want to be changed here by providing Read only access and assign two permission sets for edit access on this portal enable/disable.
" As a user I want Read Only Access to the portal tab. I want to be able to view all information on the tan and click through any dynamic links, but not be able to toggle the portal enable or un-portal enable any contacts. All Salesforce users should have a minimum of read only access to the Customer Portal Access Tab. The two permission below currently and should continue to provide edit access to the customer portal access section.
Create Customer Portal User
Document Manage Portal Admin "
Whether there is any customization option like providing access to objects in Salesforce through (Layouts, Fields FLS, Validation Rule)?
Or
-This can be achieved only through code on Visual force page and it's respective apex class, if this is the case how can I do it, whether there is any certain command or method for providing access or through controller class?
The "normal" object permissions (Create/Read/Update/Delete) and field level security (Read/Update) can be referenced in Visualforce. Something like this might be enough for you:
<apex:commandButton disabled="{!$ObjectType.Contact.fields.Role__c.updateable}">
Check the DescribeFieldResult in Apex reference. There's also something mentioned in VF developer guide but it's bit hidden and not as detailed: https://developer.salesforce.com/docs/atlas.en-us.234.0.pages.meta/pages/pages_variables_global_objecttype.htm
If you need more control than just whether field is editable or not - maybe look into Custom Permissions. They're your own checkboxes you add to Profile/Permission Set and you can check them in pure VF too, no apex required.
So... you decide. If most of the page is supposed to be identical, "just" about the button being enabled/disabled (or maybe even not rendered at all) - it's best to put the condition in the button. If it sounds like you need 2 different layouts - having 2 big blocks of code and one or another rendered might be cleaner to maintain and test.
P.S. Remember that good tester can activate the button using browser's developer tools. You should make similar "is field accessible / is custom permission assigned" check in Apex that runs on button click.

How do I modify Drupal's Admin Screens?

I'm looking to edit Drupal's admin pages.
Some of the things I'm trying to achieve:
Remove is the the filter setting on the Content page/node/view. In other words, if I go to to the Content page and I filter by a certain type of node, then I leave that page, then come back, the filter setting is saved, I'd like it to reset each time I visit the Content page.
I would like to modify some of links associated with these pages, as an example on that Same Content page, the titles of the pages are linked to their 'front-end' views, I'd rather have them link to their 'edit' screens.
While I have been successful in modifying the front-end theme of Drupal, by editing the actual php files. I can't find the the same php files for the Admin theme. In our case we are using Seven (7.21). I've read something about views, and thought maybe the entire Admin theme is built as views, aka there no php files involved like the front-end theme has, but under the Views section I did not find any either. I'm still pretty new at this and coming from the Wordpress world, this is a Drupal is a lot different.
The logic for that section of the admin area is at (from the public root):
/modules/node
Specifically "node.admin.inc"
That being said, I don't recommend editing core scripts, as they will be overwritten when you update the core.
You could explore making your own module to supplement that page, or your own view or explore some pre-made modules, such as "Admin Views"
Find de view displayed and go to its configuration :
1 - Edit configuration view like suggested here : https://drupal.stackexchange.com/questions/44440/how-to-remember-exposed-filter-choices
2 - Rewrite output views to rewrite link : field https://www.drupal.org/node/1578524
Another option is to create and use your own dashboard/views to achive like you want http://definitivedrupal.org/suggestions/creating-custom-administrator-view-content
also you can see contrib module : https://www.drupal.org/project/admin_views
You don't have to use that default content overview page at all. Make your own instead:
Make a page view (you have to install views module if you already did not: https://www.drupal.org/project/views) and use table layout. Make sure that page paths starts with "admin" so it will use admin theme. Also pay attention about permissions, so only specific set of users (admins) can use it.
For that view you can freely select what columns you what to show. You can also allow ordering by any column and action if you click on some field.
Use exposed filters to add filtering form, again add any filters you need. You can even set the form to use AJAX, to do auto-submit when some filter field is changed, include reset button and more. Also for every exposed filed you can select (at fields settings) should it remember it's value or not.
At end, edit admin menu and add your new page to it so it will look and act as default one but will offer much more functionality. You can even totally remove default one from the admin menu.
Views module is very powerful, not only for front-end but also for back-end content handling.

Configuring a portlet has three different names

When i include a portlet in a page, i'm asked to customize the portlet.
Trying to do so, i have three options namely:
Edit Shared settings
Personalize &
Configure
What does each mean and How do they differ?
This is an old page but it still describes the differences correctly: http://publib.boulder.ibm.com/infocenter/wpdoc/v6r0/topic/com.ibm.wp.ent.doc/wps/adcfgplt.html
In short:
Configure: Changes made here affect all occurrences of the portlet on all pages for all users. The administration portlets allow you to create multiple copies of the same portlet with different administrator level configurations.
Edit Shared: Changes made here affect a particular instance of a portlet on a page and apply to all users who view that instance of the portlet on that page.
Personalize: Changes made here are associated with a single user and apply only to that particular user who views the portlet on the page. Only that user can make that update.

Data shows when page accessed from internally, but not on public site

I have been following the salesforce Recruiting App tutorial, and reached the section on creating a public site:
http://www.salesforce.com/us/developer/docs/fundamentals/Content/adg_composite_app_public_sites.htm
I have built a simple page to display open jobs as described here:
http://www.salesforce.com/us/developer/docs/fundamentals/Content/adg_composite_app_create_public_jobs_try_it_out.htm
This is displaying the open jobs correctly when I view it through our "internal" URL: https://c.ap1.visual.force.com/apex/PublicJobs
But when I view this same page through our "external" URL: http://servian-developer-edition.ap1.force.com/careers, the page still renders, except that now the list of jobs is empty.
I don't think this is a permissions error, as if so it would surely prompt me to log in. What do I need to do to make the data show on the "external" URL?
Make sure the "guest" user for the site has Read permission for the Positions object on its profile. You can't access the profile for the guest user through the normal Profile list page in Setup; instead, click on the Public Access Settings button from your site's detail page. On the profile, go all the way to the bottom of the page and make sure the Read permission is checked. If its still not working, ensure the Field Level Security settings also correct for that profile. The FLS settings are controlled about mid-way down on the same page.
In addition to above, ensure the object, if it is a custom object is in "Deployed" status. This fixed the issue for us.
Additional Information (from help.salesforce.com):
While developing a custom object or external object, you might not want users to see and interact with it. Because users might get frustrated with changes in layout or lose data when you delete custom fields, control visibility of the new object until you are finished.
Use the Deployment Status setting in the object definition to control when users can see and use the object and its associated custom tab, related lists, and reports.
Choose “In Development” as the Deployment Status when first creating your custom object or external object. Doing so hides it from users while you are designing and testing it. Only users with the “Customize Application” permission can see the object tab, search results, related lists, and report data types.
Change the Deployment Status to “Deployed” when you want to allow all users to use the object and any associated custom tab, related lists, and reports.
If you make more enhancements after deploying a custom object or external object, you can change the Deployment Status back to “In Development.”

How to auto generate a webpage after user submits form

I am looking for some initial direction on this one because I cannot seem to find my way with it. Let me explain...
I am developing a website wherein a logged in site member (Joomla 1.6) can fill out a simple form and attach a pdf to be uploaded upon submission. The user then clicks the submit button and the page will refresh to a new and unique web page.
User Submits data on http://www.examplesite.com and then after submission a new web page is generated that is called http://www.examplesite.com/userSubmittedValue
This newly generated web page would come from a template that is specified by the administrator and, most important, it will display all of the information that the user submitted. Also, there would be a link to download the pdf they uploaded. The user could then view a list of all the pages they have created in this manner via their profile.
I have seen this all over, but I am at a loss for how to generate this. Any help is much appreciated.
This is not something you will be able to easily do or get a detailed answer for here. If you just wanted to do the submission form with a thank you page that shows the data submitted you could use any number of form wizard type extensions - http://extensions.joomla.org/extensions/contacts-and-feedback/forms
If you just needed a way for users to upload PDfs and have access to them you could use one of the file management extensions that offer front end upload features - http://extensions.joomla.org/extensions/directory-a-documentation/downloads
If the additional data that is being submitted is simply data related to the file - title, description, etc then one of the file download components should work fine for you. The choices are limited in 1.6 at this time though so you might have to go with 1.5 to get the extension that works best for your needs.
So this probably isn't the best way to do it if your using Joomla but it just might help.
I would use PHP and inside of you're directory have a file like "template.html". Then I would create some php to handle the task of....
Opening "template.html"
Finding and replacing the values that the user passed you
Save the "template.html" under a new name (userSubmittedValue.html)
Again, I never really use Joomla. If you were to try this I'd suggest checking out php's file system functions (http://us2.php.net/manual/en/ref.filesystem.php).
Hope this helps a bit.

Resources