]> git.mxchange.org Git - friendica.git/commitdiff
frio: provide confirm modal
authorrabuzarus <>
Tue, 26 Jul 2016 08:36:34 +0000 (10:36 +0200)
committerrabuzarus <>
Tue, 26 Jul 2016 08:36:34 +0000 (10:36 +0200)
mod/contacts.php
view/templates/contact_drop_confirm.tpl
view/theme/frio/css/style.css
view/theme/frio/templates/confirm.tpl [new file with mode: 0644]
view/theme/frio/templates/contact_drop_confirm.tpl [new file with mode: 0644]
view/theme/frio/templates/contact_template.tpl

index 4eb435fc7550697abf23d6c4543140b08e31a616..1fb48daf361f585882f7738b8d38526371fcc72e 100644 (file)
@@ -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,
index 9b9a3597143459761cd56a2808c64c44a2e504d3..48b61832d45e48a91dd64ab2488572c6fe783e8c 100644 (file)
@@ -1,4 +1,4 @@
-<h1>{{"Drop contact"|t}}</h1>\r
+<h1>{{$header}}</h1>\r
 \r
 {{include file="contact_template.tpl" no_contacts_checkbox=True}}\r
 \r
index c7cf213724eef9c2e4a8da8a12c9d02c1e538ec2..30b2221e3bbc1976468894c42e23dded4ba9b202 100644 (file)
@@ -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 (file)
index 0000000..d0de608
--- /dev/null
@@ -0,0 +1,14 @@
+
+<form action="{{$confirm_url}}" id="confirm-form" method="{{$method}}">
+
+       <div id="confirm-message">{{$message}}</div>
+       {{foreach $extra_inputs as $input}}
+       <input type="hidden" name="{{$input.name}}" value="{{$input.value|escape:'html'}}" />
+       {{/foreach}}
+
+       <div class="form-group pull-right settings-submit-wrapper" >
+               <button type="submit" name="{{$confirm_name}}" id="confirm-submit-button" class="btn btn-primary confirm-button" value="{{$confirm|escape:'html'}}">{{$confirm|escape:'html'}}</button>
+               <button type="submit" name="canceled" id="confirm-cancel-button" class="btn confirm-button" data-dismiss="modal">{{$cancel|escape:'html'}}</button>
+       </div>
+
+</form>
diff --git a/view/theme/frio/templates/contact_drop_confirm.tpl b/view/theme/frio/templates/contact_drop_confirm.tpl
new file mode 100644 (file)
index 0000000..d665fef
--- /dev/null
@@ -0,0 +1,9 @@
+<div id="contact-drop-confirm">\r
+       <h2 class="heading">{{$header}}</h2>\r
+\r
+       {{include file="contact_template.tpl" no_contacts_checkbox=True}}\r
+\r
+       {{include file="confirm.tpl"}}\r
+\r
+       <div class="clear"></div>\r
+</div>\r
index 37217c62fffbf37c61ca5ae11b612aa6a7a4fc06..264e5a4c615fdf7cad7a80c7acfee2f57eaac740 100644 (file)
@@ -52,7 +52,7 @@
                                {{if $contact.photo_menu.poke}}<a class="contact-action-link" onclick="addToModal('{{$contact.photo_menu.poke.1}}')" data-toggle="tooltip" title="{{$contact.photo_menu.poke.0}}"><i class="fa fa-heartbeat" aria-hidden="true"></i></a>{{/if}}
                                {{if $contact.photo_menu.network}}<a class="contact-action-link" href="{{$contact.photo_menu.network.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.network.0}}"><i class="fa fa-cloud" aria-hidden="true"></i></a>{{/if}}
                                {{if $contact.photo_menu.edit}}<a class="contact-action-link" href="{{$contact.photo_menu.edit.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.edit.0}}"><i class="fa fa-pencil" aria-hidden="true"></i></a>{{/if}}
-                               {{if $contact.photo_menu.drop}}<a class="contact-action-link" href="{{$contact.photo_menu.drop.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.drop.0}}"><i class="fa fa-user-times" aria-hidden="true"></i></a>{{/if}}
+                               {{if $contact.photo_menu.drop}}<a class="contact-action-link" onclick="addToModal('{{$contact.photo_menu.drop.1}}')" data-toggle="tooltip" title="{{$contact.photo_menu.drop.0}}"><i class="fa fa-user-times" aria-hidden="true"></i></a>{{/if}}
                                {{if $contact.photo_menu.follow}}<a class="contact-action-link" href="{{$contact.photo_menu.follow.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.follow.0}}"><i class="fa fa-user-plus" aria-hidden="true"></i></a>{{/if}}
                                {{if $contact.photo_menu.hide}}<a class="contact-action-link" href="{{$contact.photo_menu.hide.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.hide.0}}"><i class="fa fa-times" aria-hidden="true"></i></a>{{/if}}
                        </div>