Access to forms information from restricted access users

parent 4dd337f6
......@@ -81,7 +81,7 @@ return [
],
'admin' => [
'adminhome' => [
'label' => 'Αρχική σελίδα διαχειριστή',
'label' => 'Σελίδα διαχειριστή',
'route' => 'admin',
],
]
......
......@@ -22,16 +22,6 @@ return function (App $app) {
});
$events('on', 'app.services', function (Container $container) {
// $nav = $container['settings']->get('navigation');
// $nav['admin'] = [
// 'adminhome' => [
// 'label' => 'Διαχειριστής',
// 'route' => 'admin',
// 'icon' => 'user-secret',
// ],
// ];
// $container['settings']->set('navigation', $nav);
$container[GrEduLabs\Admin\Action\Index::class] = function ($c) {
return new GrEduLabs\Admin\Action\Index($c['view']);
};
......@@ -41,6 +31,6 @@ return function (App $app) {
$view = $c->get('view');
$view->getEnvironment()->getLoader()->prependPath(__DIR__ . '/templates');
$app->get('/admin', GrEduLabs\Admin\Action\Index::class)
->setName('admin');
->setName('admin');
});
};
......@@ -6,9 +6,24 @@
<div class="panel-heading">
<h4>Σελίδα διαχειριστή</h4>
</div>
<div class="panel-body">
<p>Διαθέσιμες διαχειριστικές λειτουργίες</p>
</div>
<table class="table table-striped">
<thead>
<tr>
<th>Διαθέσιμες διαχειριστικές λειτουργίες</th>
<th>&nbsp;</th>
<tr>
</thead>
<tbody>
<tr>
<td>Καταχωρημένες αιτήσεις εθελοντών - Εκπαιδευτικοί</td>
<td><a class="btn btn-primary btn-sm" href="{{ path_for('export.csv', {type: 'volunteer_teachers'}) }}"><i class="fa fa-download"></i> Αρχείο .csv</a></td>
</tr>
<tr>
<td>Καταχωρημένες αιτήσεις εθελοντών - Ιδρύματα</td>
<td><a class="btn btn-primary btn-sm" href="{{ path_for('export.csv', {type: 'volunteer_institutions'}) }}"><span class="fa fa-download"></span> Αρχείο .csv</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>
......
This diff is collapsed.
......@@ -8,66 +8,66 @@
}());
var proto = $.ui.autocomplete.prototype,
initSource = proto._initSource;
initSource = proto._initSource;
$("#select_school").autocomplete({
source: window.location.protocol + "//" + window.location.host + "/teacher-form/mm",
minLength: 4,
select: function(event, ui) {
select: function (event, ui) {
console.log(ui);
$("#mm_id").val(ui.item.mm_id);
$("#el-school").val(ui.item.value);
$("#el-schooltelef").val(ui.item.tel);
},
html: false,
open: function(event, ui) {
open: function (event, ui) {
$(".ui-autocomplete").css("z-index", 1000);
}
});
}(window.jQuery, _, window.EDULABS.utils));
$(document).ready(function() {
var max_fields = 10; //maximum input boxes allowed
var wrapper = $(".input_fields_wrap"); //Fields wrapper
var add_button = $(".add_field_button"); //Add button ID
$(document).ready(function () {
var max_fields = 10; //maximum input boxes allowed
var wrapper = $(".input_fields_wrap"); //Fields wrapper
var add_button = $(".add_field_button"); //Add button ID
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();
if(x < max_fields){ //max input box allowed
if (x < max_fields) { //max input box allowed
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();
$(this).parent('div').remove(); x--;
})
$("#submit").click(function(){
var projects = $("input[id='projects']")
.map(function(){return $(this).val();}).get();
$(this).parent('div').remove();
x--;
});
var urlproject = $("input[id='urlproject']")
.map(function(){return $(this).val();}).get();
$("#submit").click(function () {
var commentproject = $("input[id='commentproject']")
.map(function(){return $(this).val();}).get();
var projects = $("input[id='projects']")
.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);
});
});
......@@ -89,7 +89,5 @@ input[type=text] {
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.2.3/backbone-min.js"></script>
<script src="{{ base_url }}/js/jquery-ui.autoc.min.js"></script>
<script src="{{ base_url() }}/js/teacher_form/index.js"></script>
<script src="{{ base_url() }}/js/teacher_form/index-1.1.js"></script>
{% endblock %}
This diff is collapsed.
......@@ -101,7 +101,7 @@ input[type=text] {
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.2.3/backbone-min.js"></script>
<script src="{{ base_url() }}/js/jquery-3.1.1.min.js"></script>
<script src="{{ base_url() }}/js/university_form/index.js"></script>
<script src="{{ base_url() }}/js/university_form/index-1.1.js"></script>
<script type="text/javascript">
</script>
......
(function ($, _, utils) {
'use strict';
(function () {
var form = $('#app-form form');
var messages = form.data('messages');
utils.formMessages.render(form, messages);
}());
var proto = $.ui.autocomplete.prototype,
initSource = proto._initSource;
$("#select_school").autocomplete({
source: window.location.protocol + "//" + window.location.host + "/teacher-form/mm",
minLength: 4,
select: function (event, ui) {
console.log(ui);
$("#mm_id").val(ui.item.mm_id);
$("#el-school").val(ui.item.value);
$("#el-schooltelef").val(ui.item.tel);
},
html: false,
open: function (event, ui) {
$(".ui-autocomplete").css("z-index", 1000);
}
});
}(window.jQuery, _, window.EDULABS.utils));
$(document).ready(function () {
var max_fields = 10; //maximum input boxes allowed
var wrapper = $(".input_fields_wrap"); //Fields wrapper
var add_button = $(".add_field_button"); //Add button ID
var x = 1; //initlal text box count
$(add_button).click(function (e) { //on add input button click
e.preventDefault();
if (x < max_fields) { //max input box allowed
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).on("click", ".remove_field", function (e) { //user click on remove text
e.preventDefault();
$(this).parent('div').remove();
x--;
});
$("#submit").click(function () {
var projects = $("input[id='projects']")
.map(function () {
return $(this).val();
}).get().join("_@@@_");
var urlproject = $("input[id='urlproject']")
.map(function () {
return $(this).val();
}).get().join("_@@@_");
var commentproject = $("input[id='commentproject']")
.map(function () {
return $(this).val();
}).get().join("_@@@_");
var newfield = projects + "###@@@###" + urlproject + "###@@@###" + commentproject;
$('#projectdescription').val(newfield);
});
});
This diff is collapsed.
This diff is collapsed.
Markdown is supported
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