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

:ambulance: fix(public-forms) Some tests using new core functions

issue #5838
parent f3db32db
No related merge requests found
Showing with 10 additions and 4 deletions
+10 -4
...@@ -22,6 +22,4 @@ require_once('../include/php_setup.inc'); ...@@ -22,6 +22,4 @@ require_once('../include/php_setup.inc');
require_once('functions.inc'); require_once('functions.inc');
require_once('variables.inc'); require_once('variables.inc');
$publicPage = new publicFormPage(); publicFormPage::run();
$publicPage->execute();
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
</div> </div>
</div> </div>
{/if} {/if}
<input type="hidden" name="CSRFtoken" value="{$CSRFtoken}"/>
</form> </form>
</div> </div>
</div> </div>
......
...@@ -64,6 +64,12 @@ class publicFormPage extends standAlonePage ...@@ -64,6 +64,12 @@ class publicFormPage extends standAlonePage
} }
$this->form = reset($forms); $this->form = reset($forms);
$this->template = new template($this->form['fdPublicFormTemplateType'], $this->form['fdPublicFormTemplateDN']); $this->template = new template($this->form['fdPublicFormTemplateType'], $this->form['fdPublicFormTemplateDN']);
/* TODO this is only for POC */
  • :information_source: Complete the task associated to this "TODO" comment. :blue_book:

Please register or sign in to reply
$this->template->alterAttributes(
['user' => ['telephoneNumber']],
['user' => ['mobile']],
['user' => ['base']]
);
} elseif (!isset($this->form)) { } elseif (!isset($this->form)) {
throw new FusionDirectoryException('No form name given'); throw new FusionDirectoryException('No form name given');
} }
...@@ -98,7 +104,8 @@ class publicFormPage extends standAlonePage ...@@ -98,7 +104,8 @@ class publicFormPage extends standAlonePage
$templateOutput = $this->template->execute(); $templateOutput = $this->template->execute();
if ($this->template->dialogOpened()) { if ($this->template->dialogOpened()) {
//~ TODO //~ TODO
return $templateOutput; $smarty->assign('template_dialog', $templateOutput);
//~ return $templateOutput;
  • :warning: Remove this commented out code. :blue_book:

Please register or sign in to reply
} else { } else {
$smarty->assign('template_dialog', $templateOutput); $smarty->assign('template_dialog', $templateOutput);
} }
......
  • SonarQube analysis reported 4 issues

    • :warning: 2 major
    • :information_source: 2 info

    Watch the comments in this conversation to review them.

    2 extra issues

    Note: The following issues were found on lines that were not modified in the commit. Because these issues can't be reported as line comments, they are summarized here:

    1. :warning: Remove this conditional structure or edit its code blocks so that they're not all the same. :blue_book:
    2. :information_source: Complete the task associated to this "TODO" comment. :blue_book:
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