frio: provide confirm modal

This commit is contained in:
rabuzarus 2016-07-26 10:36:34 +02:00
parent e4bef09717
commit 694637f9c3
6 changed files with 35 additions and 3 deletions

View file

@ -434,6 +434,7 @@ function contacts_content(&$a) {
$a->page['aside'] = ''; $a->page['aside'] = '';
return replace_macros(get_markup_template('contact_drop_confirm.tpl'), array( return replace_macros(get_markup_template('contact_drop_confirm.tpl'), array(
'$header' => t('Drop contact'),
'$contact' => _contact_detail_for_template($orig_record[0]), '$contact' => _contact_detail_for_template($orig_record[0]),
'$method' => 'get', '$method' => 'get',
'$message' => t('Do you really want to delete this contact?'), '$message' => t('Do you really want to delete this contact?'),

View file

@ -1,4 +1,4 @@
<h1>{{"Drop contact"|t}}</h1> <h1>{{$header}}</h1>
{{include file="contact_template.tpl" no_contacts_checkbox=True}} {{include file="contact_template.tpl" no_contacts_checkbox=True}}

View file

@ -1908,6 +1908,14 @@ ul li:hover .contact-wrapper a.contact-action-link:hover {
#directory-search-wrapper{ #directory-search-wrapper{
padding: 10px 0; 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 page */
#directory-search-heading { #directory-search-heading {

View file

@ -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>

View file

@ -0,0 +1,9 @@
<div id="contact-drop-confirm">
<h2 class="heading">{{$header}}</h2>
{{include file="contact_template.tpl" no_contacts_checkbox=True}}
{{include file="confirm.tpl"}}
<div class="clear"></div>
</div>

View 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.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.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.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.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}} {{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> </div>