From 694637f9c3c47d57464d4a21fd7c1f8b174400b1 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Tue, 26 Jul 2016 10:36:34 +0200 Subject: [PATCH] frio: provide confirm modal --- mod/contacts.php | 3 ++- view/templates/contact_drop_confirm.tpl | 2 +- view/theme/frio/css/style.css | 8 ++++++++ view/theme/frio/templates/confirm.tpl | 14 ++++++++++++++ view/theme/frio/templates/contact_drop_confirm.tpl | 9 +++++++++ view/theme/frio/templates/contact_template.tpl | 2 +- 6 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 view/theme/frio/templates/confirm.tpl create mode 100644 view/theme/frio/templates/contact_drop_confirm.tpl diff --git a/mod/contacts.php b/mod/contacts.php index 4eb435fc7..1fb48daf3 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -434,7 +434,8 @@ function contacts_content(&$a) { $a->page['aside'] = ''; return replace_macros(get_markup_template('contact_drop_confirm.tpl'), array( - '$contact' => _contact_detail_for_template($orig_record[0]), + '$header' => t('Drop contact'), + '$contact' => _contact_detail_for_template($orig_record[0]), '$method' => 'get', '$message' => t('Do you really want to delete this contact?'), '$extra_inputs' => $inputs, diff --git a/view/templates/contact_drop_confirm.tpl b/view/templates/contact_drop_confirm.tpl index 9b9a35971..48b61832d 100644 --- a/view/templates/contact_drop_confirm.tpl +++ b/view/templates/contact_drop_confirm.tpl @@ -1,4 +1,4 @@ -

{{"Drop contact"|t}}

+

{{$header}}

{{include file="contact_template.tpl" no_contacts_checkbox=True}} diff --git a/view/theme/frio/css/style.css b/view/theme/frio/css/style.css index c7cf21372..30b2221e3 100644 --- a/view/theme/frio/css/style.css +++ b/view/theme/frio/css/style.css @@ -1908,6 +1908,14 @@ ul li:hover .contact-wrapper a.contact-action-link:hover { #directory-search-wrapper{ padding: 10px 0; } +#contact-drop-confirm .contact-actions, +#contact-drop-confirm .contact-photo-overlay, +#contact-drop-confirm .contact-photo-menu { + display: none; +} +#contact-drop-confirm #confirm-form { + margin-top: 20px; +} /* directory page */ #directory-search-heading { diff --git a/view/theme/frio/templates/confirm.tpl b/view/theme/frio/templates/confirm.tpl new file mode 100644 index 000000000..d0de60831 --- /dev/null +++ b/view/theme/frio/templates/confirm.tpl @@ -0,0 +1,14 @@ + +
+ +
{{$message}}
+ {{foreach $extra_inputs as $input}} + + {{/foreach}} + +
+ + +
+ +
diff --git a/view/theme/frio/templates/contact_drop_confirm.tpl b/view/theme/frio/templates/contact_drop_confirm.tpl new file mode 100644 index 000000000..d665fefed --- /dev/null +++ b/view/theme/frio/templates/contact_drop_confirm.tpl @@ -0,0 +1,9 @@ +
+

{{$header}}

+ + {{include file="contact_template.tpl" no_contacts_checkbox=True}} + + {{include file="confirm.tpl"}} + +
+
diff --git a/view/theme/frio/templates/contact_template.tpl b/view/theme/frio/templates/contact_template.tpl index 37217c62f..264e5a4c6 100644 --- a/view/theme/frio/templates/contact_template.tpl +++ b/view/theme/frio/templates/contact_template.tpl @@ -52,7 +52,7 @@ {{if $contact.photo_menu.poke}}{{/if}} {{if $contact.photo_menu.network}}{{/if}} {{if $contact.photo_menu.edit}}{{/if}} - {{if $contact.photo_menu.drop}}{{/if}} + {{if $contact.photo_menu.drop}}{{/if}} {{if $contact.photo_menu.follow}}{{/if}} {{if $contact.photo_menu.hide}}{{/if}}