fix ui stuff

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2018-02-20 19:29:40 +01:00
parent 801bc08a81
commit bf753480dd

View File

@ -41,27 +41,27 @@
{/if} {/if}
{if $use_smtp} {if $use_smtp}
<div class="form-group {$errors['email']['class']}"> <div class="form-group {$errors['email']['class']}">
<label for="email" class="col-sm-4 control-label"> <label for="email" class="col-sm-4 control-label">
{__('Generic', 'Your email address')} *<br/> {__('Generic', 'Your email address')} *<br/>
<span class="small">{__('Generic', '(in the format name@mail.com)')}</span> <span class="small">{__('Generic', '(in the format name@mail.com)')}</span>
</label> </label>
<div class="col-sm-8"> <div class="col-sm-8">
{if $useRemoteUser} {if $useRemoteUser}
<input type="hidden" name="mail" value="{$form->admin_mail}">{$form->admin_mail} <input type="hidden" name="mail" value="{$form->admin_mail}">{$form->admin_mail}
{else} {else}
<input id="email" type="text" name="mail" class="form-control" {$errors['email']['aria']} value="{$poll_mail|html}" /> <input id="email" type="text" name="mail" class="form-control" {$errors['email']['aria']} value="{$poll_mail|html}" />
{/if} {/if}
</div>
</div> </div>
{if !empty($errors['email']['msg'])} </div>
<div class="alert alert-danger"> {if !empty($errors['email']['msg'])}
<p id="poll_title_error"> <div class="alert alert-danger">
{$errors['email']['msg']} <p id="poll_title_error">
</p> {$errors['email']['msg']}
</div> </p>
{/if} </div>
{/if}
{/if} {/if}
@ -122,210 +122,201 @@
<div class="collapse" id="optionnal"> <div class="collapse" id="optionnal">
{* Poll identifier *}
{* Poll identifier *}
<div class="form-group {$errors['customized_url']['class']}"> <div class="form-group {$errors['customized_url']['class']}">
<label for="poll_id" class="col-sm-4 control-label">
{__('Step 1', 'Poll id')}<br/>
</label>
{* Value MAX *}
{* Value MAX *} <div class="form-group">
<label for="use_valueMax" class="col-sm-4 control-label">
{__('Step 1', 'Value Max')}<br/>
</label>
<div class="form-group"> <div class="col-sm-8">
<label for="use_valueMax" class="col-sm-4 control-label"> <div class="checkbox">
{__('Step 1', 'Value Max')}<br/> <label>
</label> <input id="use_ValueMax" name="use_ValueMax" type="checkbox" >
<div class="col-sm-8"> {__('Step 1', "Limit the ammount of voters per option")}
<div class="checkbox"> </label>
<label> </div>
<input id="use_ValueMax" name="use_ValueMax" type="checkbox" > </div>
{__('Step 1', "Limit the ammount of voters per option")}
</label>
</div>
</div> </div>
</div>
<div class="form-group"> <div class="form-group">
<div id="ValueMax"{if !$use_ValueMax} class="hidden"{/if}> <div id="ValueMax"{if !$use_ValueMax} class="hidden"{/if}>
<div class="col-sm-offset-4 col-sm-8"> <div class="col-sm-offset-4 col-sm-8">
<label > <label>
<input id="ValueMax" type="number" min= "0" name="ValueMax"> <input id="ValueMax" type="number" min= "0" name="ValueMax">
{__('Step 1', "ValueMax instructions")} {__('Step 1', "ValueMax instructions")}
</label> </label>
</div> </div>
</div> </div>
</div> </div>
{* Poll identifier *}
<div class="form-group {$errors['customized_url']['class']}">
<label for="poll_id" class="col-sm-4 control-label">
{__('Step 1', 'Poll id')}<br/>
</label>
{* Poll identifier *} <div class="col-sm-8">
<div class="checkbox">
<div class="form-group {$errors['customized_url']['class']}"> <label>
<label for="poll_id" class="col-sm-4 control-label"> <input id="use_customized_url" name="use_customized_url" type="checkbox" {if $use_customized_url}checked{/if}/>
{__('Step 1', 'Poll id')}<br/> {__('Step 1', 'Customize the URL')}
</label> </label>
</div>
<div class="col-sm-8">
<div class="checkbox">
<label>
<input id="use_customized_url" name="use_customized_url" type="checkbox" {if $use_customized_url}checked{/if}/>
{__('Step 1', 'Customize the URL')}
</label>
</div> </div>
</div> </div>
</div> <div id="customized_url_options" {if !$use_customized_url}class="hidden"{/if}>
<div id="customized_url_options" {if !$use_customized_url}class="hidden"{/if}> <div class="form-group {$errors['customized_url']['class']}">
<div class="form-group {$errors['customized_url']['class']}"> <label for="customized_url" class="col-sm-4 control-label">
<label for="customized_url" class="col-sm-4 control-label"> <span id="pollUrlDesc" class="small">{__('Step 1', 'Poll id rules')}</span>
<span id="pollUrlDesc" class="small">{__('Step 1', 'Poll id rules')}</span> </label>
<div class="col-sm-8">
<div class="input-group">
<span class="input-group-addon">
{$SERVER_URL}
</span>
<input id="customized_url" type="text" name="customized_url" class="form-control" {$errors['customized_url']['aria']}
value="{$customized_url|html}" aria-describedBy="pollUrlDesc" maxlength="64"
pattern="[A-Za-z0-9-]+"/>
</div>
<span class="help-block text-warning">{__('Step 1', 'Poll id warning')}</span>
</div>
</div>
{if !empty($errors['customized_url']['msg'])}
<div class="alert alert-danger">
<p id="poll_customized_url_error">
{$errors['customized_url']['msg']}
</p>
</div>
{/if}
</div>
{* Password *}
<div class="form-group">
<label for="poll_id" class="col-sm-4 control-label">
{__('Step 1', 'Poll password')}
</label>
<div class="col-sm-8">
<div class="checkbox">
<label>
<input type="checkbox" name="use_password" {if $poll_use_password}checked{/if}
id="use_password">
{__('Step 1', "Use a password to restrict access")}
</label>
</div>
</div>
<div id="password_options"{if !$poll_use_password} class="hidden"{/if}>
<div class="col-sm-offset-4 col-sm-8">
<div class="input-group">
<input id="poll_password" type="password" name="password" class="form-control" {$errors['password']['aria']}/>
<label for="poll_password" class="input-group-addon">{__('Step 1', 'Password choice')}</label>
</div>
</div>
{if !empty($errors['password']['msg'])}
<div class="alert alert-danger">
<p id="poll_password_error">
{$errors['password']['msg']}
</p>
</div>
{/if}
<div class="col-sm-offset-4 col-sm-8">
<div class="input-group">
<input id="poll_password_repeat" type="password" name="password_repeat" class="form-control" {$errors['password_repeat']['aria']}/>
<label for="poll_password_repeat" class="input-group-addon">{__('Step 1', 'Password confirmation')}</label>
</div>
</div>
{if !empty($errors['password_repeat']['msg'])}
<div class="alert alert-danger">
<p id="poll_password_repeat_error">
{$errors['password_repeat']['msg']}
</p>
</div>
{/if}
<div class="col-sm-offset-4 col-sm-8">
<div class="checkbox">
<label>
<input type="checkbox" name="results_publicly_visible"
{if $poll_results_publicly_visible}checked{/if} id="results_publicly_visible"/>
{__('Step 1', "The results are publicly visible")}
</label>
</div>
</div>
</div>
</div>
<div class="form-group">
<label for="poll_id" class="col-sm-4 control-label">
{__('Step 1', 'Permissions')}
</label> </label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group"> <div class="radio">
<span class="input-group-addon"> <label>
{$SERVER_URL} <input type="radio" name="editable" id="editableByAll" {if $poll_editable==constant("Framadate\Editable::EDITABLE_BY_ALL")}checked{/if} value="{constant("Framadate\Editable::EDITABLE_BY_ALL")}">
</span> {__('Step 1', 'All voters can modify any vote')}
<input id="customized_url" type="text" name="customized_url" class="form-control" {$errors['customized_url']['aria']} </label>
value="{$customized_url|html}" aria-describedBy="pollUrlDesc" maxlength="64" <label>
pattern="[A-Za-z0-9-]+"/> <input type="radio" name="editable" {if $poll_editable==constant("Framadate\Editable::EDITABLE_BY_OWN")}checked{/if} value="{constant("Framadate\Editable::EDITABLE_BY_OWN")}">
{__('Step 1', 'Voters can modify their vote themselves')}
</label>
<label>
<input type="radio" name="editable" {if empty($poll_editable) or $poll_editable==constant("Framadate\Editable::NOT_EDITABLE")}checked{/if} value="{constant("Framadate\Editable::NOT_EDITABLE")}">
{__('Step 1', 'Votes cannot be modified')}
</label>
</div> </div>
<span class="help-block text-warning">{__('Step 1', 'Poll id warning')}</span>
</div> </div>
</div> </div>
{if !empty($errors['customized_url']['msg'])}
<div class="alert alert-danger">
<p id="poll_customized_url_error"> {if $use_smtp}
{$errors['customized_url']['msg']} <div class="form-group">
</p> <div class="col-sm-offset-4 col-sm-8">
<div class="checkbox">
<label>
<input type="checkbox" name="receiveNewVotes" {if $poll_receiveNewVotes}checked{/if}
id="receiveNewVotes">
{__('Step 1', 'To receive an email for each new vote')}
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<div class="checkbox">
<label>
<input type="checkbox" name="receiveNewComments" {if $poll_receiveNewComments}checked{/if}
id="receiveNewComments">
{__('Step 1', 'To receive an email for each new comment')}
</label>
</div>
</div>
</div> </div>
{/if} {/if}
</div>
{* Password *}
<div class="form-group">
<label for="poll_id" class="col-sm-4 control-label">
{__('Step 1', 'Poll password')}
</label>
<div class="col-sm-8">
<div class="checkbox">
<label>
<input type="checkbox" name="use_password" {if $poll_use_password}checked{/if}
id="use_password">
{__('Step 1', "Use a password to restrict access")}
</label>
</div>
</div>
<div id="password_options"{if !$poll_use_password} class="hidden"{/if}>
<div class="col-sm-offset-4 col-sm-8">
<div class="input-group">
<input id="poll_password" type="password" name="password" class="form-control" {$errors['password']['aria']}/>
<label for="poll_password" class="input-group-addon">{__('Step 1', 'Password choice')}</label>
</div>
</div>
{if !empty($errors['password']['msg'])}
<div class="alert alert-danger">
<p id="poll_password_error">
{$errors['password']['msg']}
</p>
</div>
{/if}
<div class="col-sm-offset-4 col-sm-8">
<div class="input-group">
<input id="poll_password_repeat" type="password" name="password_repeat" class="form-control" {$errors['password_repeat']['aria']}/>
<label for="poll_password_repeat" class="input-group-addon">{__('Step 1', 'Password confirmation')}</label>
</div>
</div>
{if !empty($errors['password_repeat']['msg'])}
<div class="alert alert-danger">
<p id="poll_password_repeat_error">
{$errors['password_repeat']['msg']}
</p>
</div>
{/if}
<div class="col-sm-offset-4 col-sm-8">
<div class="checkbox">
<label>
<input type="checkbox" name="results_publicly_visible"
{if $poll_results_publicly_visible}checked{/if} id="results_publicly_visible"/>
{__('Step 1', "The results are publicly visible")}
</label>
</div>
</div>
</div>
</div>
<div class="form-group">
<label for="poll_id" class="col-sm-4 control-label">
{__('Step 1', 'Permissions')}
</label>
<div class="col-sm-8">
<div class="radio">
<label>
<input type="radio" name="editable" id="editableByAll" {if $poll_editable==constant("Framadate\Editable::EDITABLE_BY_ALL")}checked{/if} value="{constant("Framadate\Editable::EDITABLE_BY_ALL")}">
{__('Step 1', 'All voters can modify any vote')}
</label>
<label>
<input type="radio" name="editable" {if $poll_editable==constant("Framadate\Editable::EDITABLE_BY_OWN")}checked{/if} value="{constant("Framadate\Editable::EDITABLE_BY_OWN")}">
{__('Step 1', 'Voters can modify their vote themselves')}
</label>
<label>
<input type="radio" name="editable" {if empty($poll_editable) or $poll_editable==constant("Framadate\Editable::NOT_EDITABLE")}checked{/if} value="{constant("Framadate\Editable::NOT_EDITABLE")}">
{__('Step 1', 'Votes cannot be modified')}
</label>
</div>
</div>
</div>
{if $use_smtp}
<div class="form-group"> <div class="form-group">
<div class="col-sm-offset-4 col-sm-8"> <div class="col-sm-offset-4 col-sm-8">
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" name="receiveNewVotes" {if $poll_receiveNewVotes}checked{/if} <input type="checkbox" name="hidden" {if $poll_hidden}checked{/if}
id="receiveNewVotes"> id="hidden">
{__('Step 1', 'To receive an email for each new vote')} {__('Step 1', "Only the poll maker can see the poll's results")}
</label> </label>
</div> </div>
</div> <div id="hiddenWithBadEditionModeError" class="alert alert-danger hidden">
</div> <p>
<div class="form-group"> {__('Error', "You can't create a poll with hidden results with the following edition option:")}"{__('Step 1', 'All voters can modify any vote')}"
<div class="col-sm-offset-4 col-sm-8"> </p>
<div class="checkbox">
<label>
<input type="checkbox" name="receiveNewComments" {if $poll_receiveNewComments}checked{/if}
id="receiveNewComments">
{__('Step 1', 'To receive an email for each new comment')}
</label>
</div> </div>
</div> </div>
</div> </div>
{/if}
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<div class="checkbox">
<label>
<input type="checkbox" name="hidden" {if $poll_hidden}checked{/if}
id="hidden">
{__('Step 1', "Only the poll maker can see the poll's results")}
</label>
</div>
<div id="hiddenWithBadEditionModeError" class="alert alert-danger hidden">
<p>
{__('Error', "You can't create a poll with hidden results with the following edition option:")}"{__('Step 1', 'All voters can modify any vote')}"
</p>
</div>
</div>
</div> </div>
</div> </div>