From f93b6cf94bea157f3f0bf1891dace843655ced78 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sat, 9 Aug 2014 21:46:02 +0200 Subject: [PATCH] Made upload form use generic form field renderers --- src/Views/post/post-upload.phtml | 80 +++++++++++++------------------- 1 file changed, 32 insertions(+), 48 deletions(-) diff --git a/src/Views/post/post-upload.phtml b/src/Views/post/post-upload.phtml index 1d543873..3dbd3eaf 100644 --- a/src/Views/post/post-upload.phtml +++ b/src/Views/post/post-upload.phtml @@ -111,57 +111,41 @@ $this->assets->addScript('../lib/tagit/jquery.tagit.js'); -
- -
- - - - -
-
+ $context = new StdClass; + $context->label = 'Source'; + $context->name = 'source'; + $context->placeholder =' Where did you get this from? (optional)'; + $context->maxLength = Core::getConfig()->posts->maxSourceLength; + $this->renderExternal('input-text', $context); -
- -
- -
-
- -
- -
- -
-
- - uploads->allowAnonymousUploads): ?> -
- -
- - -
-
- + if (Core::getConfig()->uploads->allowAnonymousUploads) + { + $context = new StdClass; + $context->label = 'Anonymity'; + $context->optionNames = ['anonymous']; + $context->optionValuesDisabled = ['0']; + $context->optionValuesEnabled = ['1']; + $context->optionLabels = ['Don\'t show my name in this post']; + $context->optionStates = [false]; + $this->renderExternal('input-checkboxes', $context); + } + ?>