Change single setting in FEU
Posted: Tue Aug 04, 2020 1:37 am
Hi, I'm trying to use FEU to keep records of employees. e.g. working at height ticket expiry dates, first aid expiry date, etc.
most of this is entered/update via back end.
Now, some settings I want to change via front-end "change settings", e.g. "I have read this document and agree to it."
my page template and the actual changesettings template is very close to the default, except this little addition at the beginning of the foreach loop:
this works fine. except, i get redirected to the default "change settings" page, where ALL settings, including username and password are displayed and changeable.
But: I do NOT want my users to change passwords or settings that I do not allow them to change. How can I prevent that redirect? i tried the code from the help section:
most of this is entered/update via back end.
Now, some settings I want to change via front-end "change settings", e.g. "I have read this document and agree to it."
my page template
Code: Select all
{if feu_smarty::is_user_memberof('Staff')}<p>Blah Blah, or link to document ...</p>{/if}
{FrontEndUsers action="changesettings" changesettingstemplate='feu_change_single_field.tpl' my_field='agree_with_doc_1'}
Code: Select all
{if $field->name != $actionparams['my_field']}<input type="hidden" name="{$field->input_name}" value="{$field->value}"/>{continue}{/if}
But: I do NOT want my users to change passwords or settings that I do not allow them to change. How can I prevent that redirect? i tried the code from the help section:
inside my custom template, but it does not work.{if !empty($final_message)}
{cms_selflink href='members' assign='members_page_url'}
{redirect_url to=$members_page_url}
{else}