function generateForm() { global $shortCode; $formHtml = null; foreach ($shortCode->fields as $field) { if ($field->fieldType != FormField::Hidden) { $formHtml .= "<tr><th valign='top' class='label' scope='row'><span class='alignleft'><label>{$field->label}</label></span>"; $formHtml .= "</th><td class='field'> "; } $formHtml .= generateField($field); if ($field->fieldType != FormField::Hidden) { "</td></tr>"; } } $formHtml .= '<tr><td><input type="button" value="Add Shortcode" id="submitBtn" class="button" /></td></tr>'; return $formHtml; }
function informacao_projeto($object, $box) { wp_nonce_field(basename(__FILE__), 'smashing_flautist_access_nonce'); $fieldConfig = getFieldConfig()["informacao_projecto"]; generateField($fieldConfig, $object); ?> <style> .recompenssas-list .clearfix { margin-bottom: 10px; } .recompenssas-list-item { margin-left: 10px; } .recompenssas-list-item .size-half { width: 70%; } .recompenssas-list-item ._label { width: 100px; margin-top: 5px; padding-right: 10px; text-align: right; } .field-block { position: relative; margin-bottom: 10px; } .editor-spacer { margin-bottom: 30px; } .field-block label { font-weight: bold; } .field-block textarea { height: 150px; } .field-block .field-full{ width:100%; } </style> <div id="tmplNivel" class="hidden" type="text/x-jquery-tmpl"> <div class="recompenssas-list-item"> <label for="">Nível ${index}</label> <div class="clearfix"> <div class="pull-left _label">Titulo:</div> <div class="pull-left size-half"><input type="text" class="form-control" id="titulo" value="${titulo}" /></div> </div> <div class="clearfix"> <div class="pull-left _label">Valor:</div> <div class="pull-left size-half"><input type="text" class="form-control" id="valor" value="${valor}" /></div> </div> <div class="clearfix"> <div class="pull-left _label">Descricao:</div> <div class="pull-left size-half"><input type="text" class="form-control" id="descricao" value="${descricao}" /></div> </div> </div> </div> <?php }
position:absolute; margin-top:110px; padding:5px; border:none; color:#666; background:#CCC; border-radius:5px; transition:.3s} .mudaAcao:hover,.goBtn:hover{ color:#CCC; background:#666; box-shadow:0 0 15px #CCC;} .title{ background:#CCC; color:#666; padding:2px 0} </style> </head> <body> <span class="backToMain">Voltar à página inicial.</span> <form class="logIn" method="POST" autocomplete="off"> <p class="title">Login para SEFUNC BD</p> <?php generateField("{'field':'usuario','lblContent':'Usuário','required':1}"); generateField("{'field':'senha','lblContent':'Senha','type':'password','required':1}"); ?> <input type="hidden" class="acaoSessao" name="acaoSessao" value="login"> <input type="button" class="mudaAcao" name="mudaAcao" onclick="mudarAcao();" value="Cadastre-se"> <button class="goBtn">Acessar</button> </form> </body> </html>