mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Support style in extravar value definition
This commit is contained in:
parent
31fa498b19
commit
fc406a927c
9 changed files with 22 additions and 9 deletions
|
|
@ -29,6 +29,7 @@ class Value
|
|||
public $is_disabled = 'N';
|
||||
public $is_readonly = 'N';
|
||||
public $search = 'N';
|
||||
public $style = null;
|
||||
|
||||
/**
|
||||
* Skin path cache.
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
<li>
|
||||
<input type="{{ $type }}" name="{{ $input_name . $column_suffix }}"
|
||||
id="{{ $tempid }}" class="{{ $type }}" value="{{ $v }}"
|
||||
style="{{ $definition->style }}"|if="$definition->style"
|
||||
@checked($is_checked)
|
||||
@required(toBool($definition->is_required))
|
||||
@disabled(toBool($definition->is_disabled))
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
/>
|
||||
<input type="date" class="date" value="{{ $formatted_value }}"
|
||||
pattern="\d{4}-\d{2}-\d{2}" placeholder="YYYY-MM-DD"
|
||||
style="{{ $definition->style }}"|if="$definition->style"
|
||||
onchange="jQuery(this).prev('.rx_ev_date').val(this.value.replace(/-/g, ''));"
|
||||
@required(toBool($definition->is_required))
|
||||
@disabled(toBool($definition->is_disabled))
|
||||
|
|
@ -21,6 +22,7 @@
|
|||
<input type="time" name="{{ $input_name }}"
|
||||
id="{{ $input_id }}"|if="$input_id" class="rx_ev_time"
|
||||
value="{{ $value }}" pattern="\d{2}:\d{2}"
|
||||
style="{{ $definition->style }}"|if="$definition->style"
|
||||
@required(toBool($definition->is_required))
|
||||
@disabled(toBool($definition->is_disabled))
|
||||
@readonly(toBool($definition->is_readonly))
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
@endphp
|
||||
<select name="{{ $input_name }}"
|
||||
id="{{ $input_id }}"|if="$input_id" class="select rx_ev_select rx_ev_select_country"
|
||||
style="{{ $definition->style }}"|if="$definition->style"
|
||||
@required(toBool($definition->is_required))
|
||||
@disabled(toBool($definition->is_disabled))
|
||||
@readonly(toBool($definition->is_readonly))>
|
||||
|
|
@ -24,6 +25,7 @@
|
|||
@endphp
|
||||
<select name="{{ $input_name }}"
|
||||
id="{{ $input_id }}"|if="$input_id" class="select rx_ev_select rx_ev_select_language"
|
||||
style="{{ $definition->style }}"|if="$definition->style"
|
||||
@required(toBool($definition->is_required))
|
||||
@disabled(toBool($definition->is_disabled))
|
||||
@readonly(toBool($definition->is_readonly))>
|
||||
|
|
@ -40,6 +42,7 @@
|
|||
@endphp
|
||||
<select name="{{ $input_name }}"
|
||||
id="{{ $input_id }}"|if="$input_id" class="select rx_ev_select rx_ev_select_timezone"
|
||||
style="{{ $definition->style }}"|if="$definition->style"
|
||||
@required(toBool($definition->is_required))
|
||||
@disabled(toBool($definition->is_disabled))
|
||||
@readonly(toBool($definition->is_readonly))>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<input type="password" name="{{ $input_name }}"
|
||||
id="{{ $input_id }}"|if="$input_id" class="password rx_ev_password"
|
||||
style="{{ $definition->style }}"|if="$definition->style"
|
||||
value="{{ strval($value) !== '' ? $value : $default }}"
|
||||
@required(toBool($definition->is_required))
|
||||
@disabled(toBool($definition->is_disabled))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<select name="{{ $input_name }}"
|
||||
id="{{ $input_id }}"|if="$input_id" class="select rx_ev_select"
|
||||
style="{{ $definition->style }}"|if="$definition->style"
|
||||
@required(toBool($definition->is_required))
|
||||
@disabled(toBool($definition->is_disabled))
|
||||
@readonly(toBool($definition->is_readonly))>
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
@if ($type === 'tel')
|
||||
<input type="tel" name="{{ $input_name }}[]" value="{{ $value[0] }}" size="4" maxlength="4" class="tel rx_ev_tel1" />
|
||||
<input type="tel" name="{{ $input_name }}[]" value="{{ $value[1] }}" size="4" maxlength="4" class="tel rx_ev_tel2" />
|
||||
<input type="tel" name="{{ $input_name }}[]" value="{{ $value[2] }}" size="4" maxlength="4" class="tel rx_ev_tel3" />
|
||||
<input type="tel" name="{{ $input_name }}[]" value="{{ $value[0] }}" size="4" maxlength="4" class="tel rx_ev_tel1" style="{{ $definition->style }}"|if="$definition->style" />
|
||||
<input type="tel" name="{{ $input_name }}[]" value="{{ $value[1] }}" size="4" maxlength="4" class="tel rx_ev_tel2" style="{{ $definition->style }}"|if="$definition->style" />
|
||||
<input type="tel" name="{{ $input_name }}[]" value="{{ $value[2] }}" size="4" maxlength="4" class="tel rx_ev_tel3" style="{{ $definition->style }}"|if="$definition->style" />
|
||||
@elseif ($type === 'tel_v2')
|
||||
<input type="tel" name="{{ $input_name }}[]" value="{{ $value[0] }}" size="16" maxlength="16" class="rx_ev_tel_v2" />
|
||||
<input type="tel" name="{{ $input_name }}[]" value="{{ $value[0] }}" size="16" maxlength="16" class="rx_ev_tel_v2" style="{{ $definition->style }}"|if="$definition->style" />
|
||||
@elseif ($type === 'tel_intl' || $type === 'tel_intl_v2')
|
||||
@php
|
||||
$lang_type = Context::getLangType();
|
||||
$lang_sort = $lang_type === 'ko' ? Rhymix\Framework\i18n::SORT_NAME_KOREAN : Rhymix\Framework\i18n::SORT_NAME_ENGLISH;
|
||||
$countries = Rhymix\Framework\i18n::listCountries($lang_sort);
|
||||
@endphp
|
||||
<select name="{{ $input_name }}[]" class="select rx_ev_select rx_ev_select_country">
|
||||
<select name="{{ $input_name }}[]" class="select rx_ev_select rx_ev_select_country" style="{{ $definition->style }}"|if="$definition->style">
|
||||
<option value=""></option>
|
||||
@foreach ($countries as $country)
|
||||
@php
|
||||
|
|
@ -21,10 +21,10 @@
|
|||
@endforeach
|
||||
</select>
|
||||
@if ($type === 'tel_intl')
|
||||
<input type="tel" name="{{ $input_name }}[]" value="{{ $value[1] }}" size="4" maxlength="4" class="tel rx_ev_tel1" />
|
||||
<input type="tel" name="{{ $input_name }}[]" value="{{ $value[2] }}" size="4" maxlength="4" class="tel rx_ev_tel2" />
|
||||
<input type="tel" name="{{ $input_name }}[]" value="{{ $value[3] }}" size="4" maxlength="4" class="tel rx_ev_tel3" />
|
||||
<input type="tel" name="{{ $input_name }}[]" value="{{ $value[1] }}" size="4" maxlength="4" class="tel rx_ev_tel1" style="{{ $definition->style }}"|if="$definition->style" />
|
||||
<input type="tel" name="{{ $input_name }}[]" value="{{ $value[2] }}" size="4" maxlength="4" class="tel rx_ev_tel2" style="{{ $definition->style }}"|if="$definition->style" />
|
||||
<input type="tel" name="{{ $input_name }}[]" value="{{ $value[3] }}" size="4" maxlength="4" class="tel rx_ev_tel3" style="{{ $definition->style }}"|if="$definition->style" />
|
||||
@else
|
||||
<input type="tel" name="{{ $input_name }}[]" value="{{ $value[1] }}" size="16" maxlength="16" class="rx_ev_tel_v2" />
|
||||
<input type="tel" name="{{ $input_name }}[]" value="{{ $value[1] }}" size="16" maxlength="16" class="rx_ev_tel_v2" style="{{ $definition->style }}"|if="$definition->style" />
|
||||
@endif
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
@if ($type === 'homepage' || $type === 'url')
|
||||
<input type="url" name="{{ $input_name }}"
|
||||
id="{{ $input_id }}"|if="$input_id" class="homepage rx_ev_url"
|
||||
style="{{ $definition->style }}"|if="$definition->style"
|
||||
value="{{ $value }}"
|
||||
@required(toBool($definition->is_required))
|
||||
@disabled(toBool($definition->is_disabled))
|
||||
|
|
@ -9,6 +10,7 @@
|
|||
@elseif ($type === 'email_address' || $type === 'email')
|
||||
<input type="email" name="{{ $input_name }}"
|
||||
id="{{ $input_id }}"|if="$input_id" class="email_address rx_ev_email"
|
||||
style="{{ $definition->style }}"|if="$definition->style"
|
||||
value="{{ $value }}"
|
||||
@required(toBool($definition->is_required))
|
||||
@disabled(toBool($definition->is_disabled))
|
||||
|
|
@ -17,6 +19,7 @@
|
|||
@else
|
||||
<input type="text" name="{{ $input_name }}"
|
||||
id="{{ $input_id }}"|if="$input_id" class="text rx_ev_text"
|
||||
style="{{ $definition->style }}"|if="$definition->style"
|
||||
value="{{ strval($value) !== '' ? $value : $default }}"
|
||||
@required(toBool($definition->is_required))
|
||||
@disabled(toBool($definition->is_disabled))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<textarea name="{{ $input_name }}"
|
||||
id="{{ $input_id }}"|if="$input_id" class="rx_ev_textarea"
|
||||
style="{{ $definition->style }}"|if="$definition->style"
|
||||
@required(toBool($definition->is_required))
|
||||
@disabled(toBool($definition->is_disabled))
|
||||
@readonly(toBool($definition->is_readonly))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue