Commit 1fe5273a authored by Σταύρος Παπαδάκης's avatar Σταύρος Παπαδάκης

Merge branch 'volunteer-forms' into 'master'

Volunteer forms

See merge request !29
parents 7f10e8cc b7d1935e
...@@ -28,7 +28,8 @@ return [ ...@@ -28,7 +28,8 @@ return [
'module/open_data/bootstrap.php', 'module/open_data/bootstrap.php',
'module/university_form/bootstrap.php', 'module/university_form/bootstrap.php',
'module/teacher_form/bootstrap.php', 'module/teacher_form/bootstrap.php',
'module/enable_db_login/bootstrap.php',
'module/admin/bootstrap.php',
], ],
'cache_config' => 'data/cache/config/settings.php', 'cache_config' => 'data/cache/config/settings.php',
]; ];
...@@ -47,7 +47,9 @@ return [ ...@@ -47,7 +47,9 @@ return [
['/teacher-form', ['guest'], ['get', 'post']], ['/teacher-form', ['guest'], ['get', 'post']],
['/teacher-form/submit-success',['guest'], ['get','post']], ['/teacher-form/submit-success',['guest'], ['get','post']],
['/teacher-form/mm',['guest'], ['get']], ['/teacher-form/mm',['guest'], ['get']],
['/admin', ['admin'], ['get']],
['/admin/university-form/display', ['admin'], ['get']],
['/admin/teacher-form/display', ['admin'], ['get']],
], ],
], ],
], ],
......
<?php
/**
* gredu_labs
*
* @link https://github.com/eellak/gredu_labs for the canonical source repository
* @copyright Copyright (c) 2008-2015 Greek Free/Open Source Software Society (https://gfoss.ellak.gr/)
* @license GNU GPLv3 http://www.gnu.org/licenses/gpl-3.0-standalone.html
*/
return [
'enabledblogin' => [
'enable_routes' => [
'enabledblogin'
],
'enable_patterns' => [
'/enabledblogin'
],
'disable_routes' => [
'disabledblogin',
'user.logout'
],
'disable_patterns' => [
'/disabledblogin',
'/user/logout'
],
],
];
...@@ -79,5 +79,11 @@ return [ ...@@ -79,5 +79,11 @@ return [
], ],
], ],
'admin' => [
'adminhome' => [
'label' => 'Σελίδα διαχειριστή',
'route' => 'admin',
],
]
], ],
]; ];
# Υποσύστημα διαχειριστή
Παρέχει πρόσβαση σε διαχειριστικές λειτουργίες. Εφόσον ο χρήστης πιστοποιείται
με ρόλο admin εμφανίζεται το μενού διαχειριστικών λειτουργιών.
## Routes
Διαθέσιμα routes (paths) και λειτουργίες.
- admin (/admin): αρχική σελίδα διαχειριστή
## Οδηγίες
Για να είναι προσβάσιμο, πρέπει:
- να προσθέσετε την παρακάτω γραμμή στο `acl.global.php` ή `acl.local.php`,
στο acl.guards.routes
```
['/admin', ['admin'], ['get']],
```
<?php
use Slim\App;
use Slim\Container;
use Slim\Http\Request;
use Slim\Http\Response;
/**
* gredu_labs.
*
* @link https://github.com/eellak/gredu_labs for the canonical source repository
*
* @copyright Copyright (c) 2008-2015 Greek Free/Open Source Software Society (https://gfoss.ellak.gr/)
* @license GNU GPLv3 http://www.gnu.org/licenses/gpl-3.0-standalone.html
*/
return function (App $app) {
$container = $app->getContainer();
$events = $container['events'];
$events('on', 'app.autoload', function ($autoloader) {
$autoloader->addPsr4('GrEduLabs\\Admin\\', __DIR__ . '/src/');
});
$events('on', 'app.services', function (Container $container) {
$container[GrEduLabs\Admin\Action\Index::class] = function ($c) {
return new GrEduLabs\Admin\Action\Index($c['view']);
};
});
$events('on', 'app.bootstrap', function (App $app, Container $c) {
$view = $c->get('view');
$view->getEnvironment()->getLoader()->prependPath(__DIR__ . '/templates');
$app->get('/admin', GrEduLabs\Admin\Action\Index::class)
->setName('admin');
});
};
<?php
/**
* gredu_labs.
*
* @link https://github.com/eellak/gredu_labs for the canonical source repository
*
* @copyright Copyright (c) 2008-2015 Greek Free/Open Source Software Society (https://gfoss.ellak.gr/)
* @license GNU GPLv3 http://www.gnu.org/licenses/gpl-3.0-standalone.html
*/
namespace GrEduLabs\Admin\Action;
use Slim\Http\Request;
use Slim\Http\Response;
use Slim\Views\Twig;
class Index {
/**
* @var Twig
*/
protected $view;
/**
* Constructor.
*
* @param Twig $view
*/
public function __construct(Twig $view) {
$this->view = $view;
}
public function __invoke(Request $req, Response $res) {
return $this->view->render($res, 'admin/index.twig');
}
}
{% extends "layout.twig" %}
{% block content %}
<div id="adminarea">
<div class="panel panel-default">
<div class="panel-heading">
<h4>Σελίδα διαχειριστή</h4>
</div>
<table class="table table-striped">
<thead>
<tr>
<th>Διαθέσιμες διαχειριστικές λειτουργίες</th>
<th>&nbsp;</th>
<tr>
</thead>
<tbody>
<tr>
<td>Καταχωρημένες αιτήσεις εθελοντών - Εκπαιδευτικοί</td>
<td class="text-right">
<a class="btn btn-primary btn-sm" href="{{ path_for('export.csv', {type: 'volunteer_teachers'}) }}"><i class="fa fa-download"></i> Αρχείο .csv</a>
<a class="btn btn-default btn-sm" href="{{ path_for('admin.volunteer.teacher') }}"><span class="fa fa-list"></span> Προβολή</a>
</td>
</tr>
<tr>
<td>Καταχωρημένες αιτήσεις εθελοντών - Ιδρύματα</td>
<td class="text-right">
<a class="btn btn-primary btn-sm" href="{{ path_for('export.csv', {type: 'volunteer_institutions'}) }}"><span class="fa fa-download"></span> Αρχείο .csv</a>
<a class="btn btn-default btn-sm" href="{{ path_for('admin.volunteer.univ') }}"><span class="fa fa-list"></span> Προβολή</a>
</td>
</tr>
</tbody>
</table>
<div class="panel-footer text-center">
<a class="btn btn-sm btn-default" href="{{ path_for('index') }}"><span class="fa fa-home"></span> Αρχική</a>
<a class="btn btn-sm btn-primary" href="{{ path_for('admin') }}"><span class="fa fa-user-secret"></span> Διαχειριστής</a>
<a class="btn btn-sm btn-default" href="{{ path_for('user.logout') }}"><span class="fa fa-lock"></span> Αποσύνδεση</a>
</div>
</div>
</div>
{% endblock %}
{% macro li(page) %} {% macro li(page) %}
<li role="presentation" class="{% if page.active %}active {% endif %}{{ page.class|default('') }}"> <li role="presentation" class="{% if page.active %}active {% endif %}{{ page.class|default('') }}">
<a href="{{ page.href }}" {% if page.id %}id="{{ page.id }}"{% endif %} title="{{ page.label|striptags|e }}" <a href="{{ page.href }}" {% if page.id %}id="{{ page.id }}"{% endif %} title="{{ page.label|striptags|e }}"
{% if page.target %}target="{{ page.target }}"{% endif %}> {% if page.target %}target="{{ page.target }}"{% endif %}>
...@@ -24,14 +24,24 @@ ...@@ -24,14 +24,24 @@
</div> </div>
<div id="navbar" class="navbar-collapse collapse"> <div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
{% for page in nav('main') %} {% for page in nav('main') %}
{{ macros.li(page)}} {{ macros.li(page)}}
{% endfor %} {% endfor %}
{% if not nav('admin') is empty %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="fa fa-user-secret"></span> Διαχειριστής <span class="caret"></span></a>
<ul class="dropdown-menu">
{% for page in nav('admin') %}
{{ macros.li(page)}}
{% endfor %}
</ul>
</li>
{% endif %}
</ul> </ul>
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
{% for page in nav('authentication') %} {% for page in nav('authentication') %}
{{ macros.li(page)}} {{ macros.li(page)}}
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
</div> </div>
......
This diff is collapsed.
# Ενεργοποίηση σύνδεσης μέσω βάσης δεδομένων
Το συγκεκριμένο module ενεργοποιεί τη φόρμα σύνδεσης μέσω βάση δεδομένων
άσχετα από τη ρύθμιση Container['settings']['sso']['enable_database_login'].
Χρειάζεται να ενεργοποιηθεί μόνο στην περίπτωση που έχει ενεργοποιηθεί το
module sch_sso και απαιτείται σύνδεση τοπικού χρήστη για συγκεκριμένες
λειτουργίες.
## Ρυθμίσεις
Το αρχείο `enable_db_login.{global,local}.php χρησιμοποιείται για την
παραμετροποίηση. Οι προεπιλεγμένες ρυθμίσεις είναι οι παρακάτω.
```
'enabledblogin' => [
'enable_routes' => [
'enabledblogin'
],
'enable_patterns' => [
'/enabledblogin'
],
'disable_routes' => [
'disabledblogin',
'user.logout'
],
'disable_patterns' => [
'/disabledblogin',
'/user/logout'
],
],
```
Οι ρυθμίσεις έχουν ως εξής:
- enable_routes: ονόματα routes που ενεργοποιούν τη σύνδεση μέσω ΒΔ
- enable_patterns: url paths που ενεργοποιούν τη σύνδεση μέσω ΒΔ
- disable_routes: ονόματα routes που απενεργοποιούν τη σύνδεση μέσω ΒΔ
- disable_patterns: url paths που απενεργοποιούν τη σύνδεση μέσω ΒΔ
_Προτεραιότητα έχει η απενεργοποίηση._
##Routes
Το module δηλώνει δύο routes (στα αντίστοιχα paths) ώστε να παρέχεται ένα
παράδειγμα χρήσης.
- enabledblogin (/enabledblogin) που ενεργοποιεί τη σύνδεση μέσω ΒΔ
- disabledblogin (/disabledblogin) που απενεργοποιεί τη σύνδεση μέσω ΒΔ
*Δεν* είναι απαραίτητο να προστεθούν τα routes στο `acl.{global,local}.php`
(acl.guards.routes).
<?php
use Slim\App;
use Slim\Container;
use Slim\Http\Request;
use Slim\Http\Response;
/**
* gredu_labs.
*
* @link https://github.com/eellak/gredu_labs for the canonical source repository
*
* @copyright Copyright (c) 2008-2015 Greek Free/Open Source Software Society (https://gfoss.ellak.gr/)
* @license GNU GPLv3 http://www.gnu.org/licenses/gpl-3.0-standalone.html
*/
return function (App $app) {
$container = $app->getContainer();
$events = $container['events'];
$events('on', 'app.autoload', function ($autoloader) {
$autoloader->addPsr4('GrEduLabs\\EnableDBLogin\\', __DIR__ . '/src/');
});
$events('on', 'app.services', function (Container $container) {
$container[GrEduLabs\EnableDBLogin\Middleware\EnableDBLogin::class] = function ($c) {
return new GrEduLabs\EnableDBLogin\Middleware\EnableDBLogin($c);
};
$container[GrEduLabs\EnableDBLogin\Action\Index::class] = function ($c) {
return new GrEduLabs\EnableDBLogin\Action\Index($c);
};
});
$events('on', 'app.bootstrap', function (App $app, Container $c) {
$app->add(GrEduLabs\EnableDBLogin\Middleware\EnableDBLogin::class);
});
$events('on', 'app.bootstrap', function (App $app, Container $c) {
if (isset($_SESSION['enableDLogin'])) {
$c['router']->getNamedRoute('user.login')->add(function (Request $req, Response $res, callable $next) use ($c) {
$c['view']['enable_database_login'] = true;
return $next($req, $res);
});
}
}, -98); // must be in order to set last
$events('on', 'app.bootstrap', function (App $app, Container $c) {
$app->get('/enabledblogin', GrEduLabs\EnableDBLogin\Action\Index::class)
->setName('enabledblogin');
$app->get('/disabledblogin', GrEduLabs\EnableDBLogin\Action\Index::class)
->setName('disabledblogin');
});
};
<?php
/**
* gredu_labs.
*
* @link https://github.com/eellak/gredu_labs for the canonical source repository
*
* @copyright Copyright (c) 2008-2015 Greek Free/Open Source Software Society (https://gfoss.ellak.gr/)
* @license GNU GPLv3 http://www.gnu.org/licenses/gpl-3.0-standalone.html
*/
namespace GrEduLabs\EnableDBLogin\Action;
use Slim\Container;
use Slim\Http\Request;
use Slim\Http\Response;
class Index {
protected $_c;
/**
* Constructor.
*
* @param Twig $view
*/
public function __construct(Container $c) {
$this->_c = $c;
}
public function __invoke(Request $req, Response $res) {
return $res->withRedirect($this->_c['router']->pathFor('index'));
}
}
<?php
/**
* EnableDBLogin enables the database login form for specific routes or urls.
* To use set the enable_db_login.{global,local}.php
*
* @link https://github.com/eellak/gredu_labs for the canonical source repository
*
* @copyright Copyright (c) 2008-2015 Greek Free/Open Source Software Society (https://gfoss.ellak.gr/)
* @license GNU GPLv3 http://www.gnu.org/licenses/gpl-3.0-standalone.html
*/
namespace GrEduLabs\EnableDBLogin\Middleware;
use Slim\Container;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
class EnableDBLogin {
private $_c;
public function __construct(Container $c) {
$this->_c = $c;
}
public function __invoke(ServerRequestInterface $req, ResponseInterface $res, callable $next) {
$route = $req->getAttribute('route');
if ($route) {
$routeName = $route->getName();
$routePattern = $route->getPattern();
$dblogin_settings = $this->_c->get('settings')->get('enabledblogin');
if ($dblogin_settings) {
$enableRouteNames = isset($dblogin_settings['enable_routes']) ? $dblogin_settings['enable_routes'] : [];
$enableRoutePatterns = isset($dblogin_settings['enable_patterns']) ? $dblogin_settings['enable_patterns'] : [];
$disableRouteNames = isset($dblogin_settings['disable_routes']) ? $dblogin_settings['disable_routes'] : [];
$disableRoutePatterns = isset($dblogin_settings['disable_patterns']) ? $dblogin_settings['disable_patterns'] : [];
if (in_array($routeName, $enableRouteNames) ||
in_array($routePattern, $enableRoutePatterns)) {
$_SESSION['enableDLogin'] = true;
$this->_c['logger']->info("SET enableDLogin via route=[" . var_export($routeName, true) . '], path=[' . var_export($routePattern, true) . ']');
}
if (in_array($routeName, $disableRouteNames) ||
in_array($routePattern, $disableRoutePatterns)) {
unset($_SESSION['enableDLogin']);
$this->_c['logger']->info("UNSET enableDLogin via route=[" . var_export($routeName, true) . '], path=[' . var_export($routePattern, true) . ']');
}
}
}
return $next($req, $res);
}
}
...@@ -12,10 +12,9 @@ use Slim\Http\Response; ...@@ -12,10 +12,9 @@ use Slim\Http\Response;
* @copyright Copyright (c) 2008-2015 Greek Free/Open Source Software Society (https://gfoss.ellak.gr/) * @copyright Copyright (c) 2008-2015 Greek Free/Open Source Software Society (https://gfoss.ellak.gr/)
* @license GNU GPLv3 http://www.gnu.org/licenses/gpl-3.0-standalone.html * @license GNU GPLv3 http://www.gnu.org/licenses/gpl-3.0-standalone.html
*/ */
return function (App $app) { return function (App $app) {
$container = $app->getContainer(); $container = $app->getContainer();
$events = $container['events']; $events = $container['events'];
$events('on', 'app.autoload', function ($autoloader) { $events('on', 'app.autoload', function ($autoloader) {
$autoloader->addPsr4('GrEduLabs\\TeacherForm\\', __DIR__ . '/src/'); $autoloader->addPsr4('GrEduLabs\\TeacherForm\\', __DIR__ . '/src/');
...@@ -33,17 +32,22 @@ return function (App $app) { ...@@ -33,17 +32,22 @@ return function (App $app) {
$container[GrEduLabs\TeacherForm\Action\TeacherForm::class] = function ($c) { $container[GrEduLabs\TeacherForm\Action\TeacherForm::class] = function ($c) {
return new GrEduLabs\TeacherForm\Action\TeacherForm( return new GrEduLabs\TeacherForm\Action\TeacherForm(
$c->get('view'), $c->get('view'), $c->get(GrEduLabs\TeacherForm\Service\TeacherFormServiceInterface::class), $c->get(GrEduLabs\TeacherForm\InputFilter\TeacherForm::class), $c->get('router')->pathFor('teacher_form.submit_success'), $c);
$c->get(GrEduLabs\TeacherForm\Service\TeacherFormServiceInterface::class),
$c->get(GrEduLabs\TeacherForm\InputFilter\TeacherForm::class),
$c->get('router')->pathFor('teacher_form.submit_success'),
$c);
}; };
$container[GrEduLabs\TeacherForm\Action\SubmitSuccess::class] = function ($c) { $container[GrEduLabs\TeacherForm\Action\SubmitSuccess::class] = function ($c) {
return new GrEduLabs\TeacherForm\Action\SubmitSuccess( return new GrEduLabs\TeacherForm\Action\SubmitSuccess(
$c->get('view'), $c->get('view'), $c->get('router')->pathFor('teacher_form')
$c->get('router')->pathFor('teacher_form') );
};
$container[GrEduLabs\TeacherForm\Service\TeacherFormServiceInterface::class] = function ($c) {
return new GrEduLabs\TeacherForm\Service\TeacherFormService();
};
$container[GrEduLabs\TeacherForm\Action\Display::class] = function ($c) {
return new GrEduLabs\TeacherForm\Action\Display(
$c->get('view'), $c->get(GrEduLabs\TeacherForm\Service\TeacherFormServiceInterface::class)
); );
}; };
}); });
...@@ -64,12 +68,12 @@ return function (App $app) { ...@@ -64,12 +68,12 @@ return function (App $app) {
$school_name = $req->getQueryParam('term'); $school_name = $req->getQueryParam('term');
$httpClient = new GuzzleHttp\Client([ $httpClient = new GuzzleHttp\Client([
'base_uri' => $container['settings']['sch_mm']['public_api_url'] 'base_uri' => $container['settings']['sch_mm']['public_api_url']
]); ]);
$config = $httpClient->getConfig(); $config = $httpClient->getConfig();
$baseUri = $config['base_uri']; $baseUri = $config['base_uri'];
$url = $baseUri . "?name=" . $school_name; $url = $baseUri . "?name=" . $school_name;
$response = $httpClient->request('GET', $url); $response = $httpClient->request('GET', $url);
$responseData = json_decode($response->getBody()->getContents(), true); $responseData = json_decode($response->getBody()->getContents(), true);
...@@ -78,7 +82,7 @@ return function (App $app) { ...@@ -78,7 +82,7 @@ return function (App $app) {
} }
$cnt = count($responseData['data']); $cnt = count($responseData['data']);
$school_arr = []; $school_arr = [];
for ($i=0; $i<$cnt; $i++) { for ($i = 0; $i < $cnt; $i++) {
$school_arr[$i]['mm_id'] = $responseData['data'][$i]['mm_id']; $school_arr[$i]['mm_id'] = $responseData['data'][$i]['mm_id'];
$school_arr[$i]['value'] = $responseData['data'][$i]['name']; $school_arr[$i]['value'] = $responseData['data'][$i]['name'];
$school_arr[$i]['tel'] = $responseData['data'][$i]['phone_number']; $school_arr[$i]['tel'] = $responseData['data'][$i]['phone_number'];
...@@ -86,5 +90,8 @@ return function (App $app) { ...@@ -86,5 +90,8 @@ return function (App $app) {
return $res->withJson($school_arr); return $res->withJson($school_arr);
})->setName('teacher_form.mm'); })->setName('teacher_form.mm');
$app->get('/admin/teacher-form/display', GrEduLabs\TeacherForm\Action\Display::class)
->setName('admin.volunteer.teacher');
}); });
}; };
ALTER TABLE `volunteerteachers` MODIFY `eidikothta` int(11) UNSIGNED;
ALTER TABLE `volunteerteachers` ADD CONSTRAINT `fk_branch_id` FOREIGN KEY (`eidikothta`) REFERENCES `branch`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
...@@ -8,66 +8,66 @@ ...@@ -8,66 +8,66 @@
}()); }());
var proto = $.ui.autocomplete.prototype, var proto = $.ui.autocomplete.prototype,
initSource = proto._initSource; initSource = proto._initSource;
$("#select_school").autocomplete({ $("#select_school").autocomplete({
source: window.location.protocol + "//" + window.location.host + "/teacher-form/mm", source: window.location.protocol + "//" + window.location.host + "/teacher-form/mm",
minLength: 4, minLength: 4,
select: function(event, ui) { select: function (event, ui) {
console.log(ui); console.log(ui);
$("#mm_id").val(ui.item.mm_id); $("#mm_id").val(ui.item.mm_id);
$("#el-school").val(ui.item.value); $("#el-school").val(ui.item.value);
$("#el-schooltelef").val(ui.item.tel); $("#el-schooltelef").val(ui.item.tel);
}, },
html: false, html: false,
open: function (event, ui) {
open: function(event, ui) {
$(".ui-autocomplete").css("z-index", 1000); $(".ui-autocomplete").css("z-index", 1000);
} }
}); });
}(window.jQuery, _, window.EDULABS.utils)); }(window.jQuery, _, window.EDULABS.utils));
$(document).ready(function () {
var max_fields = 10; //maximum input boxes allowed
$(document).ready(function() { var wrapper = $(".input_fields_wrap"); //Fields wrapper
var max_fields = 10; //maximum input boxes allowed var add_button = $(".add_field_button"); //Add button ID
var wrapper = $(".input_fields_wrap"); //Fields wrapper
var add_button = $(".add_field_button"); //Add button ID
var x = 1; //initlal text box count var x = 1; //initlal text box count
$(add_button).click(function(e){ //on add input button click $(add_button).click(function (e) { //on add input button click
e.preventDefault(); e.preventDefault();
if(x < max_fields){ //max input box allowed if (x < max_fields) { //max input box allowed
x++; //text box increment x++; //text box increment
$(wrapper).append('<div><div><label for="projects">Σχετική δράση που συμμετείχατε </label><input type="text" name="projects" id="projects"></div> <div><label for="urlproject">URL δράσης που συμμετείχατε</label><input type="text" name="urlproject" id="urlproject"></div> <div><label for "commentproject">Περιγραφή δράσης που συμμετείχατε</label><input type="text" name="commentsproject" id="commentproject"></div><a href="#" class="remove_field">Διαγραφή</a></div>'); $(wrapper).append('<div><div><label for="projects">Σχετική δράση που συμμετείχατε </label><input type="text" name="projects" id="projects"></div> <div><label for="urlproject">URL δράσης που συμμετείχατε</label><input type="text" name="urlproject" id="urlproject"></div> <div><label for "commentproject">Περιγραφή δράσης που συμμετείχατε</label><input type="text" name="commentsproject" id="commentproject"></div><a href="#" class="remove_field">Διαγραφή</a></div>');
} }
}); });
$(wrapper).on("click",".remove_field", function(e){ //user click on remove text $(wrapper).on("click", ".remove_field", function (e) { //user click on remove text
e.preventDefault(); e.preventDefault();
$(this).parent('div').remove(); x--; $(this).parent('div').remove();
}) x--;
});
$("#submit").click(function(){
var projects = $("input[id='projects']")
.map(function(){return $(this).val();}).get();
var urlproject = $("input[id='urlproject']") $("#submit").click(function () {
.map(function(){return $(this).val();}).get();
var commentproject = $("input[id='commentproject']") var projects = $("input[id='projects']")
.map(function(){return $(this).val();}).get(); .map(function () {
return $(this).val();
}).get().join("_@@@_");
var newfield = projects+"#"+urlproject+"#"+commentproject; var urlproject = $("input[id='urlproject']")
.map(function () {
return $(this).val();
}).get().join("_@@@_");
$('#projectdescription').val(newfield); var commentproject = $("input[id='commentproject']")
.map(function () {
return $(this).val();
}).get().join("_@@@_");
}) var newfield = projects + "###@@@###" + urlproject + "###@@@###" + commentproject;
$('#projectdescription').val(newfield);
});
}); });
<?php
/**
* gredu_labs.
*
* @link https://github.com/eellak/gredu_labs for the canonical source repository
*
* @copyright Copyright (c) 2008-2015 Greek Free/Open Source Software Society (https://gfoss.ellak.gr/)
* @license GNU GPLv3 http://www.gnu.org/licenses/gpl-3.0-standalone.html
*/
namespace GrEduLabs\TeacherForm\Action;
use GrEduLabs\TeacherForm\Service\TeacherFormServiceInterface;
use Slim\Http\Request;
use Slim\Http\Response;
use Slim\Views\Twig;
class Display
{