| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <!-- Begin toolbar -->
- <div class="l-center edit">
- <div class="l-sort clearfix">
- <div class="l-unit-toolbar__buttonstrip">
- <a class="ui-button cancel" dir="ltr" id="btn-back" href="/add/webapp/?domain=<?=htmlentities($v_domain);?>"><i class="fas fa-arrow-left status-icon blue"></i><?=_('Back');?></a>
- </div>
- <div class="l-unit-toolbar__buttonstrip u-float-right">
- <?php
- if (!empty($_SESSION['error_msg'])) {
- echo "<span class=\"vst-error\"> → ".htmlentities($_SESSION['error_msg'])."</span>";
- } else {
- if (!empty($_SESSION['ok_msg'])) {
- echo "<span class=\"vst-ok\"> → ".$_SESSION['ok_msg']."</span>";
- }
- }
- ?>
- <a href="#" class="ui-button" data-action="submit" data-id="vstobjects"><i class="fas fa-save status-icon purple"></i> <?=_('Install');?></a>
- </div>
- </div>
- </div>
- <!-- End toolbar -->
- <div class="l-separator"></div>
- <div class="l-center animated fadeIn">
- <?php if( !empty($WebappInstaller->getOptions())): ?>
- <form id="vstobjects" method="POST" name="v_setup_webapp">
- <input type="hidden" name="token" value="<?=$_SESSION['token']?>">
- <input type="hidden" name="ok" value="true">
- <div class="form-container">
- <?php if( !$WebappInstaller->isDomainRootClean()): ?>
- <div class="alert alert-info alert-with-icon u-input-width" role="alert">
- <i class="fas fa-info"></i>
- <p class="u-mb10"><?=_('Data loss warning!');?></p>
- <p class="u-mb10"><?=_('Your web folder already has files uploaded to it. The installer will overwrite your files and / or the installation might fail.');?></p>
- <p><?php echo sprintf(_('Please make sure ~/web/%s/public_html is empty!'),$v_domain);?></p>
- </div>
- <?php endif; ?>
- <div class="u-input-width u-mt20">
- <?php foreach ($WebappInstaller->getOptions() as $form_name => $form_control):?>
- <?php
- $f_name = $WebappInstaller->formNs() . '_' . $form_name;
- $f_type = $form_control;
- $f_value = '';
- if(isset($form_control['label'])){
- $f_label = htmlentities($form_control['label']);
- }else{
- $f_label = ucwords(str_replace(['.','_'], ' ', $form_name));
- }
- $f_placeholder = '';
- if (is_array($form_control)) {
- $f_type = (!empty($form_control['type']))?$form_control['type']:'text';
- $f_value = (!empty($form_control['value']))?$form_control['value']:'';
- $f_placeholder = (!empty($form_control['placeholder']))?$form_control['placeholder']:'';
- }
- $f_value = htmlentities($f_value);
- $f_label = htmlentities($f_label);
- $f_name = htmlentities($f_name);
- $f_placeholder = htmlentities($f_placeholder);
- ?>
- <div class="u-mb10">
- <?php if($f_type != 'boolean'): ?>
- <label for="<?=$f_name?>" class="form-label">
- <?=$f_label?>
- <?php if ($f_type === 'password'):?> / <a href="javascript:applyRandomStringToTarget('<?=$f_name?>');" class="generate"><?=_('generate');?></a> <?php endif?>
- </label>
- <?php endif; ?>
- <?php if (in_array($f_type, ['select']) && count($form_control['options']) ):?>
- <select class="form-select" name="<?=$f_name?>" id="<?=$f_name?>">
- <?php foreach ($form_control['options'] as $key => $option){
- if(is_numeric($key)){
- $key = $option;
- }
- ?>
- <?php $selected = (!empty($form_control['value']) && $key == $form_control['value'])?'selected':''?>
- <option value="<?=$key?>" <?=$selected?>><?=htmlentities($option)?></option>
- <?php }; ?>
- </select>
- <?php elseif (in_array($f_type, ['boolean'])):?>
- <div class="form-check">
- <?php $checked = (!empty($f_value))?'checked':''?>
- <input class="form-check-input" type="checkbox" name="<?=$f_name?>" id="<?=$f_name?>" <?=$checked?> value="true">
- <label for="<?=$f_name?>"><?=$f_label?></label>
- </div>
- <?php else:?>
- <input type="text" class="form-control" name="<?=$f_name?>" id="<?=$f_name?>" placeholder="<?=$f_placeholder?>" value="<?=$f_value?>">
- <?php endif; ?>
- </div>
- <?php endforeach; ?>
- </div>
- </div>
- </form>
- <?php endif ?>
- </div>
|