Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
astridx committed Jun 18, 2021
1 parent 1063e1d commit 951ffbb
Show file tree
Hide file tree
Showing 130 changed files with 3,754 additions and 3,503 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ vendor/
j4/pkg_agosms/sik
j4/pkg_agosms/dist/
j4/pkg_agosms/vendor/
.vscode
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,33 @@
hint="JFIELD_ALIAS_PLACEHOLDER"
/>

<field
name="description"
type="editor"
label="COM_AGOSMS_FIELD_DESCRIPTION_LABEL"
filter="JComponentHelper::filterText"
buttons="true"
/>

<field
name="popuptext"
type="editor"
label="COM_AGOSMS_FIELD_DESCRIPTION_LABEL"
filter="JComponentHelper::filterText"
buttons="true"
/>

<field
name="coordinates"
type="text"
validate="Coordinates"
class="validate-coordinates"
label="COM_AGOSMS_FIELD_COORDINATES_LABEL"
size="40"
default="50,7"
required="true"
/>

<field
name="language"
type="contentlanguage"
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php
/**
* Joomla! Content Management System
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

namespace AgosmNamespace\Component\Agosms\Administrator\Rule;

\defined('_JEXEC') or die;

use Joomla\CMS\Form\FormRule;

/**
* Form Rule class for the Joomla Platform.
*
* @since __DEPLOY_VERSION__
*/
class CoordinatesRule extends FormRule
{
/**
* The regular expression to use in testing a form field value.
*
* @var string
* @since __DEPLOY_VERSION__
*/
protected $regex = '^([0-9.]+[,][0-9.]+)$';

/**
* The regular expression modifiers to use when testing a form field value.
*
* @var string
* @since __DEPLOY_VERSION__
*/
protected $modifiers = 'i';
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ public function display($tpl = null): void
$this->activeFilters = $this->get('ActiveFilters');
$this->state = $this->get('State');

if (!count($this->items) && $this->get('IsEmptyState'))
{
if (!count($this->items) && $this->get('IsEmptyState')) {
$this->setLayout('emptystate');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@
<div class="col-md-9">
<div class="row">
<div class="col-md-6">
<?php echo 'Hier ist Platz für die Inhalte deiner Erweiterung'; ?>
<?php echo Text::_('COM_AGOSMS_NEW_AGOSM_DESC'); ?>
<?php echo $this->getForm()->renderField('description'); ?>
<?php echo Text::_('COM_AGOSMS_NEW_AGOSM_POPUP'); ?>
<?php echo $this->getForm()->renderField('popuptext'); ?>
<?php echo $this->getForm()->renderField('coordinates'); ?>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@

$user = Factory::getApplication()->getIdentity();

if ($user->authorise('core.create', 'com_agosms') || count($user->getAuthorisedCategories('com_agosms', 'core.create')) > 0)
{
if ($user->authorise('core.create', 'com_agosms') || count($user->getAuthorisedCategories('com_agosms', 'core.create')) > 0) {
$displayData['createURL'] = 'index.php?option=com_agosms&task=agosm.add';
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ class AgosmModel extends BaseDatabaseModel
public function getItem($pk = null)
{
$app = Factory::getApplication();
$pk = $app->input->getInt('id');

if ($app->input->getInt('id') !== null) {
$pk = $app->input->getInt('id');
}

if ($this->_item === null) {
$this->_item = [];
Expand Down
Loading

0 comments on commit 951ffbb

Please sign in to comment.