Poprawa walidacji danych w metodach płatności oraz aktualizacja obsługi błędów w AJAX i poprawa formatowania kodu
This commit is contained in:
@@ -17,19 +17,19 @@
|
||||
<label for="<?= $ce['db'];?>" class="col-lg-3 control-label"><?= $ce['name'];?>:</label>
|
||||
<? if ( $ce['type'] == 'text' ):?>
|
||||
<div class="col-lg-9">
|
||||
<input type="text" class="form-control <? if ( $ce['require'] ):?>require<? endif;?>" name="<?= $ce['db'];?>" id="<?= $ce['db'];?>"
|
||||
<?
|
||||
if ( is_array( $ce['params'] ) ): foreach( $ce['params'] as $key => $val ):
|
||||
echo $key . '="' . $val . '"';
|
||||
<input type="text" class="form-control <? if ( isset( $ce['require'] ) and $ce['require'] ):?>require<? endif;?>" name="<?= $ce['db'];?>" id="<?= $ce['db'];?>"
|
||||
<?
|
||||
if ( isset( $ce['params'] ) and is_array( $ce['params'] ) ): foreach( $ce['params'] as $key => $val ):
|
||||
echo $key . '="' . $val . '"';
|
||||
endforeach; endif;
|
||||
?> value="<?= htmlspecialchars( $this -> element[ $ce['db'] ] );?>" <? if ( $ce['readonly-edit'] and $this -> element[ $this -> values['id'] ] ):?>readonly="readonly"<? endif;?> />
|
||||
</div>
|
||||
<? elseif ( $ce['type'] == 'select' ):?>
|
||||
<div class="col-lg-9">
|
||||
<select name="<?= $ce['db'];?>" id="<?= $ce['db'];?>" class="form-control <? if ( $ce['require'] ):?>require<? endif;?>"
|
||||
<?
|
||||
if ( is_array( $ce['params'] ) ): foreach( $ce['params'] as $key => $val ):
|
||||
echo $key . '="' . $val . '"';
|
||||
<?
|
||||
if ( is_array( $ce['params'] ) ): foreach( $ce['params'] as $key => $val ):
|
||||
echo $key . '="' . $val . '"';
|
||||
endforeach; endif;
|
||||
?>>
|
||||
<option value="null">---- <?= $ce['name'];?> ----</option>
|
||||
@@ -38,20 +38,20 @@
|
||||
$results = $_SESSION[ 'g' . $g_table ] -> connectToDb() -> query( $ce['replace']['sql'] ) -> fetchAll();
|
||||
if ( is_array( $results ) ) foreach ( $results as $row )
|
||||
{
|
||||
echo '<option value="' . $row[0] . '"';
|
||||
echo '<option value="' . $row[0] . '"';
|
||||
if ( $this -> element[ $ce['db'] ] !== null and $row[0] == $this -> element[ $ce['db'] ] )
|
||||
echo ' selected="selected" ';
|
||||
echo '>' . $row[1] . '</option>';
|
||||
}
|
||||
?>
|
||||
<? else:?>
|
||||
<?
|
||||
<?
|
||||
if ( is_array( $ce['replace']['array'] ) ): foreach ( $ce['replace']['array'] as $key => $val ):
|
||||
?>
|
||||
<option value="<?= $key;?>"
|
||||
<? if (
|
||||
<option value="<?= $key;?>"
|
||||
<? if (
|
||||
( $this -> element[ $ce['db'] ] !== null and $key == $this -> element[ $ce['db'] ] )
|
||||
or
|
||||
or
|
||||
( $this -> element[ $ce['db'] ] === null and isset( $ce['default_value'] ) and $ce['default_value'] == $key )
|
||||
):?>
|
||||
selected="selected"
|
||||
@@ -59,7 +59,7 @@
|
||||
>
|
||||
<?= $val;?>
|
||||
</option>
|
||||
<?
|
||||
<?
|
||||
endforeach; endif;
|
||||
?>
|
||||
<? endif;?>
|
||||
@@ -77,9 +77,9 @@
|
||||
<? elseif ( $ce['type'] == 'textarea' ):?>
|
||||
<div class="col col-lg-9">
|
||||
<textarea name="<?= $ce['db'];?>" id="<?= $ce['db'];?>" class="form-control"
|
||||
<?
|
||||
if ( is_array( $ce['params'] ) ): foreach( $ce['params'] as $key => $val ):
|
||||
echo $key . '="' . $val . '"';
|
||||
<?
|
||||
if ( isset( $ce['params'] ) and is_array( $ce['params'] ) ): foreach( $ce['params'] as $key => $val ):
|
||||
echo $key . '="' . $val . '"';
|
||||
endforeach; endif;
|
||||
?>><?= $this -> element[ $ce['db'] ];?></textarea>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user