顧客様の作成・削除
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,7 +1,7 @@
|
||||
data/*.pem
|
||||
data/*.txt
|
||||
data/*.json
|
||||
data/cache/*.json
|
||||
data/cache
|
||||
data/user/*.json
|
||||
log/*.txt
|
||||
public/static/user
|
||||
|
||||
@@ -6,7 +6,10 @@ textarea {
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
button {
|
||||
button, a.op-button {
|
||||
text-decoration: none;
|
||||
padding: 4px;
|
||||
margin: 4px;
|
||||
border: 1px solid #ea79d8;
|
||||
color: #fcfcfc;
|
||||
border-radius: 4px;
|
||||
@@ -15,10 +18,59 @@ button {
|
||||
transition: background-color 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
a.op-button-delete {
|
||||
text-decoration: none;
|
||||
padding: 4px;
|
||||
margin: 4px;
|
||||
border: 1px solid #ee5040;
|
||||
color: #fcfcfc;
|
||||
border-radius: 4px;
|
||||
background: #ee5040;
|
||||
font-size: 16px;
|
||||
transition: background-color 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
a.op-button-create {
|
||||
text-decoration: none;
|
||||
padding: 4px;
|
||||
margin: 4px;
|
||||
border: 1px solid #17c73d;
|
||||
color: #fcfcfc;
|
||||
border-radius: 4px;
|
||||
background: #17c73d;
|
||||
font-size: 16px;
|
||||
transition: background-color 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
a.op-button-edit {
|
||||
text-decoration: none;
|
||||
padding: 4px;
|
||||
margin: 4px;
|
||||
border: 1px solid #dbd81d;
|
||||
color: #232023;
|
||||
border-radius: 4px;
|
||||
background: #dbd81d;
|
||||
font-size: 16px;
|
||||
transition: background-color, color 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
button:hover, a.op-button:hover {
|
||||
background-color: #b421f8;
|
||||
}
|
||||
|
||||
a.op-button-delete:hover {
|
||||
background-color: #8d0707;
|
||||
}
|
||||
|
||||
a.op-button-create:hover {
|
||||
background-color: #077907;
|
||||
}
|
||||
|
||||
a.op-button-edit:hover {
|
||||
background-color: #9fa10d;
|
||||
color: #fcfcfc;
|
||||
}
|
||||
|
||||
tr.status-free { background-color: #34860e; color: #fff; }
|
||||
tr.status-reserved { background-color: #c59e1d; color: #fff; }
|
||||
tr.status-use { background-color: #850000; color: #fff; }
|
||||
|
||||
@@ -97,7 +97,8 @@ if (ATOM_ENABLED) {
|
||||
if (OPENPROVIDER_ENABLED) {
|
||||
$routes[] = Route::add('GET', 'openprovider', Op::class.'@index');
|
||||
$routes[] = Route::add('GET', 'openprovider/listcustomers', Op::class.'@opListCustomers');
|
||||
$routes[] = Route::add('GET', 'openprovider/createcustomer', Op::class.'@opCreateCustomers');
|
||||
$routes[] = Route::add('GET', 'openprovider/createcustomer', Op::class.'@opCreateCustomer');
|
||||
$routes[] = Route::add('GET', 'openprovider/deletecustomer/{handle}', Op::class.'@opDeleteCustomer');
|
||||
$routes[] = Route::add('GET', 'openprovider/getcustomer/{handle}', Op::class.'@opGetCustomer');
|
||||
$routes[] = Route::add('GET', 'openprovider/listtlds', Op::class.'@opListTlds');
|
||||
$routes[] = Route::add('GET', 'openprovider/gettld/{tld}', Op::class.'@opGetTld');
|
||||
|
||||
@@ -40,8 +40,8 @@ namespace Site\Controller;
|
||||
use Site\Controller\Mods;
|
||||
use Std\Lib\Auth;
|
||||
use Std\Lib\Template;
|
||||
|
||||
use Std\Lib\Openprovider;
|
||||
use Roles;
|
||||
|
||||
class Op {
|
||||
use Mods;
|
||||
@@ -63,7 +63,7 @@ class Op {
|
||||
$tmpl->assign('menu', $this->getMenu());
|
||||
$tmpl->assign('description', $description);
|
||||
|
||||
if (!$user || $user->role !== \Roles::ADMIN) goto noaccess;
|
||||
if (!$user || $user->role !== Roles::ADMIN) goto noaccess;
|
||||
$tmpl->addCss('table');
|
||||
$tmpl->render('index');
|
||||
exit();
|
||||
@@ -92,7 +92,7 @@ class Op {
|
||||
$tmpl->assign('menu', $this->getMenu());
|
||||
$tmpl->assign('description', $description);
|
||||
|
||||
if (!$user || $user->role !== \Roles::ADMIN) goto noaccess;
|
||||
if (!$user || $user->role !== Roles::ADMIN) goto noaccess;
|
||||
$op = new Openprovider();
|
||||
$op->login();
|
||||
$data = $op->listCustomers();
|
||||
@@ -111,39 +111,44 @@ class Op {
|
||||
|
||||
public function opCreateCustomer(array $params): void {
|
||||
try {
|
||||
kys('sasa');
|
||||
if (isset($_POST)) kys($_POST);
|
||||
$payload = [
|
||||
'additional_data' => [
|
||||
'company_registration_number' => '',
|
||||
'company_url' => '',
|
||||
'company_registration_number' => $_POST['company_registration_number'] ?? '',
|
||||
'company_url' => $_POST['company_url'] ?? '',
|
||||
'birth_date' => $_POST['birth_year'] !== '' && $_POST['birth_month'] !== '' && $_POST['birth_day'] !== '' ? $_POST['birth_year'].'-'.$_POST['birth_month'].'-'.$_POST['birth_day'] : '',
|
||||
'trading_name' => $_POST['company_name'] ?? '',
|
||||
],
|
||||
'address' => [
|
||||
'city' => '',
|
||||
'country' => '',
|
||||
'number' => '',
|
||||
'state' => '',
|
||||
'street' => '',
|
||||
'zipcode' => '',
|
||||
'city' => $_POST['address_city'] ?? '',
|
||||
'country' => $_POST['address_country'] ?? 'JP',
|
||||
'number' => $_POST['address_number'] ?? '',
|
||||
'state' => $_POST['address_state'] ?? '',
|
||||
'street' => $_POST['address_street'] ?? '',
|
||||
'zipcode' => $_POST['address_zipcode'] ?? '',
|
||||
],
|
||||
'comments' => '',
|
||||
'company_name' => '',
|
||||
'email' => '',
|
||||
'birth' => [
|
||||
'year' => $_POST['birth_year'] ?? '',
|
||||
'month' => $_POST['birth_month'] ?? '',
|
||||
'day' => $_POST['birth_day'] ?? '',
|
||||
],
|
||||
'comments' => $_POST['comments'] ?? '',
|
||||
'company_name' => $_POST['company_name'] ?? '',
|
||||
'email' => $_POST['email'] ?? '',
|
||||
'fax' => [
|
||||
'area_code' => '',
|
||||
'country_code' => '',
|
||||
'subscriber_number' => '',
|
||||
'area_code' => $_POST['fax_area_code'] ?? '',
|
||||
'country_code' => $_POST['fax_country_code'] ?? '',
|
||||
'subscriber_number' => $_POST['fax_subscriber_number'] ?? '',
|
||||
],
|
||||
'locale' => 'ja_JP',
|
||||
'name' => [
|
||||
'first_name' => '',
|
||||
'full_name' => '',
|
||||
'last_name' => '',
|
||||
'first_name' => $_POST['first_name'] ?? '',
|
||||
'full_name' => $_POST['first_name'] !== '' && $_POST['last_name'] !== '' ? $_POST['first_name'].' '.$_POST['last_name'] : '',
|
||||
'last_name' => $_POST['last_name'] ?? '',
|
||||
],
|
||||
'phone' => [
|
||||
'area_code' => '',
|
||||
'country_code' => '',
|
||||
'subscriber_number' => '',
|
||||
'area_code' => $_POST['phone_area_code'] ?? '',
|
||||
'country_code' => $_POST['phone_country_code'] ?? '',
|
||||
'subscriber_number' => $_POST['phone_subscriber_number'] ?? '',
|
||||
],
|
||||
];
|
||||
$tmpl = new Template('/openprovider/');
|
||||
@@ -161,19 +166,43 @@ class Op {
|
||||
$tmpl->assign('menu', $this->getMenu());
|
||||
$tmpl->assign('description', $description);
|
||||
|
||||
if (!$user || $user->role !== \Roles::ADMIN) goto noaccess;
|
||||
if (isset($_POST)) {
|
||||
$err = [];
|
||||
|
||||
if (!$user || $user->role !== Roles::ADMIN) goto noaccess;
|
||||
|
||||
if (!empty($_POST)) {
|
||||
if (NULL === $_POST['last_name'] || $_POST['last_name'] === ''
|
||||
|| NULL === $_POST['first_name'] || $_POST['first_name'] === '') $err[] = '姓名をご入力下さい。';
|
||||
if (NULL === $_POST['phone_country_code'] || $_POST['phone_country_code'] === ''
|
||||
|| NULL === $_POST['phone_area_code'] || $_POST['phone_area_code'] === ''
|
||||
|| NULL === $_POST['phone_subscriber_number'] || $_POST['phone_subscriber_number'] === '') $err[] = '電話番号をご入力下さい。';
|
||||
if (NULL === $_POST['email'] || $_POST['email'] === '') $err[] = 'メールアドレスをご入力下さい。';
|
||||
if (NULL === $_POST['address_zipcode'] || $_POST['address_zipcode'] === '') $err[] = '郵便番号をご入力下さい。';
|
||||
if (NULL === $_POST['address_state'] || $_POST['address_state'] === '') $err[] = '都道府県をご入力下さい。';
|
||||
if (NULL === $_POST['address_city'] || $_POST['address_city'] === '') $err[] = '市区町村をご入力下さい。';
|
||||
if (NULL === $_POST['address_street'] || $_POST['address_street'] === '') $err[] = '町名をご入力下さい。';
|
||||
if (NULL === $_POST['address_number'] || $_POST['address_number'] === '') $err[] = '番地をご入力下さい。';
|
||||
if (!empty($err)) goto render;
|
||||
|
||||
if (!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) $err[] = 'メールアドレスは不正です。';
|
||||
if (!str_starts_with($_POST['phone_country_code'], '+')) $err[] = '電話番号の国コードは「+」ご始まり下さい。';
|
||||
if ($_POST['fax_country_code'] !== '' && !str_starts_with($_POST['fax_country_code'], '+')) $err[] = 'FAXの国コードは「+」ご始まり下さい。';
|
||||
if ((!filter_var($_POST['phone_area_code'], FILTER_VALIDATE_INT)) || (!filter_var($_POST['phone_subscriber_number'], FILTER_VALIDATE_INT))) $err[] = '電話番号は数字をご入力下さい。';
|
||||
if (($_POST['fax_area_code'] !== '' || $_POST['fax_subscriber_number'] !== '') && (!filter_var($_POST['fax_area_code'], FILTER_VALIDATE_INT) || !filter_var($_POST['fax_subscriber_number'], FILTER_VALIDATE_INT))) $err[] = 'FAXは数字をご入力下さい。';
|
||||
if (!empty($err)) goto render;
|
||||
|
||||
$op = new Openprovider();
|
||||
$op->login();
|
||||
$data = $op->createCustomer($_POST, true);
|
||||
kys($data->data);
|
||||
header("Location: /openprovider/getcustomer/{$data->data['handle']}");
|
||||
$data = $op->createCustomer($payload, true);
|
||||
header("Location: /openprovider/getcustomer/{$data->data['data']['handle']}");
|
||||
exit();
|
||||
}
|
||||
|
||||
render:
|
||||
$tmpl->assign('err', $err);
|
||||
$tmpl->assign('data', $payload);
|
||||
$tmpl->addCss('openprovider');
|
||||
$tmpl->render('createcustomer');
|
||||
kys('sasa');
|
||||
|
||||
exit();
|
||||
|
||||
@@ -207,13 +236,14 @@ class Op {
|
||||
$tmpl->assign('menu', $this->getMenu());
|
||||
$tmpl->assign('description', $description);
|
||||
|
||||
if (!$user || $user->role !== \Roles::ADMIN) goto noaccess;
|
||||
if (!$user || $user->role !== Roles::ADMIN) goto noaccess;
|
||||
$op = new Openprovider();
|
||||
$op->login();
|
||||
$data = $op->getCustomer($handle, true);
|
||||
$tmpl->assign('data', $data->data);
|
||||
|
||||
$tmpl->addCss('table');
|
||||
$tmpl->addCss('openprovider');
|
||||
$tmpl->render('getcustomer');
|
||||
exit();
|
||||
|
||||
@@ -224,6 +254,58 @@ class Op {
|
||||
}
|
||||
}
|
||||
|
||||
public function opDeleteCustomer(array $params): void {
|
||||
try {
|
||||
$handle = '';
|
||||
if (isset($params['handle'])) $handle = $params['handle'];
|
||||
if ($handle === '') {
|
||||
header('Location: /openprovider/listcustomers');
|
||||
exit();
|
||||
}
|
||||
assert_not_null($handle);
|
||||
$tmpl = new Template('/openprovider/');
|
||||
$pagetit = "OpenProvider管理 - 顧客様「{$handle}」の表示";
|
||||
$description = '';
|
||||
|
||||
// ユーザー
|
||||
$auth = new Auth();
|
||||
$user = $auth->getLoggedInUser();
|
||||
$tmpl->assign('user', $user);
|
||||
|
||||
$tmpl->assign('pagetit', $pagetit);
|
||||
$tmpl->assign('curPage', 'openprovider');
|
||||
$tmpl->assign('custCss', true);
|
||||
$tmpl->assign('menu', $this->getMenu());
|
||||
$tmpl->assign('description', $description);
|
||||
|
||||
if (!$user || $user->role !== Roles::ADMIN) goto noaccess;
|
||||
if (empty($_POST)) goto render_confirm;
|
||||
|
||||
if (isset($_POST['delete_reject'])) {
|
||||
header("Location: /openprovider/getcustomer/{$handle}");
|
||||
exit();
|
||||
} else if (isset($_POST['delete_confirm'])) {
|
||||
$op = new Openprovider();
|
||||
$op->login();
|
||||
$op->deleteCustomer($handle);
|
||||
}
|
||||
|
||||
header('Location: /openprovider/listcustomers');
|
||||
exit();
|
||||
|
||||
render_confirm:
|
||||
$tmpl->assign('handle', $handle);
|
||||
$tmpl->addCss('openprovider');
|
||||
$tmpl->render('deletecustomer');
|
||||
exit();
|
||||
|
||||
noaccess:
|
||||
$tmpl->render('nopermission');
|
||||
} catch (\Exception $e) {
|
||||
throw new \Exception($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public function opListTlds(array $params): void {
|
||||
try {
|
||||
$tmpl = new Template('/openprovider/');
|
||||
@@ -241,7 +323,7 @@ class Op {
|
||||
$tmpl->assign('menu', $this->getMenu());
|
||||
$tmpl->assign('description', $description);
|
||||
|
||||
if (!$user || $user->role !== \Roles::ADMIN) goto noaccess;
|
||||
if (!$user || $user->role !== Roles::ADMIN) goto noaccess;
|
||||
$op = new Openprovider();
|
||||
$op->login();
|
||||
$data = $op->listTlds();
|
||||
@@ -281,7 +363,7 @@ class Op {
|
||||
$tmpl->assign('menu', $this->getMenu());
|
||||
$tmpl->assign('description', $description);
|
||||
|
||||
if (!$user || $user->role !== \Roles::ADMIN) goto noaccess;
|
||||
if (!$user || $user->role !== Roles::ADMIN) goto noaccess;
|
||||
$op = new Openprovider();
|
||||
$op->login();
|
||||
$data = $op->getTld($tld);
|
||||
@@ -315,7 +397,7 @@ class Op {
|
||||
$tmpl->assign('menu', $this->getMenu());
|
||||
$tmpl->assign('description', $description);
|
||||
|
||||
if (!$user || $user->role !== \Roles::ADMIN) goto noaccess;
|
||||
if (!$user || $user->role !== Roles::ADMIN) goto noaccess;
|
||||
$op = new Openprovider();
|
||||
$op->login();
|
||||
$data = $op->listDomains($domains, true);
|
||||
@@ -355,7 +437,7 @@ class Op {
|
||||
$tmpl->assign('menu', $this->getMenu());
|
||||
$tmpl->assign('description', $description);
|
||||
|
||||
if (!$user || $user->role !== \Roles::ADMIN) goto noaccess;
|
||||
if (!$user || $user->role !== Roles::ADMIN) goto noaccess;
|
||||
$op = new Openprovider();
|
||||
$op->login();
|
||||
if (!empty($domains)) {
|
||||
@@ -398,7 +480,7 @@ class Op {
|
||||
$tmpl->assign('menu', $this->getMenu());
|
||||
$tmpl->assign('description', $description);
|
||||
|
||||
if (!$user || $user->role !== \Roles::ADMIN) goto noaccess;
|
||||
if (!$user || $user->role !== Roles::ADMIN) goto noaccess;
|
||||
$op = new Openprovider();
|
||||
$op->login();
|
||||
$data = $op->getDomainPrices(['domain.name' => $domainname, 'domain.extension' => $domainext]);
|
||||
@@ -432,14 +514,14 @@ class Op {
|
||||
$tmpl->assign('menu', $this->getMenu());
|
||||
$tmpl->assign('description', $description);
|
||||
|
||||
if (!$user || $user->role !== \Roles::ADMIN) goto noaccess;
|
||||
if (!$user || $user->role !== Roles::ADMIN) goto noaccess;
|
||||
$op = new Openprovider();
|
||||
$op->login();
|
||||
$data = $op->listDnsZones();
|
||||
$tmpl->assign('data', $data->data);
|
||||
|
||||
$tmpl->addCss('table');
|
||||
if ($user && $user->role & (\Roles::ADMIN)) $tmpl->render('listdnszones');
|
||||
if ($user && $user->role & (Roles::ADMIN)) $tmpl->render('listdnszones');
|
||||
else goto noaccess;
|
||||
exit();
|
||||
|
||||
@@ -473,7 +555,7 @@ class Op {
|
||||
$tmpl->assign('menu', $this->getMenu());
|
||||
$tmpl->assign('description', $description);
|
||||
|
||||
if (!$user || $user->role !== \Roles::ADMIN) goto noaccess;
|
||||
if (!$user || $user->role !== Roles::ADMIN) goto noaccess;
|
||||
$op = new Openprovider();
|
||||
$op->login();
|
||||
$data = ['rec' => $op->listZoneRecords($domain), 'zone' => $op->getDnsZone($domain)];
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,12 @@
|
||||
{@ include(common/header) @}
|
||||
<h2>新規顧客様作成</h2>
|
||||
{@ if (!empty($err)) @}
|
||||
<p class="errormes">
|
||||
{@ foreach ($err as $e) @}
|
||||
{{ $e }}<br />
|
||||
{@ endforeach @}
|
||||
</p>
|
||||
{@ endif @}
|
||||
<p>
|
||||
<form method="POST" action="/openprovider/createcustomer">
|
||||
<h3>会社情報</h3>
|
||||
@@ -8,58 +15,54 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><label for="company_name">会社名</label></td>
|
||||
<td><input type="text" name="company_name" value="{{ $data['company_name'] }}" /></td>
|
||||
<td><input type="text" name="company_name" value="{{ $data['company_name'] ?? '' }}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="company_registration_number">法人番号</label></td>
|
||||
<td><input type="text" name="company_registration_number" value="{{ $data['company_registration_number'] }}" /></td>
|
||||
<td><input type="text" name="company_registration_number" value="{{ $data['additional_data']['company_registration_number'] ?? '' }}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="company_url">ウェブサイト</label></td>
|
||||
<td><input type="text" name="company_url" value="{{ $data['company_url'] }}" /></td>
|
||||
<td><input type="text" name="company_url" value="{{ $data['additional_data']['company_url'] ?? '' }}" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>個人情報</h3>
|
||||
telephone number (req)
|
||||
fax number
|
||||
email address (req)
|
||||
birth date
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><label for="last_name">姓名(ローマ字)*</label></td>
|
||||
<td>
|
||||
<input type="text" name="last_name" placeholder="Taro" value="{{ $data['last_name'] }}" />
|
||||
<input type="text" name="first_name" placeholder="Yamada" value="{{ $data['first_name'] }}" />
|
||||
<input type="text" name="last_name" placeholder="Taro" value="{{ $data['name']['last_name'] ?? '' }}" />
|
||||
<input type="text" name="first_name" placeholder="Yamada" value="{{ $data['name']['first_name'] ?? '' }}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="phone.country_code">電話番号*</label></td>
|
||||
<td>
|
||||
<input type="text" name="phone.country_code" placeholder="+81" value="{{ $data['phone.country_code'] }}" />
|
||||
<input type="text" name="phone.area_code" placeholder="43" value="{{ $data['phone.area_code'] }}" />
|
||||
<input type="text" name="phone.subscriber_number" placeholder="0000000" value="{{ $data['phone.subscriber_number'] }}" />
|
||||
<input type="text" name="phone.country_code" placeholder="+81" value="{{ $data['phone']['country_code'] ?? '' }}" />
|
||||
<input type="number" name="phone.area_code" placeholder="43" value="{{ $data['phone']['area_code'] ?? '' }}" />
|
||||
<input type="number" name="phone.subscriber_number" placeholder="0000000" value="{{ $data['phone']['subscriber_number'] ?? '' }}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="fax.country_code">FAX</label></td>
|
||||
<td>
|
||||
<input type="text" name="fax.country_code" placeholder="+81" value="{{ $data['fax.country_code'] }}" />
|
||||
<input type="text" name="fax.area_code" placeholder="43" value="{{ $data['fax.area_code'] }}" />
|
||||
<input type="text" name="fax.subscriber_number" placeholder="0000000" value="{{ $data['fax.subscriber_number'] }}" />
|
||||
<input type="text" name="fax.country_code" placeholder="+81" value="{{ $data['fax']['country_code'] ?? '' }}" />
|
||||
<input type="number" name="fax.area_code" placeholder="43" value="{{ $data['fax']['area_code'] ?? '' }}" />
|
||||
<input type="number" name="fax.subscriber_number" placeholder="0000000" value="{{ $data['fax']['subscriber_number'] ?? '' }}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="email">メールアドレス*</label></td>
|
||||
<td><input type="text" name="email" placeholder="taro@076.co.jp" value="{{ $data['email'] }}" /></td>
|
||||
<td><input type="text" name="email" placeholder="taro@076.co.jp" value="{{ $data['email'] ?? '' }}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="year">生年月日</label></td>
|
||||
<td><label for="birth_year">生年月日</label></td>
|
||||
<td>
|
||||
<input type="text" name="year" placeholder="1970" value="{{ $data['year'] }}" />年
|
||||
<input type="text" name="month" placeholder="12" value="{{ $data['month'] }}" />月
|
||||
<input type="text" name="day" placeholder="31" value="{{ $data['day'] }}" />日
|
||||
<input type="number" name="birth_year" placeholder="1970" value="{{ $data['birth']['year'] ?? '' }}" />年
|
||||
<input type="number" name="birth_month" placeholder="12" value="{{ $data['birth']['month'] ?? '' }}" />月
|
||||
<input type="number" name="birth_day" placeholder="31" value="{{ $data['birth']['day'] ?? '' }}" />日
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -68,29 +71,29 @@
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><label for="zipcode">郵便番号*(ハイフン付き)</label></td>
|
||||
<td>〒<input type="text" name="zipcode" value="{{ $data['zipcode'] }}" /></td>
|
||||
<td><label for="address_zipcode">郵便番号*(ハイフン付き)</label></td>
|
||||
<td>〒<input type="number" name="address_zipcode" value="{{ $data['address']['zipcode'] ?? '' }}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="state">都道府県*</label></td>
|
||||
<td><input type="text" name="state" value="{{ $data['state'] }}" /></td>
|
||||
<td><label for="address_state">都道府県*</label></td>
|
||||
<td><input type="text" name="address_state" value="{{ $data['address']['state'] ?? '' }}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="city">市区町村*</label></td>
|
||||
<td><input type="text" name="city" value="{{ $data['city'] }}" /></td>
|
||||
<td><label for="address_city">市区町村*</label></td>
|
||||
<td><input type="text" name="address_city" value="{{ $data['address']['city'] ?? '' }}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="street">町名*</label></td>
|
||||
<td><input type="text" name="street" value="{{ $data['street'] }}" /></td>
|
||||
<td><label for="address_street">町名*</label></td>
|
||||
<td><input type="text" name="address_street" value="{{ $data['address']['street'] ?? '' }}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="number">番地*</label></td>
|
||||
<td><input type="text" name="number" value="{{ $data['number'] }}" /></td>
|
||||
<td><label for="address_number">番地*</label></td>
|
||||
<td><input type="text" name="address_number" value="{{ $data['address']['number'] ?? '' }}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="country">国</label></td>
|
||||
<td><label for="address_country">国</label></td>
|
||||
<td>
|
||||
<select name="country">
|
||||
<select name="address_country">
|
||||
<option value="JP" selected="selected">日本</option>
|
||||
<option value="NL">オランダ</option>
|
||||
</select>
|
||||
@@ -98,7 +101,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="comments">メモ</label></td>
|
||||
<td><input type="text" name="comments" value="{{ $data['comments'] }}" /></td>
|
||||
<td><input type="text" name="comments" value="{{ $data['comments'] ?? '' }}" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
9
view/openprovider/deletecustomer.maron
Normal file
9
view/openprovider/deletecustomer.maron
Normal file
@@ -0,0 +1,9 @@
|
||||
{@ include(common/header) @}
|
||||
<h2>本当に顧客様「{{ $handle }}」を削除しますか?</h2>
|
||||
<p>
|
||||
<form method="POST" action="/openprovider/deletecustomer/{{ $handle }}">
|
||||
<input type="submit" class="op-button-create" name="delete_confirm" value="はい" />
|
||||
<input type="submit" class="op-button-delete" name="delete_reject" value="いいえ" />
|
||||
</form>
|
||||
</p>
|
||||
{@ include(common/footer) @}
|
||||
@@ -1,26 +1,25 @@
|
||||
{@ include(common/header) @}
|
||||
顧客様の削除<br />
|
||||
顧客様のクローン<br />
|
||||
顧客様の編集<br />
|
||||
{$ $addInfo = $data['data']['additional_data'] $}
|
||||
{$ $name = $data['data']['name'] $}
|
||||
{$ $phone = $data['data']['phone'] $}
|
||||
{$ $fax = $data['data']['fax'] $}
|
||||
{$ $addr = $data['data']['address'] $}
|
||||
<a href="/openprovider/deletecustomer/{{ $data['data']['handle'] }}" class="op-button-delete">顧客様の削除</a>
|
||||
<a href="/openprovider/editcustomer/{{ $data['data']['handle'] }}" class="op-button-edit">顧客様の編集</a>
|
||||
{$ $addInfo = $data['data']['additional_data'] ?? [] $}
|
||||
{$ $name = $data['data']['name'] ?? [] $}
|
||||
{$ $phone = $data['data']['phone'] ?? [] $}
|
||||
{$ $fax = $data['data']['fax'] ?? [] $}
|
||||
{$ $addr = $data['data']['address'] ?? [] $}
|
||||
<h2>連絡先:{{ $name['full_name'] }} ({{ $data['data']['handle'] }})</h2>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<td>{{ $data['data']['id'] }}</td>
|
||||
<td>{{ $data['data']['id'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>リセラーID</th>
|
||||
<td>{{ $data['data']['reseller_id'] }}</td>
|
||||
<td>{{ $data['data']['reseller_id'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>ハンドル</th>
|
||||
<td>{{ $data['data']['handle'] }}</td>
|
||||
<td>{{ $data['data']['handle'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>イニシャル</th>
|
||||
@@ -28,27 +27,27 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>フルネーム</th>
|
||||
<td>{{ $name['last_name'].' '.$name['first_name'] }}</td>
|
||||
<td>{{ ($name['last_name'] ?? '').' '.($name['first_name'] ?? '') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>生まれた場所</th>
|
||||
<td>〒{{ $addInfo['birth_zipcode'].' '.$addInfo['birth_city'].' '.$addInfo['birth_address'].' '.$addInfo['birth_country'] }}</td>
|
||||
<td>〒{{ (!empty($fax) ? ($addInfo['birth_zipcode'] ?? '').' '.($addInfo['birth_city'] ?? '').' '.($addInfo['birth_address'] ?? '').' '.($addInfo['birth_country'] ?? '') : '') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>生年月日</th>
|
||||
<td>{{ $addInfo['birth_date'] }}</td>
|
||||
<td>{{ $addInfo['birth_date'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>電話番号</th>
|
||||
<td>{{ $phone['country_code'].$phone['area_code'].$phone['subscriber_number'] }}</td>
|
||||
<td>{{ (!empty($phone) ? ($phone['country_code'] ?? '').'-'.($phone['area_code'] ?? '').'-'.($phone['subscriber_number'] ?? '') : '') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>FAX</th>
|
||||
<td>{{ $fax['country_code'].$fax['area_code'].$fax['subscriber_number'] }}</td>
|
||||
<td>{{ (!empty($fax) ? ($fax['country_code'] ?? '').'-'.($fax['area_code'] ?? '').'-'.($fax['subscriber_number'] ?? '') : '') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>メールアドレス</th>
|
||||
<td>{{ $data['data']['email'] }}</td>
|
||||
<td>{{ $data['data']['email'] ?? '' }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -57,28 +56,28 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>会社名</th>
|
||||
<td>{{ $data['data']['company_name'] }}</td>
|
||||
<td>{{ $data['data']['company_name'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>VAT番号</th>
|
||||
<td>{{ $data['data']['vat'] }}</td>
|
||||
<td>{{ $data['data']['vat'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>会社登録番号</th>
|
||||
<td>{{ $addInfo['company_registration_number'] }}</td>
|
||||
<td>{{ $addInfo['company_registration_number'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>会社登録場所</th>
|
||||
<td>{{ $addInfo['company_registration_city'] }}</td>
|
||||
<td>{{ $addInfo['company_registration_city'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>会社登録日</th>
|
||||
<td>{{ $addInfo['company_registration_subscription_date'] }}</td>
|
||||
<td>{{ $addInfo['company_registration_subscription_date'] ?? '' }}</td>
|
||||
</tr>
|
||||
{$ $link = $addInfo['company_url'] $}
|
||||
<tr>
|
||||
<th>会社URL</th>
|
||||
<td><a href="{{ $link }}">{{ $link }}</a></td>
|
||||
<td><a href="{{ $link ?? '#' }}">{{ $link ?? 'DUMMY' }}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -87,23 +86,23 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>道+番号</th>
|
||||
<td>{{ $addr['street'].$addr['number'].' '.$addr['suffix'] }}</td>
|
||||
<td>{{ ($addr['street'].$addr['number'] ?? '').' '.($addr['suffix'] ?? '') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>郵便番号</th>
|
||||
<td>{{ $addr['zipcode'] }}</td>
|
||||
<td>{{ $addr['zipcode'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>市区町村</th>
|
||||
<td>{{ $addr['city'] }}</td>
|
||||
<td>{{ $addr['city'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>都道府県</th>
|
||||
<td>{{ $addr['state'] }}</td>
|
||||
<td>{{ $addr['state'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>国</th>
|
||||
<td>{{ $addr['country'] }}</td>
|
||||
<td>{{ $addr['country'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>言語</th>
|
||||
@@ -111,7 +110,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>本社の場所</th>
|
||||
<td>〒{{ $addInfo['headquarters_zipcode'].' '.$addInfo['headquarters_city'].' '.$addInfo['headquarters_address'].' '.$addInfo['headquarters_country'] }}</td>
|
||||
<td>{{ !empty($addInfo) ? ('〒 '.($addInfo['headquarters_zipcode'] ?? '').' '.($addInfo['headquarters_city'] ?? '').' '.($addInfo['headquarters_address'] ?? '').' '.($addInfo['headquarters_country'] ?? '')) : '' }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user