Wagtail Forms: How to make preset from field so editor can't change anything? - forms

I'm trying to create a form which will always have the same form fields. I'm following the documentation but can't seem to find an answer.

The easiest way is through the Wagtail admin. First choose Lock from the popup menu at the bottom of the page you wish to lock. Then assign the user to a group for which you want to deny the ability to change the locked page. By default the Editors group does not allow changing the lock state of a page. If you can't use that group, then click Settings and then Groups and then choose the a different group that you have created for the user. Under the PAGE PERMISSIONS section add a new page permission and choose the page type that you want to deny the user the ability to change. Make sure Unlock is not chosen and save your page permission. If you set things up this way on your development machine, you'll just have to be sure to do the same thing in production.

I would in that case simple make a django model for it and not use wagtail forms. That way the user can't change it.

Related

Moodle: How I can disable course as like as units?

I'm working on moodle LMS. I wanna disble as like as units. I know courses have an option for show or hidden. But I wanna disable course. So user should be able see there are some course but there are disable (unavailable).
Can anybody help me please?
You should add the permission moodle/course:viewhiddencoursesto the logged in user role. That way they can see the hidden course. Additionally even if they do have permission to access all the courses it doesn't work on hidden courses so they stay disabled.

Reject Open Graph Action Review with explicitly shared

we have submitted for approval three actions (2 custom and 1 common, watch) on Facebook Open Graph, this is the text that we have write in the review instruction:
The action Add and Watch are published only if user has activated the automatic
sharing inside his profile settings. Those actions use explicitly sharing only
and if only if the corresponded switch is on.
In order to use Share action, user have to touch the rounded Facebook button
at the bottom of the episode page or the series page, then he can write a comment
and only by touching send the action is published. The control is inside user's
hands, and it is obvious that the sharing is explicit.
we have also insert this image along with other images, that show that a user have to enable explicitly the options to make a explicitly share:
and one action need that the user touch a sharing button to be shared.
But Facebook have reject all the action, and have answered this:
we doesn't know how make it, and we need that this actions are explicitly because the user ask it to us. Anyone can help?
It's the explicit option in your settings that's causing Facebook to reject your story. Explicit shares have to be explicitly shared by the user each time (hence the name), so by having an automatic explicit share option that shares the story without the user choosing to share it each time, you're breaking the rules. That's a really complicated sentence... Basically, the user has to choose to share a post every single time for it to be explicit. If it posts automatically without any interaction from the user, then it's implicit.
So your "share" instructions, with the user hitting a share button, is the correct usage. Add and Watch are not.

Different auth dialogs depending on user

I have created a new application and configured an "App on Facebook". The auth dialog looks different depending on the user trying to access the app.
The issue seems to be with different settings for the different users, but what is the cause?
I want every user to be presented with the first dialog.
Stackoverflow's login with Facebook is now showing the second type also. One issue I am seeing with this is that if you trigger a post to feed after getting the second dialog, the permissions are always set to "Me Only", no matter what is set in your app settings.
Facebook has a habit of testing out new changes across random users, so it may be that this is the explanation for some users seeing one dialog or the other.
In fact, half the people tested at my office received one dialog, and half the other.
This may be related: http://allfacebook.com/separate-screens-mobile-app-permission-requests_b115132

Is it possible to enforce initial configuration of a page app?

I'm attempting to develop my first Facebook app that is designed to allow clients of our website to sell tickets to their events from their Facebook page as well as from our website. So when the administrator of a Facebook page adds our app as a page tab, I need to be able to find out who they are so I can load the relevant event data. There also needs to be additional include/exclude configurations and various other options, which will affect the behaviour of the app.
So my question is how is this situation best handled? When playing around with a basic sandboxed app, I seem to be able to just add the app directly to a page; there is no prompt for configuration, and I can't see any way of defining custom properties.
Is the 'edit_url' property the only way to achieve this? If so, is there a way of automatically directing the page admin to this link upon initial use?
Decoding the signed request recieved in your page will give you more insight.
From this you can retrieve page admins' UID's.
You'll need to manage the rest on your side...
In order to get the user id the user will have to grant your application basic permissions.
I'm currently doing a somewhat similar app and, just like Lix said, I used the signed_request variable to detect the page where the tab is installed. Then, based on the page's ID, I retrieve the proper content.
To also give your users an admin page, add a Page Tab Edit URL in your app configuration where you can redirect your users to a custom panel where they can edit their app.

User-defined settings for Facebook page tab?

I am developing a Facebook iframe application that requires some configuration for each install, such as long/lat and some third-party API keys. I would rather not have to create a new app for each implementation.
Is there any way to allow the user (page owner) to define these settings? Ideally, I'd like to provide additional settings in the "Edit Settings" dialog on the apps admin page (currently the only setting is "Custom Tab Name").
Thanks!
It is possible, but there is no easy/standard way to do this. I would try the following:
Your backend would need to provide the storage for each tab's settings; these would associate a specific tab with a specific page.
In your application's tab iframe add a link that only shows if the user viewing the tab is the user who is associated with the tab. You can do this by looking for the page value in the signed_request and making sure that the user is an admin.
When the user clicks that link, pop up the dialog to let them feed in the custom settings and save that on the server after performing the relevant validation.
On subsequent loads of the tab, look up and use the saved settings appropriately on your server.
You'll need to do some handling for situations where the page settings haven't yet been created, but that SHOULD do what you want.