cfmgrv3 init...2
This commit is contained in:
parent
0570832555
commit
51ca9f4dce
@ -29,6 +29,7 @@ class AccountController extends APIController
|
||||
helper($this->_className);
|
||||
$this->_viewPath = strtolower($this->_className);
|
||||
$this->_viewDatas['title'] = lang($this->_className . '.title');
|
||||
$this->_viewDatas['className'] = $this->_className;
|
||||
}
|
||||
|
||||
//Field별 Form Option용
|
||||
|
||||
@ -51,6 +51,7 @@ class AuthController extends APIController
|
||||
helper($this->_className);
|
||||
$this->_viewPath = strtolower($this->_className);
|
||||
$this->_viewDatas['title'] = lang($this->_className . '.title');
|
||||
$this->_viewDatas['className'] = $this->_className;
|
||||
}
|
||||
|
||||
//Insert관련
|
||||
|
||||
@ -30,6 +30,7 @@ class FirewallController extends APIController
|
||||
helper($this->_className);
|
||||
$this->_viewPath = strtolower($this->_className);
|
||||
$this->_viewDatas['title'] = lang($this->_className . '.title');
|
||||
$this->_viewDatas['className'] = $this->_className;
|
||||
}
|
||||
|
||||
//Field별 Form Option용
|
||||
|
||||
@ -42,6 +42,7 @@ class RecordController extends APIController
|
||||
helper($this->_className);
|
||||
$this->_viewPath = strtolower($this->_className);
|
||||
$this->_viewDatas['title'] = lang($this->_className . '.title');
|
||||
$this->_viewDatas['className'] = $this->_className;
|
||||
}
|
||||
|
||||
//Field별 Form Option용
|
||||
|
||||
@ -42,6 +42,7 @@ class ZoneController extends APIController
|
||||
helper($this->_className);
|
||||
$this->_viewPath = strtolower($this->_className);
|
||||
$this->_viewDatas['title'] = lang($this->_className . '.title');
|
||||
$this->_viewDatas['className'] = $this->_className;
|
||||
}
|
||||
|
||||
//Field별 Form Option용
|
||||
|
||||
@ -36,6 +36,7 @@ class LoggerController extends \App\Controllers\Admin\AdminController
|
||||
helper($this->_className);
|
||||
$this->_viewPath = strtolower($this->_className);
|
||||
$this->_viewDatas['title'] = lang($this->_className . '.title');
|
||||
$this->_viewDatas['className'] = $this->_className;
|
||||
}
|
||||
|
||||
private function getUserModel(): UserModel
|
||||
|
||||
@ -51,8 +51,7 @@ class MapurlController extends \App\Controllers\Admin\AdminController
|
||||
helper($this->_className);
|
||||
$this->_viewPath = strtolower($this->_className);
|
||||
$this->_viewDatas['title'] = lang($this->_className . '.title');
|
||||
|
||||
//모든 필요한 FormOption등 조기화작업 필요
|
||||
$this->_viewDatas['className'] = $this->_className;
|
||||
}
|
||||
|
||||
private function remapurl()
|
||||
|
||||
@ -56,6 +56,7 @@ class UserController extends \App\Controllers\Admin\AdminController
|
||||
helper($this->_className);
|
||||
$this->_viewPath = strtolower($this->_className);
|
||||
$this->_viewDatas['title'] = lang($this->_className . '.title');
|
||||
$this->_viewDatas['className'] = $this->_className;
|
||||
}
|
||||
|
||||
//Insert관련
|
||||
|
||||
@ -6,7 +6,7 @@ function getFieldLabel_AccountHelper($field, array $fieldRules, array $attribute
|
||||
if (strpos($fieldRules[$field], 'required') !== false) {
|
||||
array_push($attributes, 'style="color:red";');
|
||||
}
|
||||
return sprintf("<span %s>%s</span>", implode(" ", $attributes), lang('Cloudflare/Account.label.' . $field));
|
||||
return sprintf("<span %s>%s</span>", implode(" ", $attributes), lang("Admin/Cloudflare/API/Account.label.{$field}"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -48,7 +48,7 @@ function getFieldView_AccountHelper($field, $entity, array $fieldFilters, $field
|
||||
|
||||
function getFieldIndex_Column_AccountHelper($field, $order_field, $order_value, array $attributes = array())
|
||||
{
|
||||
$label = lang('Cloudflare/Account.label.' . $field);
|
||||
$label = lang("Admin/Cloudflare/API/Account.label.{$field}");
|
||||
$label = $field == $order_field ? sprintf('%s <i class="fa fa-arrow-%s"></i>', $label, $order_value == 'ASC' ? "up" : "down") : $label;
|
||||
$order_value = $order_value == 'DESC' ? "ASC" : "DESC";
|
||||
return anchor(current_url() . "?order_field={$field}&order_value={$order_value}", $label, $attributes);
|
||||
|
||||
@ -1,46 +1,48 @@
|
||||
<?php
|
||||
function getFieldLabel_AuthHelper($field,array $fieldRules,array $attributes=array()):string
|
||||
function getFieldLabel_AuthHelper($field, array $fieldRules, array $attributes = array()): string
|
||||
{
|
||||
switch($field){
|
||||
switch ($field) {
|
||||
default:
|
||||
if(strpos($fieldRules[$field], 'required') !== false){
|
||||
array_push($attributes,'style="color:red";');
|
||||
if (strpos($fieldRules[$field], 'required') !== false) {
|
||||
array_push($attributes, 'style="color:red";');
|
||||
}
|
||||
return sprintf("<span %s>%s</span>",implode(" ",$attributes),lang('Cloudflare/Auth.label.'.$field));
|
||||
return sprintf("<span %s>%s</span>", implode(" ", $attributes), lang("Admin/Cloudflare/API/Auth.label.{$field}"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//header.php에서 getFieldForm_Helper사용
|
||||
function getFieldForm_AuthHelper($field,$value,array $formOptions,array $attributes = array())
|
||||
function getFieldForm_AuthHelper($field, $value, array $formOptions, array $attributes = array())
|
||||
{
|
||||
$value = is_null($value) ? DEFAULT_EMPTY:$value;
|
||||
switch($field){
|
||||
$value = is_null($value) ? DEFAULT_EMPTY : $value;
|
||||
switch ($field) {
|
||||
case 'uid':
|
||||
$attributes['id'] = "uid_select";
|
||||
return sprintf("%s %s",
|
||||
form_dropdown($field,$formOptions[$field],$value,$attributes),
|
||||
'<button id="selectKey" type="button" class="btn btn-info btn-circle fa fa-refresh">Auth선택</button>');
|
||||
return sprintf(
|
||||
"%s %s",
|
||||
form_dropdown($field, $formOptions[$field], $value, $attributes),
|
||||
'<button id="selectKey" type="button" class="btn btn-info btn-circle fa fa-refresh">Auth선택</button>'
|
||||
);
|
||||
break;
|
||||
case 'status':
|
||||
return form_dropdown($field,$formOptions[$field],$value,$attributes);
|
||||
return form_dropdown($field, $formOptions[$field], $value, $attributes);
|
||||
break;
|
||||
case 'updated_at':
|
||||
case 'created_at':
|
||||
$attributes["class"] = !array_key_exists("class",$attributes) ? "calender":$attributes["class"]." calender";
|
||||
return form_input($field,$value,$attributes);
|
||||
$attributes["class"] = !array_key_exists("class", $attributes) ? "calender" : $attributes["class"] . " calender";
|
||||
return form_input($field, $value, $attributes);
|
||||
break;
|
||||
default:
|
||||
return form_input($field,$value,$attributes);
|
||||
return form_input($field, $value, $attributes);
|
||||
break;
|
||||
}
|
||||
} //
|
||||
|
||||
function getFieldView_AuthHelper($field,$entity,array $fieldFilters,$fieldFormOptions,$attributes=array())
|
||||
function getFieldView_AuthHelper($field, $entity, array $fieldFilters, $fieldFormOptions, $attributes = array())
|
||||
{
|
||||
switch($field){
|
||||
switch ($field) {
|
||||
default:
|
||||
if(in_array($field,$fieldFilters)){
|
||||
if (in_array($field, $fieldFilters)) {
|
||||
return $fieldFormOptions[$field][$entity->$field];
|
||||
}
|
||||
return $entity->$field;
|
||||
@ -48,32 +50,33 @@ function getFieldView_AuthHelper($field,$entity,array $fieldFilters,$fieldFormOp
|
||||
}
|
||||
} //
|
||||
|
||||
function getFieldIndex_Column_AuthHelper($field,$order_field,$order_value,array $attributes = array())
|
||||
function getFieldIndex_Column_AuthHelper($field, $order_field, $order_value, array $attributes = array())
|
||||
{
|
||||
$label = lang('Cloudflare/Auth.label.'.$field);
|
||||
$label = $field == $order_field ? sprintf('%s <i class="fa fa-arrow-%s"></i>',$label,$order_value == 'ASC' ? "up":"down"):$label;
|
||||
$order_value = $order_value == 'DESC' ? "ASC":"DESC";
|
||||
return anchor(current_url()."?order_field={$field}&order_value={$order_value}",$label,$attributes);
|
||||
$label = lang("Admin/Cloudflare/API/Auth.label.{$field}");
|
||||
$label = $field == $order_field ? sprintf('%s <i class="fa fa-arrow-%s"></i>', $label, $order_value == 'ASC' ? "up" : "down") : $label;
|
||||
$order_value = $order_value == 'DESC' ? "ASC" : "DESC";
|
||||
return anchor(current_url() . "?order_field={$field}&order_value={$order_value}", $label, $attributes);
|
||||
} //
|
||||
|
||||
function getFieldIndex_Row_AuthHelper($field,array $row,array $fieldFilters,array $fieldFormOptions,array $attributes=array()): string
|
||||
function getFieldIndex_Row_AuthHelper($field, array $row, array $fieldFilters, array $fieldFormOptions, array $attributes = array()): string
|
||||
{
|
||||
switch($field){
|
||||
switch ($field) {
|
||||
case 'id':
|
||||
return sprintf('<div style="text-align:left; padding-left:30px;">%s %s %s</div>',
|
||||
anchor(base_url().'/admin/cloudflare/auth/reload/'.$row['uid'],' ',["class"=>"btn btn-sm btn-primary btn-circle fa fa-refresh","target" => "_self"]),
|
||||
anchor(base_url().'/admin/cloudflare/account?auth_uid='.$row['uid'],' ',["class"=>"btn btn-sm btn-primary btn-circle fa fa-flag","target" => "_self"]),
|
||||
anchor(current_url().'/view/'.$row['uid'],$row[$field],["target"=>"_self"]),
|
||||
return sprintf(
|
||||
'<div style="text-align:left; padding-left:30px;">%s %s %s</div>',
|
||||
anchor(base_url() . '/admin/cloudflare/auth/reload/' . $row['uid'], ' ', ["class" => "btn btn-sm btn-primary btn-circle fa fa-refresh", "target" => "_self"]),
|
||||
anchor(base_url() . '/admin/cloudflare/account?auth_uid=' . $row['uid'], ' ', ["class" => "btn btn-sm btn-primary btn-circle fa fa-flag", "target" => "_self"]),
|
||||
anchor(current_url() . '/view/' . $row['uid'], $row[$field], ["target" => "_self"]),
|
||||
);
|
||||
break;
|
||||
case 'updated_at':
|
||||
case 'created_at':
|
||||
return str_split($row[$field],10)[0];
|
||||
return str_split($row[$field], 10)[0];
|
||||
break;
|
||||
default:
|
||||
if(in_array($field,$fieldFilters)){
|
||||
$attributes["onChange"]=sprintf('location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value',current_url(),$row['uid'],$field,$field);
|
||||
return getFieldForm_AuthHelper($field,$row[$field],$fieldFormOptions,$attributes);
|
||||
if (in_array($field, $fieldFilters)) {
|
||||
$attributes["onChange"] = sprintf('location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value', current_url(), $row['uid'], $field, $field);
|
||||
return getFieldForm_AuthHelper($field, $row[$field], $fieldFormOptions, $attributes);
|
||||
}
|
||||
return $row[$field];
|
||||
break;
|
||||
|
||||
@ -1,84 +1,89 @@
|
||||
<?php
|
||||
function getFieldLabel_FirewallHelper($field,array $fieldRules,array $attributes=array()):string
|
||||
function getFieldLabel_FirewallHelper($field, array $fieldRules, array $attributes = array()): string
|
||||
{
|
||||
switch($field){
|
||||
switch ($field) {
|
||||
default:
|
||||
if(strpos($fieldRules[$field], 'required') !== false){
|
||||
array_push($attributes,'style="color:red";');
|
||||
if (strpos($fieldRules[$field], 'required') !== false) {
|
||||
array_push($attributes, 'style="color:red";');
|
||||
}
|
||||
return sprintf("<span %s>%s</span>",implode(" ",$attributes),lang('Cloudflare/Firewall.label.'.$field));
|
||||
return sprintf("<span %s>%s</span>", implode(" ", $attributes), lang("Admin/Cloudflare/API/Firewall.label.{$field}"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//header.php에서 getFieldForm_Helper사용
|
||||
function getFieldForm_FirewallHelper($field,$value,array $formOptions,array $attributes = array())
|
||||
function getFieldForm_FirewallHelper($field, $value, array $formOptions, array $attributes = array())
|
||||
{
|
||||
$value = is_null($value) ? DEFAULT_EMPTY:$value;
|
||||
switch($field){
|
||||
$value = is_null($value) ? DEFAULT_EMPTY : $value;
|
||||
switch ($field) {
|
||||
case 'zone_uid':
|
||||
return form_dropdown($field,$formOptions[$field],$value,['class'=> "select-field form-select-sm"]);
|
||||
return form_dropdown($field, $formOptions[$field], $value, ['class' => "select-field form-select-sm"]);
|
||||
break;
|
||||
case 'action':
|
||||
case 'filter_paused':
|
||||
case 'paused':
|
||||
return form_dropdown($field,$formOptions[$field],$value,$attributes);
|
||||
return form_dropdown($field, $formOptions[$field], $value, $attributes);
|
||||
break;
|
||||
case 'updated_at':
|
||||
case 'created_at':
|
||||
$attributes["class"] = !array_key_exists("class",$attributes) ? "calender":$attributes["class"]." calender";
|
||||
return form_input($field,$value,$attributes);
|
||||
$attributes["class"] = !array_key_exists("class", $attributes) ? "calender" : $attributes["class"] . " calender";
|
||||
return form_input($field, $value, $attributes);
|
||||
break;
|
||||
default:
|
||||
return form_input($field,$value,$attributes);
|
||||
return form_input($field, $value, $attributes);
|
||||
break;
|
||||
}
|
||||
} //
|
||||
|
||||
function getFieldView_FirewallHelper($field,array $fieldDatas,array $fieldFilters,array $fieldFormOptions,array $attributes=array())
|
||||
function getFieldView_FirewallHelper($field, array $fieldDatas, array $fieldFilters, array $fieldFormOptions, array $attributes = array())
|
||||
{
|
||||
switch($field){
|
||||
switch ($field) {
|
||||
default:
|
||||
if(in_array($field,$fieldFilters)){
|
||||
return getFieldForm_FirewallHelper($field,$fieldDatas[$field],$fieldFormOptions,$attributes);
|
||||
if (in_array($field, $fieldFilters)) {
|
||||
return getFieldForm_FirewallHelper($field, $fieldDatas[$field], $fieldFormOptions, $attributes);
|
||||
}
|
||||
return $fieldDatas[$field];
|
||||
break;
|
||||
}
|
||||
} //
|
||||
|
||||
function getFieldIndex_Column_FirewallHelper($field,$order_field,$order_value,array $attributes = array())
|
||||
function getFieldIndex_Column_FirewallHelper($field, $order_field, $order_value, array $attributes = array())
|
||||
{
|
||||
$label = lang('Cloudflare/Firewall.label.'.$field);
|
||||
$label = $field == $order_field ? sprintf('%s <i class="fa fa-arrow-%s"></i>',$label,$order_value == 'ASC' ? "up":"down"):$label;
|
||||
$order_value = $order_value == 'DESC' ? "ASC":"DESC";
|
||||
return anchor(current_url()."?order_field={$field}&order_value={$order_value}",$label,$attributes);
|
||||
$label = lang("Admin/Cloudflare/API/Firewall.label.{$field}");
|
||||
$label = $field == $order_field ? sprintf('%s <i class="fa fa-arrow-%s"></i>', $label, $order_value == 'ASC' ? "up" : "down") : $label;
|
||||
$order_value = $order_value == 'DESC' ? "ASC" : "DESC";
|
||||
return anchor(current_url() . "?order_field={$field}&order_value={$order_value}", $label, $attributes);
|
||||
} //
|
||||
|
||||
function getFieldIndex_Row_FirewallHelper($field,array $row,array $fieldFilters,$fieldFormOptions,$attributes=array(),string $old_zone_uid=''): string
|
||||
function getFieldIndex_Row_FirewallHelper($field, array $row, array $fieldFilters, $fieldFormOptions, $attributes = array(), string $old_zone_uid = ''): string
|
||||
{
|
||||
switch($field){
|
||||
switch ($field) {
|
||||
case 'zone_uid':
|
||||
$temp = '';
|
||||
if($old_zone_uid !== $row[$field]){
|
||||
$temp = sprintf('<div style="text-align:left;">%s %s</div>',
|
||||
anchor(base_url().'/admin/cloudflare/zone/firewall/'.$row['zone_uid'],' ',["class"=>"btn btn-sm btn-primary btn-circle fa fa-refresh","target" => "_self"]),
|
||||
$fieldFormOptions[$field][$row[$field]]);
|
||||
if ($old_zone_uid !== $row[$field]) {
|
||||
$temp = sprintf(
|
||||
'<div style="text-align:left;">%s %s</div>',
|
||||
anchor(base_url() . '/admin/cloudflare/zone/firewall/' . $row['zone_uid'], ' ', ["class" => "btn btn-sm btn-primary btn-circle fa fa-refresh", "target" => "_self"]),
|
||||
$fieldFormOptions[$field][$row[$field]]
|
||||
);
|
||||
}
|
||||
return $temp;
|
||||
break;
|
||||
case 'description':
|
||||
return sprintf('<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="bottom" title="%s">%s</button>',
|
||||
preg_replace('/"/', "'",$row['filter_expression']),$row[$field]);
|
||||
return sprintf(
|
||||
'<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="bottom" title="%s">%s</button>',
|
||||
preg_replace('/"/', "'", $row['filter_expression']),
|
||||
$row[$field]
|
||||
);
|
||||
break;
|
||||
case 'updated_at':
|
||||
case 'created_at':
|
||||
return str_split($row[$field],10)[0];
|
||||
return str_split($row[$field], 10)[0];
|
||||
break;
|
||||
default:
|
||||
if(in_array($field,$fieldFilters)){
|
||||
$attributes["onChange"]=sprintf('location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value',current_url(),$row['uid'],$field,$field);
|
||||
return getFieldForm_FirewallHelper($field,$row[$field],$fieldFormOptions,$attributes);
|
||||
if (in_array($field, $fieldFilters)) {
|
||||
$attributes["onChange"] = sprintf('location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value', current_url(), $row['uid'], $field, $field);
|
||||
return getFieldForm_FirewallHelper($field, $row[$field], $fieldFormOptions, $attributes);
|
||||
}
|
||||
return $row[$field];
|
||||
break;
|
||||
|
||||
@ -6,7 +6,7 @@ function getFieldLabel_RecordHelper($field, array $fieldRules, array $attributes
|
||||
if (strpos($fieldRules[$field], 'required') !== false) {
|
||||
array_push($attributes, 'style="color:red";');
|
||||
}
|
||||
return sprintf("<span %s>%s</span>", implode(" ", $attributes), lang('Cloudflare/Record.label.' . $field));
|
||||
return sprintf("<span %s>%s</span>", implode(" ", $attributes), lang("Admin/Cloudflare/API/Record.label.{$field}"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -41,7 +41,7 @@ function getFieldView_RecordHelper($field, array $fieldDatas, array $fieldFilter
|
||||
{
|
||||
switch ($field) {
|
||||
case 'locked':
|
||||
return lang(sprintf("Record.%s.%s", strtoupper($field), $fieldDatas[$field]));
|
||||
return lang("Admin/Cloudflare/API/Record.label.{$fieldDatas[$field]}");
|
||||
break;
|
||||
default:
|
||||
if (in_array($field, $fieldFilters)) {
|
||||
@ -54,23 +54,21 @@ function getFieldView_RecordHelper($field, array $fieldDatas, array $fieldFilter
|
||||
|
||||
function getFieldIndex_Column_RecordHelper($field, $order_field, $order_value, array $attributes = array())
|
||||
{
|
||||
$label = lang("Admin/Cloudflare/API/Record.label.{$field}");
|
||||
switch ($field) {
|
||||
case 'zone_uid':
|
||||
$label = lang('Cloudflare/Record.label.' . $field);
|
||||
$label = $field == $order_field ? sprintf('%s <i class="fa fa-arrow-%s"></i>', $label, $order_value == 'ASC' ? "up" : "down") : $label;
|
||||
$order_value = $order_value == 'DESC' ? "ASC" : "DESC";
|
||||
return anchor(current_url() . "?order_field={$field}&order_value={$order_value}", $label, $attributes) .
|
||||
"<button onClick=\"getElementsByClassNameCopyToClipboard('label_zones'); return false;\" class=\"btn btn-sm btn-danger btn-circle\">Copy Zones</buttion>";
|
||||
break;
|
||||
case 'host':
|
||||
$label = lang('Cloudflare/Record.label.' . $field);
|
||||
$label = $field == $order_field ? sprintf('%s <i class="fa fa-arrow-%s"></i>', $label, $order_value == 'ASC' ? "up" : "down") : $label;
|
||||
$order_value = $order_value == 'DESC' ? "ASC" : "DESC";
|
||||
return anchor(current_url() . "?order_field={$field}&order_value={$order_value}", $label, $attributes) .
|
||||
"<button onClick=\"getElementsByClassNameCopyToClipboard('label_hosts'); return false;\" class=\"btn btn-sm btn-danger btn-circle\">Copy Hosts</buttion>";
|
||||
break;
|
||||
default:
|
||||
$label = lang('Cloudflare/Record.label.' . $field);
|
||||
$label = $field == $order_field ? sprintf('%s <i class="fa fa-arrow-%s"></i>', $label, $order_value == 'ASC' ? "up" : "down") : $label;
|
||||
$order_value = $order_value == 'DESC' ? "ASC" : "DESC";
|
||||
return anchor(current_url() . "?order_field={$field}&order_value={$order_value}", $label, $attributes);
|
||||
|
||||
@ -6,7 +6,7 @@ function getFieldLabel_ZoneHelper($field, array $fieldRules, array $attributes =
|
||||
if (strpos($fieldRules[$field], 'required') !== false) {
|
||||
array_push($attributes, 'style="color:red";');
|
||||
}
|
||||
return sprintf("<span %s>%s</span>", implode(" ", $attributes), lang('Cloudflare/Zone.label.' . $field));
|
||||
return sprintf("<span %s>%s</span>", implode(" ", $attributes), lang("Admin/Cloudflare/API/Zone.label.{$field}"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -48,16 +48,15 @@ function getFieldView_ZoneHelper($field, array $fieldDatas, array $fieldFilters,
|
||||
|
||||
function getFieldIndex_Column_ZoneHelper($field, $order_field, $order_value, array $attributes = array())
|
||||
{
|
||||
$label = lang("Admin/Cloudflare/API/Zone.label.{$field}");
|
||||
switch ($field) {
|
||||
case 'domain':
|
||||
$label = lang('Cloudflare/Zone.label.' . $field);
|
||||
$label = $field == $order_field ? sprintf('%s <i class="fa fa-arrow-%s"></i>', $label, $order_value == 'ASC' ? "up" : "down") : $label;
|
||||
$order_value = $order_value == 'DESC' ? "ASC" : "DESC";
|
||||
return anchor(current_url() . "?order_field={$field}&order_value={$order_value}", $label, $attributes) .
|
||||
"<button onClick=\"getElementsByClassNameCopyToClipboard('label_domains'); return false;\" class=\"btn btn-sm btn-danger btn-circle\">Copy Domains</buttion>";
|
||||
break;
|
||||
default:
|
||||
$label = lang('Cloudflare/Zone.label.' . $field);
|
||||
$label = $field == $order_field ? sprintf('%s <i class="fa fa-arrow-%s"></i>', $label, $order_value == 'ASC' ? "up" : "down") : $label;
|
||||
$order_value = $order_value == 'DESC' ? "ASC" : "DESC";
|
||||
return anchor(current_url() . "?order_field={$field}&order_value={$order_value}", $label, $attributes);
|
||||
|
||||
@ -1,71 +1,71 @@
|
||||
<?php
|
||||
function getFieldLabel_LoggerHelper($field,array $fieldRules,array $attributes=array()):string
|
||||
function getFieldLabel_LoggerHelper($field, array $fieldRules, array $attributes = array()): string
|
||||
{
|
||||
switch($field){
|
||||
switch ($field) {
|
||||
default:
|
||||
if(strpos($fieldRules[$field], 'required') !== false){
|
||||
array_push($attributes,'style="color:red";');
|
||||
if (strpos($fieldRules[$field], 'required') !== false) {
|
||||
array_push($attributes, 'style="color:red";');
|
||||
}
|
||||
return sprintf("<span %s>%s</span>",implode(" ",$attributes),lang('Logger.label.'.$field));
|
||||
return sprintf("<span %s>%s</span>", implode(" ", $attributes), lang("Admin/Logger.label.{$field}"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//header.php에서 getFieldForm_Helper사용
|
||||
function getFieldForm_LoggerHelper($field,$value,array $formOptions,array $attributes = array())
|
||||
function getFieldForm_LoggerHelper($field, $value, array $formOptions, array $attributes = array())
|
||||
{
|
||||
$value = is_null($value) ? DEFAULT_EMPTY:$value;
|
||||
switch($field){
|
||||
$value = is_null($value) ? DEFAULT_EMPTY : $value;
|
||||
switch ($field) {
|
||||
case 'user_uid':
|
||||
case 'status':
|
||||
return form_dropdown($field,$formOptions[$field],$value,$attributes);
|
||||
return form_dropdown($field, $formOptions[$field], $value, $attributes);
|
||||
break;
|
||||
case 'updated_at':
|
||||
case 'created_at':
|
||||
$attributes["class"] = !array_key_exists("class",$attributes) ? "calender":$attributes["class"]." calender";
|
||||
return form_input($field,$value,$attributes);
|
||||
$attributes["class"] = !array_key_exists("class", $attributes) ? "calender" : $attributes["class"] . " calender";
|
||||
return form_input($field, $value, $attributes);
|
||||
break;
|
||||
default:
|
||||
return form_input($field,$value,$attributes);
|
||||
return form_input($field, $value, $attributes);
|
||||
break;
|
||||
}
|
||||
} //
|
||||
|
||||
function getFieldView_LoggerHelper($field,$entity,array $fieldFilters,array $fieldFormOptions,array $attributes=array())
|
||||
function getFieldView_LoggerHelper($field, $entity, array $fieldFilters, array $fieldFormOptions, array $attributes = array())
|
||||
{
|
||||
switch($field){
|
||||
switch ($field) {
|
||||
case 'user_uid':
|
||||
return $fieldFormOptions[$field][$entity->$field];
|
||||
break;
|
||||
case 'status':
|
||||
return lang(sprintf("Logger.%s.%s",strtoupper($field),$entity->$field));
|
||||
return lang("Admin/Logger.label.{$entity->$field}");
|
||||
break;
|
||||
case 'content':
|
||||
return nl2br($entity->$field);
|
||||
break;
|
||||
default:
|
||||
if(in_array($field,$fieldFilters)){
|
||||
return getFieldForm_LoggerHelper($field,$entity->$field,$fieldFormOptions,$attributes);
|
||||
if (in_array($field, $fieldFilters)) {
|
||||
return getFieldForm_LoggerHelper($field, $entity->$field, $fieldFormOptions, $attributes);
|
||||
}
|
||||
return !isset($entity->$field) ? "{$field}:{$entity->uid}":$entity->$field;
|
||||
return !isset($entity->$field) ? "{$field}:{$entity->uid}" : $entity->$field;
|
||||
return $entity->$field;
|
||||
break;
|
||||
}
|
||||
} //
|
||||
|
||||
function getFieldIndex_Column_LoggerHelper($field,$order_field,$order_value,array $attributes = array())
|
||||
function getFieldIndex_Column_LoggerHelper($field, $order_field, $order_value, array $attributes = array())
|
||||
{
|
||||
$label = lang('Logger.label.'.$field);
|
||||
$label = $field == $order_field ? sprintf('%s <i class="fa fa-arrow-%s"></i>',$label,$order_value == 'ASC' ? "up":"down"):$label;
|
||||
$order_value = $order_value == 'DESC' ? "ASC":"DESC";
|
||||
return anchor(current_url()."?order_field={$field}&order_value={$order_value}",$label,$attributes);
|
||||
$label = lang("Admin/Logger.label.{$field}");
|
||||
$label = $field == $order_field ? sprintf('%s <i class="fa fa-arrow-%s"></i>', $label, $order_value == 'ASC' ? "up" : "down") : $label;
|
||||
$order_value = $order_value == 'DESC' ? "ASC" : "DESC";
|
||||
return anchor(current_url() . "?order_field={$field}&order_value={$order_value}", $label, $attributes);
|
||||
} //
|
||||
|
||||
function getFieldIndex_Row_LoggerHelper($field,array $row,array $fieldFilters,$fieldFormOptions,$attributes=array()): string
|
||||
function getFieldIndex_Row_LoggerHelper($field, array $row, array $fieldFilters, $fieldFormOptions, $attributes = array()): string
|
||||
{
|
||||
switch($field){
|
||||
switch ($field) {
|
||||
case 'title':
|
||||
return anchor(current_url().'/view/'.$row['uid'],$row[$field],["target"=>"_self"]);
|
||||
return anchor(current_url() . '/view/' . $row['uid'], $row[$field], ["target" => "_self"]);
|
||||
break;
|
||||
case 'user_uid':
|
||||
case 'status':
|
||||
@ -73,12 +73,12 @@ function getFieldIndex_Row_LoggerHelper($field,array $row,array $fieldFilters,$f
|
||||
break;
|
||||
case 'updated_at':
|
||||
case 'created_at':
|
||||
return str_split($row[$field],10)[0];
|
||||
return str_split($row[$field], 10)[0];
|
||||
break;
|
||||
default:
|
||||
if(in_array($field,$fieldFilters)){
|
||||
$attributes["onChange"]=sprintf('location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value',current_url(),$row['uid'],$field,$field);
|
||||
return getFieldForm_LoggerHelper($field,$row[$field],$fieldFormOptions,$attributes);
|
||||
if (in_array($field, $fieldFilters)) {
|
||||
$attributes["onChange"] = sprintf('location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value', current_url(), $row['uid'], $field, $field);
|
||||
return getFieldForm_LoggerHelper($field, $row[$field], $fieldFormOptions, $attributes);
|
||||
}
|
||||
return $row[$field];
|
||||
break;
|
||||
|
||||
@ -1,76 +1,76 @@
|
||||
<?php
|
||||
function getFieldLabel_MapurlHelper($field,array $fieldRules,array $attributes=array()):string
|
||||
function getFieldLabel_MapurlHelper($field, array $fieldRules, array $attributes = array()): string
|
||||
{
|
||||
switch($field){
|
||||
switch ($field) {
|
||||
default:
|
||||
if(strpos($fieldRules[$field], 'required') !== false){
|
||||
array_push($attributes,'style="color:red";');
|
||||
if (strpos($fieldRules[$field], 'required') !== false) {
|
||||
array_push($attributes, 'style="color:red";');
|
||||
}
|
||||
return sprintf("<span %s>%s</span>",implode(" ",$attributes),lang('Mapurl.label.'.$field));
|
||||
return sprintf("<span %s>%s</span>", implode(" ", $attributes), lang("Admin/Mapurl.label.{$field}"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//header.php에서 getFieldForm_Helper사용
|
||||
function getFieldForm_MapurlHelper($field,$value,array $formOptions,array $attributes = array())
|
||||
function getFieldForm_MapurlHelper($field, $value, array $formOptions, array $attributes = array())
|
||||
{
|
||||
$value = is_null($value) ? DEFAULT_EMPTY:$value;
|
||||
switch($field){
|
||||
$value = is_null($value) ? DEFAULT_EMPTY : $value;
|
||||
switch ($field) {
|
||||
case 'status':
|
||||
return form_dropdown($field,$formOptions[$field],$value,$attributes);
|
||||
return form_dropdown($field, $formOptions[$field], $value, $attributes);
|
||||
break;
|
||||
case 'updated_at':
|
||||
case 'created_at':
|
||||
$attributes["class"] = !array_key_exists("class",$attributes) ? "calender":$attributes["class"]." calender";
|
||||
return form_input($field,$value,$attributes);
|
||||
$attributes["class"] = !array_key_exists("class", $attributes) ? "calender" : $attributes["class"] . " calender";
|
||||
return form_input($field, $value, $attributes);
|
||||
break;
|
||||
default:
|
||||
return form_input($field,$value,$attributes);
|
||||
return form_input($field, $value, $attributes);
|
||||
break;
|
||||
}
|
||||
} //
|
||||
|
||||
function getFieldView_MapurlHelper($field,$entity,array $fieldFilters,array $fieldFormOptions,array $attributes=array())
|
||||
function getFieldView_MapurlHelper($field, $entity, array $fieldFilters, array $fieldFormOptions, array $attributes = array())
|
||||
{
|
||||
switch($field){
|
||||
switch ($field) {
|
||||
case 'status':
|
||||
return lang(sprintf("Mapurl.%s.%s",strtoupper($field),$entity->$field));
|
||||
return lang("Admin/Mapurl.label.{$entity->$field}");
|
||||
break;
|
||||
default:
|
||||
if(in_array($field,$fieldFilters)){
|
||||
return getFieldForm_UserHelper($field,$entity->$field,$fieldFormOptions,$attributes);
|
||||
if (in_array($field, $fieldFilters)) {
|
||||
return getFieldForm_MapurlHelper($field, $entity->$field, $fieldFormOptions, $attributes);
|
||||
}
|
||||
return $entity->$field;
|
||||
break;
|
||||
}
|
||||
} //
|
||||
|
||||
function getFieldIndex_Column_MapurlHelper($field,$order_field,$order_value,array $attributes = array())
|
||||
function getFieldIndex_Column_MapurlHelper($field, $order_field, $order_value, array $attributes = array())
|
||||
{
|
||||
$label = lang('Mapurl.label.'.$field);
|
||||
$label = $field == $order_field ? sprintf('%s <i class="fa fa-arrow-%s"></i>',$label,$order_value == 'ASC' ? "up":"down"):$label;
|
||||
$order_value = $order_value == 'DESC' ? "ASC":"DESC";
|
||||
return anchor(current_url()."?order_field={$field}&order_value={$order_value}",$label,$attributes);
|
||||
$label = lang("Admin/Mapurl.label.{$field}");
|
||||
$label = $field == $order_field ? sprintf('%s <i class="fa fa-arrow-%s"></i>', $label, $order_value == 'ASC' ? "up" : "down") : $label;
|
||||
$order_value = $order_value == 'DESC' ? "ASC" : "DESC";
|
||||
return anchor(current_url() . "?order_field={$field}&order_value={$order_value}", $label, $attributes);
|
||||
} //
|
||||
|
||||
function getFieldIndex_Row_MapurlHelper($field,array $row,array $fieldFilters,$fieldFormOptions,$attributes=array()): string
|
||||
function getFieldIndex_Row_MapurlHelper($field, array $row, array $fieldFilters, $fieldFormOptions, $attributes = array()): string
|
||||
{
|
||||
|
||||
switch($field){
|
||||
switch ($field) {
|
||||
case 'oldurl':
|
||||
return sprintf('<div style="text-align:left;">%s</div>',anchor(current_url().'/view/'.$row['uid'],$row[$field],["target"=>"_self"]));
|
||||
return sprintf('<div style="text-align:left;">%s</div>', anchor(current_url() . '/view/' . $row['uid'], $row[$field], ["target" => "_self"]));
|
||||
break;
|
||||
case 'newurl':
|
||||
return sprintf('<div style="text-align:left;">%s</div>',$row[$field]);
|
||||
return sprintf('<div style="text-align:left;">%s</div>', $row[$field]);
|
||||
break;
|
||||
case 'updated_at':
|
||||
case 'created_at':
|
||||
return str_split($row[$field],10)[0];
|
||||
return str_split($row[$field], 10)[0];
|
||||
break;
|
||||
default:
|
||||
if(in_array($field,$fieldFilters)){
|
||||
$attributes["onChange"]=sprintf('location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value',current_url(),$row['uid'],$field,$field);
|
||||
return getFieldForm_MapurlHelper($field,$row[$field],$fieldFormOptions,$attributes);
|
||||
if (in_array($field, $fieldFilters)) {
|
||||
$attributes["onChange"] = sprintf('location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value', current_url(), $row['uid'], $field, $field);
|
||||
return getFieldForm_MapurlHelper($field, $row[$field], $fieldFormOptions, $attributes);
|
||||
}
|
||||
return $row[$field];
|
||||
break;
|
||||
|
||||
@ -1,78 +1,78 @@
|
||||
<?php
|
||||
function getFieldLabel_UserHelper($field,array $fieldRules,array $attributes=array()):string
|
||||
function getFieldLabel_UserHelper($field, array $fieldRules, array $attributes = array()): string
|
||||
{
|
||||
switch($field){
|
||||
switch ($field) {
|
||||
default:
|
||||
if(strpos($fieldRules[$field], 'required') !== false){
|
||||
array_push($attributes,'style="color:red";');
|
||||
if (strpos($fieldRules[$field], 'required') !== false) {
|
||||
array_push($attributes, 'style="color:red";');
|
||||
}
|
||||
return sprintf("<span %s>%s</span>",implode(" ",$attributes),lang('User.label.'.$field));
|
||||
return sprintf("<span %s>%s</span>", implode(" ", $attributes), lang("Admin/User.label.{$field}"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//header.php에서 getFieldForm_Helper사용
|
||||
function getFieldForm_UserHelper($field,$value,array $formOptions,array $attributes = array())
|
||||
function getFieldForm_UserHelper($field, $value, array $formOptions, array $attributes = array())
|
||||
{
|
||||
$value = is_null($value) ? DEFAULT_EMPTY:$value;
|
||||
switch($field){
|
||||
$value = is_null($value) ? DEFAULT_EMPTY : $value;
|
||||
switch ($field) {
|
||||
case 'role':
|
||||
case 'status':
|
||||
return form_dropdown($field,$formOptions[$field],$value,$attributes);
|
||||
return form_dropdown($field, $formOptions[$field], $value, $attributes);
|
||||
break;
|
||||
case 'updated_at':
|
||||
case 'created_at':
|
||||
$attributes["class"] = !array_key_exists("class",$attributes) ? "calender":$attributes["class"]." calender";
|
||||
return form_input($field,$value,$attributes);
|
||||
$attributes["class"] = !array_key_exists("class", $attributes) ? "calender" : $attributes["class"] . " calender";
|
||||
return form_input($field, $value, $attributes);
|
||||
break;
|
||||
case 'passwd':
|
||||
case 'confirmpassword':
|
||||
return form_password($field,DEFAULT_EMPTY,$attributes);
|
||||
return form_password($field, DEFAULT_EMPTY, $attributes);
|
||||
break;
|
||||
default:
|
||||
return form_input($field,$value,$attributes);
|
||||
return form_input($field, $value, $attributes);
|
||||
break;
|
||||
}
|
||||
} //
|
||||
|
||||
function getFieldView_UserHelper($field,$entity,array $fieldFilters,array $fieldFormOptions,array $attributes=array())
|
||||
function getFieldView_UserHelper($field, $entity, array $fieldFilters, array $fieldFormOptions, array $attributes = array())
|
||||
{
|
||||
switch($field){
|
||||
switch ($field) {
|
||||
case 'role':
|
||||
case 'status':
|
||||
return lang(sprintf("User.%s.%s",strtoupper($field),$entity->$field));
|
||||
return lang("Admin/User.label.{$entity->$field}");
|
||||
break;
|
||||
default:
|
||||
if(in_array($field,$fieldFilters)){
|
||||
return getFieldForm_UserHelper($field,$entity->$field,$fieldFormOptions,$attributes);
|
||||
if (in_array($field, $fieldFilters)) {
|
||||
return getFieldForm_UserHelper($field, $entity->$field, $fieldFormOptions, $attributes);
|
||||
}
|
||||
return $entity->$field;
|
||||
break;
|
||||
}
|
||||
} //
|
||||
|
||||
function getFieldIndex_Column_UserHelper($field,$order_field,$order_value,array $attributes = array())
|
||||
function getFieldIndex_Column_UserHelper($field, $order_field, $order_value, array $attributes = array())
|
||||
{
|
||||
$label = lang('User.label.'.$field);
|
||||
$label = $field == $order_field ? sprintf('%s <i class="fa fa-arrow-%s"></i>',$label,$order_value == 'ASC' ? "up":"down"):$label;
|
||||
$order_value = $order_value == 'DESC' ? "ASC":"DESC";
|
||||
return anchor(current_url()."?order_field={$field}&order_value={$order_value}",$label,$attributes);
|
||||
$label = lang("Admin/User.label.{$field}");
|
||||
$label = $field == $order_field ? sprintf('%s <i class="fa fa-arrow-%s"></i>', $label, $order_value == 'ASC' ? "up" : "down") : $label;
|
||||
$order_value = $order_value == 'DESC' ? "ASC" : "DESC";
|
||||
return anchor(current_url() . "?order_field={$field}&order_value={$order_value}", $label, $attributes);
|
||||
} //
|
||||
|
||||
function getFieldIndex_Row_UserHelper($field,array $row,array $fieldFilters,$fieldFormOptions,$attributes=array()): string
|
||||
function getFieldIndex_Row_UserHelper($field, array $row, array $fieldFilters, $fieldFormOptions, $attributes = array()): string
|
||||
{
|
||||
switch($field){
|
||||
switch ($field) {
|
||||
case 'id':
|
||||
return anchor(current_url().'/view/'.$row['uid'],$row[$field],["target"=>"_self"]);
|
||||
return anchor(current_url() . '/view/' . $row['uid'], $row[$field], ["target" => "_self"]);
|
||||
break;
|
||||
case 'updated_at':
|
||||
case 'created_at':
|
||||
return str_split($row[$field],10)[0];
|
||||
return str_split($row[$field], 10)[0];
|
||||
break;
|
||||
default:
|
||||
if(in_array($field,$fieldFilters)){
|
||||
$attributes["onChange"]=sprintf('location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value',current_url(),$row['uid'],$field,$field);
|
||||
return getFieldForm_UserHelper($field,$row[$field],$fieldFormOptions,$attributes);
|
||||
if (in_array($field, $fieldFilters)) {
|
||||
$attributes["onChange"] = sprintf('location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value', current_url(), $row['uid'], $field, $field);
|
||||
return getFieldForm_UserHelper($field, $row[$field], $fieldFormOptions, $attributes);
|
||||
}
|
||||
return $row[$field];
|
||||
break;
|
||||
|
||||
@ -24,4 +24,4 @@ return [
|
||||
"use" => "사용",
|
||||
"unuse" => "사용않함",
|
||||
]
|
||||
];
|
||||
];
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
</div>
|
||||
<div class="indexTable_tail">
|
||||
<?= $pagination ?>
|
||||
<?= $this->include('admin/cloudflare/record/insert'); ?>
|
||||
<?= $this->include('admin/cloudflare/api/record/insert'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?= $this->include('templates/admin/footer'); ?>
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<?= validation_show_error('zone_uid'); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= form_dropdown('type', array_merge(["" => "Type 선택"], lang('Cloudflare/Record.TYPE')), old('type')) ?>
|
||||
<?= form_dropdown('type', array_merge(["" => "Type 선택"], lang('Admin/Cloudflare/API/Record.TYPE')), old('type')) ?>
|
||||
<?= validation_show_error('type'); ?>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
</div>
|
||||
<div class="indexTable_tail">
|
||||
<?= $pagination ?>
|
||||
<?= $this->include('admin/cloudflare/zone/insert'); ?>
|
||||
<?= $this->include('admin/cloudflare/api/zone/insert'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?= $this->include('templates/admin/footer'); ?>
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
<?= validation_show_error('account_uid'); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= form_dropdown('type', array_merge(["" => "Type 선택"], lang('Cloudflare/Record.TYPE')), old('type')) ?>
|
||||
<?= form_dropdown('type', array_merge(["" => "Type 선택"], lang('Admin/Cloudflare/API/Record.TYPE')), old('type')) ?>
|
||||
<?= validation_show_error('type'); ?>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@ -1,66 +0,0 @@
|
||||
<?= $this->extend('layouts/admin') ?>
|
||||
<?= $this->section('content') ?>
|
||||
<?= $this->include('templates/admin/header'); ?>
|
||||
<?= $this->include('templates/admin/index/header'); ?>
|
||||
<table class="table table-bordered table-hover table-striped indexTable ">
|
||||
<tr>
|
||||
<td>번호</td>
|
||||
<?php foreach ($fields as $field) : ?>
|
||||
<td><?= getIndexSort_Helper($field,getFieldLabel_Helper($field),["target" => "_self"]) ?></td>
|
||||
<?php endforeach; ?>
|
||||
<td>작업</td>
|
||||
</tr>
|
||||
<?php $i = 0; ?>
|
||||
<?php foreach ($rows as $row) : ?>
|
||||
<tr <?= $row['status'] != 'use' ? 'style="color:red;"' : '' ?>>
|
||||
<td><?= anchor(current_url().'/update/'.$row['uid'],$total_count - (($page - 1) * $per_page + $i),["target" => "_self"]) ?></td>
|
||||
<?php foreach ($fields as $field) : ?><td><?= getFieldView_Helper($field,$row) ?></td><?php endforeach; ?>
|
||||
<td><?= anchor(current_url().'/view/'.$row['uid'],ICONS['DELETE'],["class"=>"btn btn-sm btn-danger btn-circle","target" => "_self"]) ?></td>
|
||||
</tr>
|
||||
<?php $i++; ?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<div class="pagenation"><?= $pagenation ?></div>
|
||||
<div class="indexAction"><?= anchor(current_url().'/insert','입력',["class"=>"btn btn-sm btn-primary btn-circle","target" => "_self"]) ?></div>
|
||||
<?= $this->include('templates/admin/footer'); ?>
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="UserModal" tabindex="-1" role="dialog" aria-labelledby="UserModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Modal title</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
</div>
|
||||
<div class="modal-body"><iframe width="100%" height="100%" frameborder="0" allowfullscreen></iframe></div>
|
||||
<div class="modal-footer"><button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.modal-dialog, .modal-body {
|
||||
width: 560px;
|
||||
height:400px !important;
|
||||
}
|
||||
.modal-header {
|
||||
background-color: #557AB7;
|
||||
padding:5px 5px;
|
||||
color:#FFF;
|
||||
border-bottom:2px dashed #557AB7;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#modalButtion").click(function(e) {
|
||||
//e.preventDefault();
|
||||
//$("#UserModal modal-title").innerHTML="입력";
|
||||
|
||||
var url = $(this).attr("data-href");
|
||||
var iframe = $("#UserModal iframe");
|
||||
iframe.attr("src",url);
|
||||
|
||||
// alert(iframe.parent.attr.height());
|
||||
// iframe.parent.attr.height = iframe.contents().height();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
Loading…
Reference in New Issue
Block a user