Move passwords modal in separated templates

so they can be reused
master
Daniel Berteaud 10 years ago
parent 3dca5678ab
commit 7fe7a8f292
  1. 111
      templates/default/join.html.ep
  2. 48
      templates/default/join_password_modal.html.ep
  3. 61
      templates/default/owner_password_modal.html.ep

@ -846,114 +846,9 @@
</div> </div>
</div> </div>
</div> </div>
<div class="modal fade" role="dialog" id="persistentModal" aria-labelledby="persistentModal" aria-hidden="true"> %=include 'owner_password_modal'
<div class="modal-dialog modal-lg"> %=include 'join_password_modal'
<div class="modal-content"> %=include 'noscript'
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title" id="persistentTitle">
<%=l 'MAKE_THIS_ROOM_PERSISTENT' %>
</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" role="form" id="persistentForm">
<p>
<%=l 'SET_OWNER_PASS_PERSISTENT' %>
<ul>
<li>
<%= sprintf($self->l('A_STANDARD_ROOM_EXPIRES_AFTER_d'), int($config->{inactivityTimeout}/3600)) %>
</li>
<li>
<%=l 'A_PERSISTENT_ROOM' %>
<% if ($config->{persistentInactivityTimeout} > 0){ %>
<%= sprintf($self->l('EXPIRE_AFTER_d'), int($config->{persistentInactivityTimeout}/(3600*24))) %>
<% } else{ %>
<%=l 'WILL NEVER_EXPIRE' %>
<% } %>
</li>
</ul>
</p>
<div class="form-group">
<label for="ownerPass" class="col-sm-4 control-label">
<%=l 'PASSWORD' %>
</label>
<div class="col-sm-8">
<input type="password" id="ownerPass" class="form-control help" placeholder="<%=l 'PASSWORD' %>" data-toggle="tooltip" data-placement="bottom" title="<%=l 'PASSWORD' %>"/>
</div>
</div>
<div class="form-group">
<label for="ownerPassConfirm" class="col-sm-4 control-label">
<%=l 'CONFIRM_PASSWORD' %>
</label>
<div class="col-sm-8">
<input type="password" id="ownerPassConfirm" class="form-control help" placeholder="<%=l 'CONFIRM_PASSWORD' %>" data-toggle="tooltip" data-placement="bottom" title="<%=l 'CONFIRM_PASSWORD' %>"/>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<button id="setOwnerPassButton" type="submit" class="btn btn-primary help disabled" data-toggle="tooltip" data-placement="bottom" title="<%=l 'SUBMIT' %>">
<%=l 'SUBMIT' %>
</button>
<button class="btn btn-default help" data-dismiss="modal" data-toggle="tooltip" data-placement="bottom" title="<%=l 'CANCEL' %>">
<%=l 'CANCEL' %>
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="modal fade" role="dialog" id="joinPassModal" aria-labelledby="joinPassModal" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title" id="joinPassTitle">
<%=l 'PASSWORD_PROTECT' %>
</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" role="form" id="joinPassForm">
<p>
<%=l 'PROTECT_ROOM_WITH_PASSWORD' %>
</p>
<div class="form-group">
<label for="joinPass" class="col-sm-4 control-label">
<%=l 'PASSWORD' %>
</label>
<div class="col-sm-8">
<input type="password" id="joinPass" class="form-control help" placeholder="<%=l 'PASSWORD' %>" data-toggle="tooltip" data-placement="bottom" title="<%=l 'PASSWORD' %>"/>
</div>
</div>
<div class="form-group">
<label for="joinPassConfirm" class="col-sm-4 control-label">
<%=l 'CONFIRM_PASSWORD' %>
</label>
<div class="col-sm-8">
<input type="password" id="joinPassConfirm" class="form-control help" placeholder="<%=l 'CONFIRM_PASSWORD' %>" data-toggle="tooltip" data-placement="bottom" title="<%=l 'CONFIRM_PASSWORD' %>"/>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<button id="setJoinPassButton" type="submit" class="btn btn-default btn-primary help disabled" data-toggle="tooltip" data-placement="bottom" title="<%=l 'SUBMIT' %>">
<%=l 'SUBMIT' %>
</button>
<button class="btn btn-default help" data-dismiss="modal" data-toggle="tooltip" data-placement="bottom" title="<%=l 'CANCEL' %>">
<%=l 'CANCEL' %>
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
%= include 'noscript'
<div class="frame"> <div class="frame">
<div id="chatMenu" class="nav-collapse collapse"> <div id="chatMenu" class="nav-collapse collapse">
<div id="chatHistory" class="form-control"> <div id="chatHistory" class="form-control">

@ -0,0 +1,48 @@
<div class="modal fade" role="dialog" id="joinPassModal" aria-labelledby="joinPassModal" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title" id="joinPassTitle">
<%=l 'PASSWORD_PROTECT' %>
</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" role="form" id="joinPassForm">
<p>
<%=l 'PROTECT_ROOM_WITH_PASSWORD' %>
</p>
<div class="form-group">
<label for="joinPass" class="col-sm-4 control-label">
<%=l 'PASSWORD' %>
</label>
<div class="col-sm-8">
<input type="password" id="joinPass" class="form-control help" placeholder="<%=l 'PASSWORD' %>" data-toggle="tooltip" data-placement="bottom" title="<%=l 'PASSWORD' %>"/>
</div>
</div>
<div class="form-group">
<label for="joinPassConfirm" class="col-sm-4 control-label">
<%=l 'CONFIRM_PASSWORD' %>
</label>
<div class="col-sm-8">
<input type="password" id="joinPassConfirm" class="form-control help" placeholder="<%=l 'CONFIRM_PASSWORD' %>" data-toggle="tooltip" data-placement="bottom" title="<%=l 'CONFIRM_PASSWORD' %>"/>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<button id="setJoinPassButton" type="submit" class="btn btn-default btn-primary help disabled" data-toggle="tooltip" data-placement="bottom" title="<%=l 'SUBMIT' %>">
<%=l 'SUBMIT' %>
</button>
<button class="btn btn-default help" data-dismiss="modal" data-toggle="tooltip" data-placement="bottom" title="<%=l 'CANCEL' %>">
<%=l 'CANCEL' %>
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>

@ -0,0 +1,61 @@
<div class="modal fade" role="dialog" id="persistentModal" aria-labelledby="persistentModal" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title" id="persistentTitle">
<%=l 'MAKE_THIS_ROOM_PERSISTENT' %>
</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" role="form" id="persistentForm">
<p>
<%=l 'SET_OWNER_PASS_PERSISTENT' %>
<ul>
<li>
<%= sprintf($self->l('A_STANDARD_ROOM_EXPIRES_AFTER_d'), int($config->{inactivityTimeout}/3600)) %>
</li>
<li>
<%=l 'A_PERSISTENT_ROOM' %>
<% if ($config->{persistentInactivityTimeout} > 0){ %>
<%= sprintf($self->l('EXPIRE_AFTER_d'), int($config->{persistentInactivityTimeout}/(3600*24))) %>
<% } else{ %>
<%=l 'WILL NEVER_EXPIRE' %>
<% } %>
</li>
</ul>
</p>
<div class="form-group">
<label for="ownerPass" class="col-sm-4 control-label">
<%=l 'PASSWORD' %>
</label>
<div class="col-sm-8">
<input type="password" id="ownerPass" class="form-control help" placeholder="<%=l 'PASSWORD' %>" data-toggle="tooltip" data-placement="bottom" title="<%=l 'PASSWORD' %>"/>
</div>
</div>
<div class="form-group">
<label for="ownerPassConfirm" class="col-sm-4 control-label">
<%=l 'CONFIRM_PASSWORD' %>
</label>
<div class="col-sm-8">
<input type="password" id="ownerPassConfirm" class="form-control help" placeholder="<%=l 'CONFIRM_PASSWORD' %>" data-toggle="tooltip" data-placement="bottom" title="<%=l 'CONFIRM_PASSWORD' %>"/>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<button id="setOwnerPassButton" type="submit" class="btn btn-primary help disabled" data-toggle="tooltip" data-placement="bottom" title="<%=l 'SUBMIT' %>">
<%=l 'SUBMIT' %>
</button>
<button class="btn btn-default help" data-dismiss="modal" data-toggle="tooltip" data-placement="bottom" title="<%=l 'CANCEL' %>">
<%=l 'CANCEL' %>
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
Loading…
Cancel
Save