Search code examples
bcbusiness-catalyst

Business Catalyst "Edit" template of Web App, possible for user to change Item from "Enabled" to "Disabled"?


Just wondering if it is possible now for a user to Edit a Web App item and changed it from Enabled to Disable?

I'd like for users to be able to Delete their own web app items, but deleting would mean it would disappear from the Admin area, so is it possible for them to "Disable" a web app item?


Solution

  • Short answer is no, the user cannot specify if a web app is enabled or disabled. However, there are a couple ways that may work that essentially disable the web app, without actually disabling the web app (if that makes sense).

    1) Create a custom field that is a true/false field. When a person deletes a web app it actually updates the web app to check this field. You then use liquid to display web apps. If the field is checked, then it isn't displayed, otherwise it is.

    2) Set the expiry date to the date they click delete. I haven't tested this method but it may work.

    First, in the web app settings is a field called Specify item expiry date. Check this box, then re-insert the edit form.

    When you insert the form you will see this field <input name="Days" id="Days" style="display:none;width:25;" value="" type="text"> (along with a few others). This field should be hidden in the edit form, keep it hidden.

    When a person clicks delete, to delete the web app you use javascript and do a things: to set the value of Days to 0 then submit the web app edit form.

    The system should (this is the part I haven't tested but should work) set the Expiry Date for the web app item to today's date. When this happen the web app will become Inactive which functions the same as disabling the web app. (To make it active again, set the expiry date to a future date in the system.)