...
 
Commits (21)
......@@ -97,21 +97,43 @@ class AitisiEntity extends RevisionableContentEntityBase implements AitisiEntity
}
public function getStudent_id() {
public function getSchool() {
return $this->get('iek_id')->entity;
}
public function getSchoolId() {
return $this->get('iek_id')->value;
}
public function setSchoolId($studentId) {
$this->set('iek_id', $studentId);
return $this;
}
public function getStudent() {
return $this->get('student_id')->entity;
}
public function getStudentId() {
return $this->get('student_id')->value;
}
public function setStudent_id($student_id) {
public function setStudentId($student_id) {
$this->set('student_id', $student_id);
return $this;
}
public function getEidikotita() {
return $this->get('eidikotita_id')->entity;
}
public function getEidikotita_id() {
public function getEidikotitaId() {
return $this->get('eidikotita_id')->value;
}
public function setEidikotita_id($eidikotita_id) {
public function setEidikotitaId($eidikotita_id) {
$this->set('eidikotita_id', $eidikotita_id);
return $this;
}
......@@ -143,16 +165,65 @@ class AitisiEntity extends RevisionableContentEntityBase implements AitisiEntity
return $this;
}
public function getRegion_id() {
public function getRegion() {
return $this->get('region_id')->entity;
}
public function getRegionId() {
return $this->get('region_id')->value;
}
public function setRegion_id($region_id) {
public function setRegionId($region_id) {
$this->set('region_id', $region_id);
return $this;
}
/**
* {@inheritdoc}
*/
public function getState() {
return $this->get('state')->value;
}
/**
* {@inheritdoc}
*/
public function setState($state) {
$this->set('state', $state);
return $this;
}
/**
* {@inheritdoc}
*/
public function getFlagiek() {
return $this->get('flagiek')->value;
}
/**
* {@inheritdoc}
*/
public function setFlagiek($flagiek) {
$this->set('flagiek', $flagiek);
return $this;
}
/**
* {@inheritdoc}
*/
public function getFlagbank() {
return $this->get('flagbank')->value;
}
/**
* {@inheritdoc}
*/
public function setFlagbank($flagbank) {
$this->set('flagbank', $flagbank);
return $this;
}
/**
......@@ -427,7 +498,54 @@ class AitisiEntity extends RevisionableContentEntityBase implements AitisiEntity
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['state'] = BaseFieldDefinition::create('list_string')
->setLabel(t('Κατάσταση Αίτησης'))
->setDescription(t('Κατάσταση Αίτησης'))
->setRequired(TRUE)
->setSettings(array(
'max_length' => 16,
'default_value' => 'Draft',
'allowed_values' => array(
'Draft' => 'Draft',
'Pending' => 'Pending',
'Ready' => 'Ready',
),
))
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'string',
'weight' => -4,
))
->setDisplayOptions('form', array(
'type' => 'options_select',
'weight' => -17,
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['flagiek'] = BaseFieldDefinition::create('boolean')
->setLabel(t('Έλεγχος υπεύθυνου ΙΕΚ'))
->setDefaultValue(FALSE)
->setDisplayOptions('form', array(
'type' => 'boolean_checkbox',
'settings' => array(
'display_label' => TRUE,
),
'weight' => -18,
))
->setDisplayConfigurable('form', TRUE);
$fields['flagbank'] = BaseFieldDefinition::create('boolean')
->setLabel(t('Έλεγχος υπεύθυνου τράπεζας'))
->setDefaultValue(FALSE)
->setDisplayOptions('form', array(
'type' => 'boolean_checkbox',
'settings' => array(
'display_label' => TRUE,
),
'weight' => -18,
))
->setDisplayConfigurable('form', TRUE);
$fields['status'] = BaseFieldDefinition::create('boolean')
......
......@@ -19,11 +19,18 @@ interface AitisiEntityInterface extends RevisionableInterface, RevisionLogInterf
// Add get/set methods for your configuration properties here.
public function getStudent_id();
public function setStudent_id($student_id);
public function getSchool();
public function getSchoolId();
public function setSchoolId($studentId);
public function getStudent();
public function getStudentId();
public function setStudentId($student_id);
public function getEidikotita();
public function getEidikotitaId();
public function setEidikotitaId($eidikotita_id);
public function getEidikotita_id();
public function setEidikotita_id($eidikotita_id);
public function getPrabek();
public function setPrabek($prabek);
......@@ -34,8 +41,9 @@ interface AitisiEntityInterface extends RevisionableInterface, RevisionLogInterf
public function getRegno();
public function setRegno($regno);
public function getRegion_id();
public function setRegion_id($region_id);
public function getRegion();
public function getRegionId();
public function setRegionId($region_id);
/**
* Gets the Aitisi entity creation timestamp.
......
......@@ -87,7 +87,7 @@ class SchoolEntity extends ContentEntityBase implements SchoolEntityInterface {
* {@inheritdoc}
*/
public function getIekcode() {
return $this->get('iek_code')->value;
return $this->get('iekcode')->value;
}
/**
......
{
"name": "drupal/iek",
"type": "drupal-module",
"description": "IEK Registration",
"keywords": ["Drupal"],
"license": "GPL-2.0+",
"homepage": "https://www.drupal.org/project/iek",
"minimum-stability": "dev",
"support": {
"issues": "https://www.drupal.org/project/issues/iek",
"source": "http://cgit.drupalcode.org/iek"
},
"require": { }
}
name: iek
type: module
description: IEK user table
core: 8.x
package: IEK
dependencies:
entity.iek_users.add_form:
route_name: entity.iek_users.add_form
title: 'Add Iek users'
appears_on:
- entity.iek_users.collection
# Iek users menu items definition
entity.iek_users.collection:
title: 'Iek users list'
route_name: entity.iek_users.collection
description: 'List Iek users entities'
parent: system.admin_structure
weight: 100
iek_users.admin.structure.settings:
title: Iek users settings
description: 'Configure Iek users entities'
route_name: iek_users.settings
parent: system.admin_structure
# Iek users routing definition
iek_users.settings_tab:
route_name: iek_users.settings
title: 'Settings'
base_route: iek_users.settings
entity.iek_users.canonical:
route_name: entity.iek_users.canonical
base_route: entity.iek_users.canonical
title: 'View'
entity.iek_users.edit_form:
route_name: entity.iek_users.edit_form
base_route: entity.iek_users.canonical
title: 'Edit'
entity.iek_users.delete_form:
route_name: entity.iek_users.delete_form
base_route: entity.iek_users.canonical
title: Delete
weight: 10
<?php
/**
* @file
* Contains iek.module.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function iek_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the iek module.
case 'help.page.iek':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('IEK Registration') . '</p>';
return $output;
default:
}
}
/**
* Implements hook_theme().
*/
function iek_theme() {
return [
'iek' => [
'template' => 'iek',
'render element' => 'children',
],
];
}
add iek users entities:
title: 'Create new Iek users entities'
administer iek users entities:
title: 'Administer Iek users entities'
description: 'Allow to access the administration form to configure Iek users entities.'
restrict access: true
delete iek users entities:
title: 'Delete Iek users entities'
edit iek users entities:
title: 'Edit Iek users entities'
access iek users overview:
title: 'Access the Iek users overview page'
view published iek users entities:
title: 'View published Iek users entities'
view unpublished iek users entities:
title: 'View unpublished Iek users entities'
user_data:
path: '/iek/userdata'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\iek\Controller\CurrentUser::getIekUserData'
requirements:
_user_is_logged_in: 'TRUE'
current_user:
path: '/iek/curuser'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\iek\Controller\CurrentUser::getLoginInfo'
requirements:
_user_is_logged_in: 'TRUE'
iek.application_submit:
path: '/iek/appsubmit'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\iek\Controller\ApplicationSubmit::appSubmit'
requirements:
_user_is_logged_in: 'TRUE'
services:
logger.channel.oauth:
parent: 'logger.channel_base'
arguments: ['oauthost']
<?php
/**
* @file
* Contains iek_users.page.inc.
*
* Page callback for Iek users entities.
*/
use Drupal\Core\Render\Element;
/**
* Prepares variables for Iek users templates.
*
* Default template: iek_users.html.twig.
*
* @param array $variables
* An associative array containing:
* - elements: An associative array containing the user information and any
* - attributes: HTML attributes for the containing element.
*/
function template_preprocess_iek_users(array &$variables) {
// Fetch IekUsers Entity Object.
$iek_users = $variables['elements']['#iek_users'];
// Helpful $content variable for templates.
foreach (Element::children($variables['elements']) as $key) {
$variables['content'][$key] = $variables['elements'][$key];
}
}
<?php
namespace Drupal\iek\Controller;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class CurrentUser extends ControllerBase
{
protected $entityTypeManager;
public function __construct(EntityTypeManagerInterface $entityTypeManager)
{
$this->entityTypeManager = $entityTypeManager;
}
public static function create(ContainerInterface $container)
{
return new static(
$container->get('entity_type.manager')
);
}
public function getLoginInfo(Request $request)
{
$authToken = $request->headers->get('PHP_AUTH_USER');
$iekUsers = $this->entityTypeManager->getStorage('iek_users')->loadByProperties(array('authtoken' => $authToken));
$iekUser = reset($iekUsers);
if ($iekUser) {
return $this->respondWithStatus([
'name' => $iekUser->name->value,
], Response::HTTP_OK);
} else {
return $this->respondWithStatus([
'message' => t("IEK user not found"),
], Response::HTTP_FORBIDDEN);
}
}
public function getIekUserData(Request $request)
{
$authToken = $request->headers->get('PHP_AUTH_USER');
$iekUsers = $this->entityTypeManager->getStorage('iek_users')->loadByProperties(array('authtoken' => $authToken));
$iekUser = reset($iekUsers);
if ($iekUser) {
$user = $this->entityTypeManager->getStorage('user')->load($iekUser->user_id->target_id);
if ($user) {
$userName = $iekUser->name->value;
$userSurname = $iekUser->surname->value;
$userFathername = $iekUser->fathername->value;
$userMothername = $iekUser->mothername->value;
$userEmail = $user->mail->value;
return $this->respondWithStatus([
'userName' => mb_substr($iekUser->name->value,0,4,'UTF-8') !== "####" ? $iekUser->name->value : '',
'userSurname' => mb_substr($iekUser->surname->value,0,4,'UTF-8') !== "####" ? $iekUser->surname->value : '',
'userFathername' => mb_substr($iekUser->fathername->value,0,4,'UTF-8') !== "####" ? $iekUser->fathername->value : '',
'userMothername' => mb_substr($iekUser->mothername->value,0,4,'UTF-8') !== "####" ? $iekUser->mothername->value : '',
'userEmail' => mb_substr($user->mail->value,0,4,'UTF-8') !== "####" ? $user->mail->value : '',
], Response::HTTP_OK);
} else {
return $this->respondWithStatus([
'message' => t("user not found"),
], Response::HTTP_INTERNAL_SERVER_ERROR);
}
} else {
return $this->respondWithStatus([
'message' => t("IEK user not found"),
], Response::HTTP_FORBIDDEN);
}
}
private function respondWithStatus($arr, $s) {
$res = new JsonResponse($arr);
$res->setStatusCode($s);
return $res;
}
}
<?php
namespace Drupal\iek\Entity;
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Entity\EntityChangedInterface;
use Drupal\user\EntityOwnerInterface;
/**
* Provides an interface for defining Iek users entities.
*
* @ingroup iek
*/
interface IekUsersInterface extends ContentEntityInterface, EntityChangedInterface, EntityOwnerInterface {
// Add get/set methods for your configuration properties here.
/**
* Gets the Iek users name.
*
* @return string
* Name of the Iek users.
*/
public function getName();
/**
* Sets the Iek users name.
*
* @param string $name
* The Iek users name.
*
* @return \Drupal\iek\Entity\IekUsersInterface
* The called Iek users entity.
*/
public function setName($name);
/**
* Gets the Iek users creation timestamp.
*
* @return int
* Creation timestamp of the Iek users.
*/
public function getCreatedTime();
/**
* Sets the Iek users creation timestamp.
*
* @param int $timestamp
* The Iek users creation timestamp.
*
* @return \Drupal\iek\Entity\IekUsersInterface
* The called Iek users entity.
*/
public function setCreatedTime($timestamp);
/**
* Returns the Iek users published status indicator.
*
* Unpublished Iek users are only visible to restricted users.
*
* @return bool
* TRUE if the Iek users is published.
*/
public function isPublished();
/**
* Sets the published status of a Iek users.
*
* @param bool $published
* TRUE to set this Iek users to published, FALSE to set it to unpublished.
*
* @return \Drupal\iek\Entity\IekUsersInterface
* The called Iek users entity.
*/
public function setPublished($published);
//get/set methods for additional fields for configuration properties.
public function getDrupaluser_id();
public function setDrupaluser_id($val);
public function getTaxis_userid();
public function setTaxis_userid($val);
public function getTaxis_taxid();
public function setTaxis_taxid($val);
public function getSurname();
public function setSurname($val);
public function getFathername();
public function setFathername($val);
public function getMothername();
public function setMothername($val);
//public function getAddress();
//public function setAddress($val);
//public function getAddresstk();
//public function setAddresstk($val);
//public function getAddressarea();
//public function setAddressarea($val);
public function getAccesstoken();
public function setAccesstoken($val);
public function getAuthtoken();
public function setAuthtoken($val);
public function getTimelogin();
public function setTimelogin($val);
public function getTimeregistration();
public function setTimeregistration($val);
public function getTimetokeninvalid();
public function setTimetokeninvalid($val);
public function getUserip();
public function setUserip($val);
}
<?php
namespace Drupal\iek\Entity;
use Drupal\views\EntityViewsData;
/**
* Provides Views data for Iek users entities.
*/
class IekUsersViewsData extends EntityViewsData {
/**
* {@inheritdoc}
*/
public function getViewsData() {
$data = parent::getViewsData();
// Additional information for Views integration, such as table joins, can be
// put here.
return $data;
}
}
<?php
namespace Drupal\iek\Form;
use Drupal\Core\Entity\ContentEntityDeleteForm;
/**
* Provides a form for deleting Iek users entities.
*
* @ingroup iek
*/
class IekUsersDeleteForm extends ContentEntityDeleteForm {
}
<?php
namespace Drupal\iek\Form;
use Drupal\Core\Entity\ContentEntityForm;
use Drupal\Core\Form\FormStateInterface;
/**
* Form controller for Iek users edit forms.
*
* @ingroup iek
*/
class IekUsersForm extends ContentEntityForm {
/**
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state) {
/* @var $entity \Drupal\iek\Entity\IekUsers */
$form = parent::buildForm($form, $form_state);
$entity = $this->entity;
return $form;
}
/**
* {@inheritdoc}
*/
public function save(array $form, FormStateInterface $form_state) {
$entity = &$this->entity;
$status = parent::save($form, $form_state);
switch ($status) {
case SAVED_NEW:
drupal_set_message($this->t('Created the %label Iek users.', [
'%label' => $entity->label(),
]));
break;
default:
drupal_set_message($this->t('Saved the %label Iek users.', [
'%label' => $entity->label(),
]));
}
$form_state->setRedirect('entity.iek_users.canonical', ['iek_users' => $entity->id()]);
}
}
<?php
namespace Drupal\iek\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
/**
* Class IekUsersSettingsForm.
*
* @package Drupal\iek\Form
*
* @ingroup iek
*/
class IekUsersSettingsForm extends FormBase {
/**
* Returns a unique string identifying the form.
*
* @return string
* The unique string identifying the form.
*/
public function getFormId() {
return 'IekUsers_settings';
}
/**
* Form submission handler.
*
* @param array $form
* An associative array containing the structure of the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
// Empty implementation of the abstract submit class.
}
/**
* Defines the settings form for Iek users entities.
*
* @param array $form
* An associative array containing the structure of the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*
* @return array
* Form definition array.
*/
public function buildForm(array $form, FormStateInterface $form_state) {
$form['IekUsers_settings']['#markup'] = 'Settings form for Iek users entities. Manage field settings here.';
return $form;
}
}
<?php
namespace Drupal\iek;
use Drupal\Core\Entity\EntityAccessControlHandler;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Access\AccessResult;
/**
* Access controller for the Iek users entity.
*
* @see \Drupal\iek\Entity\IekUsers.
*/
class IekUsersAccessControlHandler extends EntityAccessControlHandler {
/**
* {@inheritdoc}
*/
protected function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) {
/** @var \Drupal\iek\Entity\IekUsersInterface $entity */
switch ($operation) {
case 'view':
if (!$entity->isPublished()) {
return AccessResult::allowedIfHasPermission($account, 'view unpublished iek users entities');
}
return AccessResult::allowedIfHasPermission($account, 'view published iek users entities');
case 'update':
return AccessResult::allowedIfHasPermission($account, 'edit iek users entities');
case 'delete':
return AccessResult::allowedIfHasPermission($account, 'delete iek users entities');
}
// Unknown operation, no opinion.
return AccessResult::neutral();
}
/**
* {@inheritdoc}
*/
protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
return AccessResult::allowedIfHasPermission($account, 'add iek users entities');
}
}
<?php
namespace Drupal\iek;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Entity\Routing\AdminHtmlRouteProvider;
use Symfony\Component\Routing\Route;
/**
* Provides routes for Iek users entities.
*
* @see Drupal\Core\Entity\Routing\AdminHtmlRouteProvider
* @see Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider
*/
class IekUsersHtmlRouteProvider extends AdminHtmlRouteProvider {
/**
* {@inheritdoc}
*/
public function getRoutes(EntityTypeInterface $entity_type) {
$collection = parent::getRoutes($entity_type);
$entity_type_id = $entity_type->id();
if ($collection_route = $this->getCollectionRoute($entity_type)) {
$collection->add("entity.{$entity_type_id}.collection", $collection_route);
}
if ($settings_form_route = $this->getSettingsFormRoute($entity_type)) {
$collection->add("$entity_type_id.settings", $settings_form_route);
}
return $collection;
}
/**
* Gets the collection route.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type.
*
* @return \Symfony\Component\Routing\Route|null
* The generated route, if available.
*/
protected function getCollectionRoute(EntityTypeInterface $entity_type) {
if ($entity_type->hasLinkTemplate('collection') && $entity_type->hasListBuilderClass()) {
$entity_type_id = $entity_type->id();
$route = new Route($entity_type->getLinkTemplate('collection'));
$route
->setDefaults([
'_entity_list' => $entity_type_id,
'_title' => "{$entity_type->getLabel()} list",
])
->setRequirement('_permission', 'access iek users overview')
->setOption('_admin_route', TRUE);
return $route;
}
}
/**
* Gets the settings form route.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type.
*
* @return \Symfony\Component\Routing\Route|null
* The generated route, if available.
*/
protected function getSettingsFormRoute(EntityTypeInterface $entity_type) {
if (!$entity_type->getBundleEntityType()) {
$route = new Route("/admin/structure/{$entity_type->id()}/settings");
$route
->setDefaults([
'_form' => 'Drupal\iek\Form\IekUsersSettingsForm',
'_title' => "{$entity_type->getLabel()} settings",
])
->setRequirement('_permission', $entity_type->getAdminPermission())
->setOption('_admin_route', TRUE);
return $route;
}
}
}
<?php
namespace Drupal\iek;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityListBuilder;
use Drupal\Core\Routing\LinkGeneratorTrait;
use Drupal\Core\Url;
/**
* Defines a class to build a listing of Iek users entities.
*
* @ingroup iek
*/
class IekUsersListBuilder extends EntityListBuilder {
use LinkGeneratorTrait;
/**
* {@inheritdoc}
*/
public function buildHeader() {
$header['id'] = $this->t('ID');
$header['name'] = $this->t('Όνομα');
$header['surname'] = $this->t('Επώνυμο');
$header['fathername'] = $this->t('Όνομα πατέρα');
$header['mothername'] = $this->t('Όνομα μητέρας');
//$header['drupaluser_id'] = $this->t('ID χρήστη Drupal');
//$header['taxis_userid'] = $this->t('ID χρήστη από taxisnet');
//$header['taxis_taxid'] = $this->t('TAXID χρήστη από taxisnet');
//$header['address'] = $this->t('Διεύθυνση');
//$header['addresstk'] = $this->t('ΤΚ');
//$header['addressarea'] = $this->t('Περιοχή');
//$header['accesstoken'] = $this->t('AccessToken');
//$header['authtoken'] = $this->t('AuthToken');
//$header['timelogin'] = $this->t('Time Login');
//$header['timeregistration'] = $this->t('Time Registration');
//$header['timetokeninvalid'] = $this->t('Time Token Invalid');
//$header['userip'] = $this->t('User IP');
return $header + parent::buildHeader();
}
/**
* {@inheritdoc}
*/
public function buildRow(EntityInterface $entity) {
/* @var $entity \Drupal\iek\Entity\IekUsers */
$row['id'] = $entity->id();
$row['name'] = $this->l(
$entity->label(),
new Url(
'entity.iek_users.edit_form', array(
'iek_users' => $entity->id(),
)
)
);
$row['surname'] = $this->l(
$entity->getSurname(),
new Url(
'entity.iek_users.edit_form', array(
'iek_users' => $entity->id(),
)
)
);
$row['fathername'] = $this->l(
$entity->getFathername(),
new Url(
'entity.iek_users.edit_form', array(
'iek_users' => $entity->id(),
)
)
);
$row['mothername'] = $this->l(
$entity->getMothername(),
new Url(
'entity.iek_users.edit_form', array(
'iek_users' => $entity->id(),
)
)
);
return $row + parent::buildRow($entity);
}
}
<?php
namespace Drupal\iek\Tests;
use Drupal\Core\Url;
use Drupal\simpletest\WebTestBase;
/**
* Simple test to ensure that main page loads with module enabled.
*
* @group iek
*/
class LoadTest extends WebTestBase{
/**
* Modules to enable.
*
* @var array
*/
public static $modules = ['iek'];
/**
* A user with permission to administer site configuration.
*
* @var \Drupal\user\UserInterface
*/
protected $user;
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->user = $this->drupalCreateUser(['administer site configuration']);
$this->drupalLogin($this->user);
}
/**
* Tests that the home page loads with a 200 response.
*/
public function testLoad() {
$this->drupalGet(Url::fromRoute('<front>'));
$this->assertResponse(200);
}
}
<!-- Add you custom twig html here -->
\ No newline at end of file
{#
/**
* @file iek_users.html.twig
* Default theme implementation to present Iek users data.
*
* This template is used when viewing Iek users pages.
*
*
* Available variables:
* - content: A list of content items. Use 'content' to print all content, or
* - attributes: HTML attributes for the container element.
*
* @see template_preprocess_iek_users()
*
* @ingroup themeable
*/
#}
<div{{ attributes.addClass('iek_users') }}>
{% if content %}
{{- content -}}
{% endif %}
</div>
.progressbar-wrapper{padding:25px;background:#fff;border-radius:4px;text-align:center}.f1-steps{overflow:hidden;position:relative;margin-top:20px}.f1-progress{position:absolute;top:24px;left:0;width:100%;height:1px;background:#ddd}.f1-progress-line{position:absolute;top:0;left:0;height:1px;background:#466bc8}.f1-step{position:relative;float:left;width:33.3333%;padding:0 5px}.f1-step-icon{display:inline-block;width:40px;height:40px;margin-top:4px;background:#ddd;font-size:16px;color:#fff;line-height:40px;border-radius:50%}.f1-step.activated .f1-step-icon{background:#fff;border:1px solid #466bc8;color:#466bc8;line-height:38px}.f1-step.active .f1-step-icon{width:48px;height:48px;margin-top:0;background:#466bc8;font-size:22px;line-height:48px}.f1-step p{color:#ccc}.f1-step.activated p{color:#466bc8}.f1-step.active p{color:#466bc8}form.multistep-two-form h2.form-title{padding:15px}form.multistep-two-form .form-group{margin-bottom:1.2em;overflow:hidden}form.multistep-two-form .form-group label{float:left;width:28%;padding-right:10px;padding-top:8px;text-align:left}form.multistep-two-form .form-group .form-control{font-size:16px;padding:4px 8px;height:36px;width:72%;float:left;border-radius:4px !important}form.multistep-two-form .form-group .form-control[disabled]{background-color:grey;opacity:0.55;color:white;font-weight:bold}form.multistep-two-form .less-p label{padding-top:0}form.multistep-two-form #edit-sex--wrapper{padding-bottom:15px}form.multistep-two-form #edit-sex--wrapper legend{float:left;width:25%;font-size:18px;font-weight:bold;border-style:none}form.multistep-two-form #edit-sex--wrapper .fieldset-wrapper{float:left;width:75%}form.multistep-two-form #edit-sex--wrapper .fieldset-wrapper #edit-sex label{font-size:16px;font-weight:bold}
/*# sourceMappingURL=maincustomform.css.map */
\ No newline at end of file
(function ($, Drupal) {
Drupal.behaviors.logInForm = {
attach: function (context, settings) {
//get all available regions
jQuery.ajax({
url: Drupal.url('/jsonapi/region_entity/region_entity?_format=api_json&fields[region_entity--region_entity]=id,name'),
method: 'GET',
success: function(data, status, xhr) {
var arrObjects = data["data"];
var sel = $("#edit-region-select");
sel.empty();
arrObjects.forEach( function (arrayItem)
{
var attributes = arrayItem['attributes'];
sel.append('<option value="' + attributes['id'] + '">' + attributes['name'] + '</option>');
})
}
});
//select iek
jQuery.ajax({
url: Drupal.url('/jsonapi/school_entity/school_entity?_format=api_json&fields[school_entity--school_entity]=id,name'),
method: 'GET',
success: function(data, status, xhr) {