Verified Commit e697544f authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:sparkles: feat(public-form) Show a link to the public form on its edit screen

issue #6021
Showing with 9 additions and 0 deletions
+9 -0
......@@ -95,6 +95,10 @@ class publicForm extends simplePlugin
'fdPublicFormCaptcha', FALSE,
FALSE
),
new DisplayAttribute(
_('Link'), _('Link to the public form as currently saved in the LDAP'),
'publicLink', FALSE
),
]
],
];
......@@ -124,6 +128,11 @@ class publicForm extends simplePlugin
$this->attributesAccess['fdPublicFormCaptcha']->setValue(FALSE);
$this->attributesAccess['fdPublicFormCaptcha']->setVisible(FALSE);
}
$this->attributesAccess['publicLink']->setAllowHTML(TRUE);
if ($this->cn != '') {
$this->publicLink = sprintf('<a href="%1$s">%1$s</a>', URL::buildAbsoluteUrl('/publicform.php?form='.$this->cn));
}
}
function typeChanged ()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment